Due
Due is a simple command line bill reminder. In a console window it allows you to show what bills are coming due in the next few weeks.
Dependencies
This application has only a few dependencies
- Modern C++ compiler featuring C++11 feature set
- Boost datetime and program options
- cmake
License
GNU GENERAL PUBLIC LICENSE, Version 3. See COPYING file in source distribution.
Applicaiton
Due takes an input_file that describes bills and which day they are due. Look at sample_input.txt for an example. If one is not specified on the command line $HOME/.bills is used.
Usage: ./due [options]
Options:
--help help message
--days arg days from today for due bills
--input arg input bill file
--paid arg paid bill file
Defaults:
days = 22
input = $HOME/.bills
paid = $HOME/.paid
Input Files
Bills File
The input file has the following format with some examples below.
| Bill Name | Day of Month | Month of Year | Days Prior | Bill Type |
|---|---|---|---|---|
| Morgage | 13 | -1 | 5 | a |
| Electric | 1 | -1 | 2 | a |
| Gas | 7 | -1 | 5 | m |
| Insurance | 3 | -1 | 10 | m |
| Spotify | 30 | 6 | 5 | y |
| Prime | 4 | 7 | 10 | y |
| DonateFSF | Wed | -1 | 5 | a |
Rules
Rules for input file format:
- Each field including the Bill Name must not contain spaces.
- The whitespace between fields, including new-lines, can be any amount of white space charactgers.
- A Month of Year fields of -1 indicates a monthly or weekly bill.
- A Month of Year fields of a valid month number indicates a yearly bill.
- A Day of Month can be either a day in the month, or a week day name, i.e. Sun, Mon, Tue, Wed, Thu, Fro, Sat. The weekday name indicates a weekly bill.
- The Bill Type can be any lower case letter. Days leading up to the bill due date will use this letter. The actual bill date will use the same letter, capitalized.
- no comments are allowed.
- Bill Names are at most 10 characters.
Paid File
The paid file has the following format with some examples below.
| Bill Name | Date Last Paid |
|---|---|
| Insurance | 2017-08-01 |
Rules
- Each field including the Bill Name must not contain spaces.
- The whitespace between fields, including new-lines, can be any amount of white space charactgers.
- The Date Last Paid is in the format CCYY-MM-DD.
- The Bill Name must match the bills file.
- no comments are allowed.
- Bill Names are at most 10 characters.
Sample Output
The following output comes from a bills file with the information from the table above. Note how the Insurance bill consistes of dashes, indicating it's paid.
Installation
Currently this application can be built on a Linux system, and installed with 'make install'
Building from Source
Make sure boost datetime library and program options header are installed.
Clone this repoistory and build it.
$ git clone https://github.com/kookjr/due
$ cd due
$ mkdir build && cd build && cmake .. && make
$ sudo make install
