Commit 46cf513d authored by Michael Rouse's avatar Michael Rouse

Version string and help documentation

parent b966b676
......@@ -174,6 +174,9 @@ typedef struct TIMESLIME_REPORT_STRUCT TIMESLIME_REPORT_t;
Once build, if you add the executable (in the `build` folder) to your system `PATH`, you can run it with the following commands:
```shell
# Show information and command help
> timeslime help
# Add an amount of time to the current date
> timeslime add [hours]
......
......@@ -193,7 +193,7 @@ static void perform_report_action(args_t args)
void display_help(void)
{
printf("Author: %s\n", AUTHOR);
printf("Version: %s\n", PROGRAM_VERSION);
printf("Version: %s\n", TIMESLIME_VERSION_STR);
printf("%s\n\n\n", DESCRIPTION);
printf("Usage:\n");
......
......@@ -31,7 +31,6 @@
#define PROGRAM_NAME "timeslime"
#define AUTHOR "Michael Rouse"
#define DESCRIPTION "\nTime Slime is a command line utility to keep \ntrack of hours worked remotely. \nA time sheet in your terminal!"
#define PROGRAM_VERSION "2018.08.19"
#define DATABASE_FILE "timeslime.db"
......
......@@ -118,4 +118,20 @@ char* TimeSlime_StatusCode(TIMESLIME_STATUS_t status);
#define __TS_QRY_GET_ALL_ENTIRES __TS_QRY_GET_COMPLTED_CLOCK_ENTRIES " OR " __TS_QRY_GET_ADDED_HOURS
/* Versioning, do not touch unless increasing the version */
#define _TO_VERSION_STRING(v) "v"__TO_VERSION_STRING(v)
#define __TO_VERSION_STRING(v) #v
#ifdef TIMESLIME_VERSION
#undef TIMESLIME_VERSION
#endif
#define TIMESLIME_VERSION 0.8
#ifdef TIMESLIME_VERSION_STR
#undef TIMESLIME_VERSION_STR
#endif
#define TIMESLIME_VERSION_STR _TO_VERSION_STRING(TIMESLIME_VERSION)
#endif
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment