Tags:
Topics
This article is linked to the following topics:
softwareprojects
shell script
Almanac

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
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
almanac -m "This is the message to log"
Add entry with a tag
This will add an entry to the almanac with the tag specified after the -s flag.
almanac -s work -m "This is the message to log"
Display whole almanac
This will display all of the entries in the almanac.
almanac-a
Display entries for a tag
This will display all the entries for a given subjeect tag.
almanac -S work
Display entries by date
The -D -Y and -M tags display entries from the given day, year or month respectively. 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 instead of just 1.
Display used tags
almanac -T
Display the number of entries for each tag.
almanac -C
Display the last entry
almanac -l
Remove an entry
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 permanently 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.
almanac --remove-entry {the long number at the start of the entry goes here}