Serves manual what you can do with this app and how to achieve certain things.
This application gives you the choice in which editor you open and alter your journals The editor can be provided by as a CLI argument, environment variable or in the configuration file.
It recommended you only provide the name of editor without any argument. As moment of writing the argument would be interpreted as part of the name of the editor.
If no editor is provided at all then the app will try open the journals with vim.
Example of choosing editor via CLI
You can delete already created journals with the following sub command
- delete for deleting a daily journal
- delete-month for deleting a monthly journal
- delete-year for deleting a yearly journal
You specify a journal like you would in its respective edit command. There is one exception for the deletion of a yearly journal ! Here you must provide a certain year for deletion in contrast of the edit command for yearly journals.
By default before the deletion you prompted to confirm for safety. You can disable this safety prompt by providing the cli argument or setting the respective environment variable
There also examples deletion
This application can be altered via option in a configuration file named config.toml. By default the app will look at the typical os location for app data.
- For linux is usually ~/.conf/daily_ruster_man/
You can also provide the location via a command line option --config-path
or the environment variable CONFIG_PATH
instead. The path can be relative or absolute.
See the example config.toml. You can use this file as a starting point. it provides all options ready out comment them.
Some options for application can be provided via enviroment variables. Every option that can be provided via enviroment variable , can also be provided as CLI argument.
The help pages aka "-h" of the application and of the subcommands show wihch CLI arguments can also be given as enviroment variable.
All names of an enviromnetal variable follow this convention: "RUSTER_JOURNAL_<name_of_cli_argument>". <name_of_cli_argument> is the name CLI option in upper case and with each "-" is replaced by "_". Example: the cli argument named "config-path" has an enviroment variable variant called "RUSTER_JOURNAL_CONFIG_PATH".
This application allows you to create template files which are used when a journal is created. The content of the template file is inserted for the journal before the journal is opened by the chosen editor Which template file is used for what journal type (daily, monthly or yearly) can specified in the configuration file (config.toml). See the example template file how you can write a placeholder
Templates can be augmented via placeholders. Each placeholder has a key and a value. The key is replaced with the respective value in the template. The value of a key can be a:
- Direct value
- or command
If the value should be treated as a command then the field called is_command = true must be given to the key value pair. See the example config.toml how to provide placeholders.
Values can also be given as command which are executed as you have entered it in terminal. The output of the command is then used as replacement for the key.
Direct values for a placeholder can be surrounded by braces to mark a builtin variable. "{{" from the left and "}}" to the right. If the inner value, surrounded by the braces, is recognized as a builtin variable then the whole value is substituted by another value.
These are current built variables for daily journal
- DAY_JOURNAL: is substituted by day for the journal
- MONTH_JOURNAL: is substituted by month for the journal
- YEAR_JOURNAL: is substituted by year for the journal
These are current built variables for monthly journal
- MONTH_JOURNAL: is substituted by month for the journal
- YEAR_JOURNAL: is substituted by year for the journal
These are current built variables for yearly journal
- YEAR_JOURNAL: is substituted by year for the journal