aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordam <dam@gudinoff>2023-01-30 18:04:25 +0000
committerdam <dam@gudinoff>2023-01-30 18:04:25 +0000
commit114d85ad9c1d374e52deed138b3d624d3097b0c6 (patch)
tree43c6c65b6093dc0fc3da304fce92261f6a842c1b
parentf68ac18fa17de05df9be2d5f4eb991ebf844298f (diff)
downloadtask-time-tracker-114d85ad9c1d374e52deed138b3d624d3097b0c6.tar.zst
task-time-tracker-114d85ad9c1d374e52deed138b3d624d3097b0c6.zip
Simplified help text printing.
-rw-r--r--ttt.jai91
1 files changed, 47 insertions, 44 deletions
diff --git a/ttt.jai b/ttt.jai
index 17de73b..54cf640 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -1266,50 +1266,53 @@ main :: () {
is_exit_requested := false;
for 1..args.count-1 {
if is_equal_to_any(args[it], "--help", "-h") {
- print("Usage: ttt [OPTION]... [FILE]...\n");
- print(" -i, --import-csv [FILE] Import CSV file to database (discard first row).\n");
- print(" -e, --export-csv [FILE] Export database to CSV file.\n");
- print(" -n, --no-autosave Disable autosave feature (only save on exit).\n");
- print(" -h, --help Display this help and exit.\n");
- print(" -v, --version Output version information and exit.\n");
- print("\n");
- print("In app commands\n");
- print(" a, A Archive selected task (except if active).\n");
- print(" r, R Restore selected task from archive.\n");
- print(" t, T Select currently active task (if any).\n");
- print(" d, D Duplicate selected task.\n");
- print(" n, N Create new task.\n");
- print(" m, M Move selected task to position.\n");
- print(" g, G Select task by position.\n");
- print(" q, Q Save changes and exit.\n");
- print(" F2 Rename selected task.\n");
- print(" F5 Recalculate total times.\n");
- print(" TAB Toggle archive view.\n");
- print(" BACKSPACE Reset times for selected task.\n");
- print(" DELETE Delete selected task (except if active).\n");
- print(" SPACE, ENTER Toggle selected task as active/inactive.\n");
- print(" 1, 2, 3, 4, 5, 6, 7 Edit selected task time for the Nth day of week:\n");
- print(" =# sets # seconds;\n");
- print(" -# subtracts # seconds;\n");
- print(" # adds # seconds;\n");
- print(" #m specifies # as minutes;\n");
- print(" #h specifies # as hours;\n");
- print(" #d specifies # as days;\n");
- print(" #y specifies # as years.\n");
- print(" UP Select task above.\n");
- print(" DOWN Select task below.\n");
- print(" PAGE-UP Select task 1 page above.\n");
- print(" PAGE-DOWN Select task 1 page below.\n");
- print(" HOME Select first/top task.\n");
- print(" END Select last/bottom task.\n");
- print("\n");
- print("Notes\n");
- print("- All data files are stored '%/.task_time_tracker'.\n", app_directory);
- print(" If the home directory is undefined, './.task_time_tracker' will be used.\n");
- print(" The database entries are stored in binary format on the 'database.bin' file.\n");
- print(" The archived entries are stored in CSV format on the 'archive.csv' file.\n");
- print("- During intensive tasks such as saving to file or recalculating totals times,\n");
- print(" a diamond symbol is shown on the top left corner.\n");
+ write_strings(
+ "Usage: ttt [OPTION]... [FILE]...\n",
+ " -i, --import-csv [FILE] Import CSV file to database (discard first row).\n",
+ " -e, --export-csv [FILE] Export database to CSV file.\n",
+ " -n, --no-autosave Disable autosave feature (only save on exit).\n",
+ " -h, --help Display this help and exit.\n",
+ " -v, --version Output version information and exit.\n",
+ "\n",
+ "In app commands\n",
+ " a, A Archive selected task (except if active).\n",
+ " r, R Restore selected task from archive.\n",
+ " t, T Select currently active task (if any).\n",
+ " d, D Duplicate selected task.\n",
+ " n, N Create new task.\n",
+ " m, M Move selected task to position.\n",
+ " g, G Select task by position.\n",
+ " q, Q Save changes and exit.\n",
+ " F2 Rename selected task.\n",
+ " F5 Recalculate total times.\n",
+ " TAB Toggle archive view.\n",
+ " BACKSPACE Reset times for selected task.\n",
+ " DELETE Delete selected task (except if active).\n",
+ " SPACE, ENTER Toggle selected task as active/inactive.\n",
+ " 1, 2, 3, 4, 5, 6, 7 Edit selected task time for the Nth day of week:\n",
+ " =# sets # seconds;\n",
+ " -# subtracts # seconds;\n",
+ " # adds # seconds;\n",
+ " #m specifies # as minutes;\n",
+ " #h specifies # as hours;\n",
+ " #d specifies # as days;\n",
+ " #y specifies # as years.\n",
+ " UP Select task above.\n",
+ " DOWN Select task below.\n",
+ " PAGE-UP Select task 1 page above.\n",
+ " PAGE-DOWN Select task 1 page below.\n",
+ " HOME Select first/top task.\n",
+ " END Select last/bottom task.\n",
+ "\n",
+ "Notes\n");
+ print("- All data files are stored in '%'.\n", app_directory);
+ print(" If the home directory is undefined, './%' will be used.\n", APP_FOLDER_NAME);
+ write_strings(
+ " The database entries are stored in binary format on the 'database.bin' file.\n",
+ " The archived entries are stored in CSV format on the 'archive.csv' file.\n",
+ "- During intensive tasks such as saving to file or recalculating totals times,\n",
+ " a diamond symbol is shown on the top left corner.\n"
+ );
return;
}