diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-05-17 16:29:31 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-05-17 17:54:04 +0200 |
commit | 43282fcbee7f56d63cd3386423e3d990f81d211b (patch) | |
tree | 56c31f3c44afb4d541466f0bf7205f5bf24bdcbc /doc/calcurse.1.txt | |
parent | 649231b0835aa89222e56f18bbdf7fe49e57f3d3 (diff) | |
download | calcurse-43282fcbee7f56d63cd3386423e3d990f81d211b.zip |
Document simple format specifiers
Add documentation for "--format"* to the manual and man page. See
commits 7f0c3003ac561a25eeb3c735b32e3ee312ef58c9 etc. for details.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'doc/calcurse.1.txt')
-rw-r--r-- | doc/calcurse.1.txt | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/doc/calcurse.1.txt b/doc/calcurse.1.txt index 0e03340..4463c03 100644 --- a/doc/calcurse.1.txt +++ b/doc/calcurse.1.txt @@ -103,6 +103,29 @@ appointments can be specified using the *-c* flag. Specify the data directory to use. This option is incompatible with -c. If not specified, the default directory is *~/.calcurse/*. +*--format-apt* <format>:: + Specify a format to control the output of appointments in non-interactive + mode. See the 'FORMAT STRINGS' section for detailed information on format + strings. + +*--format-recur-apt* <format>:: + Specify a format to control the output of recurrent appointments in + non-interactive mode. See the 'FORMAT STRINGS' section for detailed + information on format strings. + +*--format-event* <format>:: + Specify a format to control the output of events in non-interactive mode. See + the 'FORMAT STRINGS' section for detailed information on format strings. + +*--format-recur-event* <format>:: + Specify a format to control the output of recurrent events in non-interactive + mode. See the 'FORMAT STRINGS' section for detailed information on format + strings. + +*--format-todo* <format>:: + Specify a format to control the output of todo items in non-interactive mode. + See the 'FORMAT STRINGS' section for detailed information on format strings. + *-g*, *--gc*:: Run the garbage collector for note files and exit. @@ -170,6 +193,70 @@ such as: $ calcurse --export > my_data.dat ---- +Format strings +-------------- + +Format strings are composed of printf()-style format specifiers -- ordinary +characters are copied to stdout without modification. Each specifier is +introduced by a *%* and is followed by a character which specifies the field to +print. The set of available fields depends on the item type. + +Format specifiers for appointments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*s*:: + Print the start time of the appointment as UNIX time stamp +*S*:: + Print the start time of the appointment using the *hh:mm* format +*d*:: + Print the duration of the appointment in seconds +*e*:: + Print the end time of the appointment as UNIX time stamp +*E*:: + Print the end time of the appointment using the *hh:mm* format +*m*:: + Print the description of the item +*n*:: + Print the name of the note file belonging to the item +*N*:: + Print the note belonging to the item + +Format specifiers for events +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*m*:: + Print the description of the item +*n*:: + Print the name of the note file belonging to the item +*N*:: + Print the note belonging to the item + +Format specifiers for todo items +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*p*:: + Print the priority of the item +*m*:: + Print the description of the item +*n*:: + Print the name of the note file belonging to the item +*N*:: + Print the note belonging to the item + +Examples +~~~~~~~~ + +*`calcurse -r7 --format-apt='- %S -> %E\n\t%m\n%N'`*:: + Print appointments and events for the next seven days. Also, print the notes + attached to each regular appointment (simulates *-N* for appointments). + +*`calcurse -r7 --format-apt=' - %m (%S to %E)\n' --format-recur-apt=' - %m (%S to %E)\n'`*:: + Print appointments and events for the next seven days and use a custom format + for (recurrent) appointments: * - Some appointment (18:30 to 21:30)*. + +*`calcurse -t --format-todo '(%p) %m\n'`*:: + List all todo items and put parentheses around the priority specifiers. + Notes ----- |