Skip to content
Mark Waid Jr edited this page Feb 18, 2020 · 9 revisions

What is GenReport?

-GenReport is a program written in Bash, that helps users keep track of their daily work notes. It works by taking input from you the user and then taking the input and generating a daily client report. It takes care of all the repetative typing so you don't have to.

How does it work?

-GenReport is a command-line only tool for now, and works like other Linux commands by typing the name of the command in this case gen-report.

-GenReport has many options for creating and manipulating your reports. You can use gen-report --help for a full list of command options and their arguments.

-It works by taking in input, then parsing that input into different section of the report template, it then generates a report based on that data and stores it in a Redis database.

How to Install GenReport

  • Installing GenReport is easy, simply download GenReport from GitHub or clone it to your machine.
  • Open a Terminal and type cd ~/path/to/download/GenReport and hit [Enter].
  • Next type sudo ./install.sh and thats it, GenReport should be installed and ready to go!

How to Uninstall GenReport

  • Uninstalling GenReport is just as easy as installing it.
  • Open up a Terminal and type cd path/to/download/GenReport (Note if you don't have the download anymore that's okay, simply re-download it; all you need is install.sh)
  • Type sudo ./install.sh --uninstall

How to Re-install GenReport

  • The installer of GenReport features a "re-install" option
  • If you need to quickly re-install GenReport for any reason simply open up a Terminal and type cd path/to/download/GenReport (Note if you don't have the download anymore that's okay, simply re-download it; all you need is install.sh)
  • Then type sudo ./install.sh --reinstall and just like that GenReport is re-installed!

NOTE: Don't worry about your reports if you need to re-install GenReport, they are still kept safe in your Redis database! However any exported reports will be deleted.

How to use

-Main Report Fields:

These are the flags that gather the data needed to generate your report. These are all required options when generating a report. If you use one, you have to fill them all in or you will get an error message. For example gen-report -n 'Bob Ross' only gives the -n option, which will give you You cannot leave Client Phone field empty.... This is done as a safety measure so you are forced to go through each field to ensure the cleanliness of the database.

-Creating a basic report:

gen-report -n 'Bob Ross' -p '123-456-7890' -e '[email protected]' -b 'Bob Ross Inc' -h '7.5' will begin the process of creating a report for the client name -n Bob Ross whose phone number and email are -p123-456-7890 and -e [email protected] and owns a company called -b Bob Ross Inc, and finally that there was -h 7.5 hours of work done for said client.

-Adding Work Notes

After you hit enter on the command above you will be taken to a screen that will let you enter a multi-line note of the work you did. When you are done hit Ctl-D to save.

-Adding Side Notes

Just as adding work notes, you will be prompted with a blank screen for typing in your multi-line side notes and again hit Ctl-D when done to save.

You should be taken back to your main prompt and at this point HOORAY! You should have a saved report stored in your Redis database.

All of the fields below with Required are options that are required to actually generate a report.

Main Options:

  • -n [client_name] - Required - Takes the client_name and cannot be empty...
  • -p [client_phone] - Required - Gets the client_phone and cannot be empty..
  • -e [client_email] - Required - This grabs the client_email, and cannot be empty.
  • -b [client_business] - Required - This gets the client_business name, and cannot be empty.
  • -h [client_hours] - Required - You input the amount of client_hours you worked to this option, this cannot be empty.

-Additional Options:

  • gen-report --help - Displays the help text.
  • gen-report --test - Runs a series of tests designed to ensure correct functionality.
  • gen-report -k - lists all of the stored keys.
  • gen-report -q - lists all the reports done today.
  • gen-report -l [report_key] - Takes the argument report_key and returns a report if that key is found.
  • gen-report -d [report_key] - Takes the argument report_key and deletes the report associated with that key.
  • gen-report -t [report_key] - Takes the argument report_key then opens the report for editing in nano text editor.
  • gen-report -x [report_key] - Takes the argument report_key then exports the report associated with that key to /home/$USER/Documents/Notes/ as a plain text file.

Redis Key Generation

GenReport uses a Redis key naming scheme to keep itself sane, and to keep it manageable to write code for. When GenReport generates a report, it creates a unique Redis key for that client on that day. It is a combination of the client's name and the date the report was generated, for example Bob_Ross_2020-03-05 is a valid GenReport Redis key.

This method was chosen due to Redis's key value storage method. It's also easy to parse.

Who is GenReport intended for?

GenReport is intended for me @CodeCanna to keep his notes in order and organized because he isn't great at that; But he found that his computer is.