James Chip

Almanac.

{ Almanac on Sourcehut }

A short form journaling program written in a single shell script for your local machine only. Almanac flies in the face of the trend to have data available to all your devices via the internet; a journal is often a deeply private and personal thing, why would you want to make that available online?

A journal is an item to be cherished and cared for, it must travel with you if you are to be able to use it. The interconnected age has destroyed some of the special relationship with the item of the journal by allowing you to make entries at any time from any medium. Almanac tries to restore some of this special relationship by insisting that if you are to fill it, it must travel with you. Almanac stores all entries with a subject tag and a time stamp so that it is fully searchable.

Add an entry to the almanac.

almanac -m "This is the message to log" 
This will add an entry to the almanac with the default tag of 'personal' or what you have set the tag in the config file to

Add an entry to the almanac with a different tag

almanac -s work -m "This is the message to log" 
This will add an entry to the almanac with the tag specified after the -s flag.

Display the whole almanac

almanac -A 
This will display all of the entries in the almanac to the cli.

Display all entries for tag

almanac -S work 
This will display any entries in the almanac for the given tag.

Display entries by date

The -D -Y and -M tags display entries from the given day, year or month respectivley. They can be combined like so.
almanac -D 01 -M 01 -Y 19 
This will display all of the entries for the 1st of January 2019. These can also be combined with a tag search:
almanac -S work -Y 19 
Will display all of the entries in 2019 with the work tag. Note that all of the date searches require 2 digit inputs e.g. you will need to input 01 instear of just 1

Display used tags

almanac -T 

Display the number of posts for each tag

almanac -C 

Display the last entry inserted into the almanac

almanac -l 

Remove an entry from the almanac

almanac --remove-entry {the long number at the start of the entry goes here} 
Note that this has the ability to remove MANY entries from the almanac at once, it works by regex matching the number at the start of the entry. If you put 010119 then any entries with a number that starts 010119 will be permenantly removed from the log. THIS CAN NOT BE UNDONE SO IF YOU REMOVE THINGS YOU WANT TO KEEP ITS ON YOU! This command will print out the entries that will be removed and ask you if you really want to proceed. you have to input y or Y to proceed otherwise the log stays untouched.