Skip to content

vtan/nickel-hs

Repository files navigation

nickel-hs

Generates an SVG chart displaying weekly financial expenses split into categories.

Image of chart generated by nickel

Building and usage

The simplest way is using stack, available in the repositories of many Linux distributions. You can build and run nickel in your shell with:

stack build
stack exec nickel < example-data

Input format

The input data is read from the standard input. Each expense item is stored in a line with the following fields separated by whitespace:

  • The minus sign character: -
  • The date in yyyy-mm-dd format
  • The expense amount
  • The category of the expense item. It can be enclosed by quotation marks to escape spaces.
  • Description -- currently unused. It can be enclosed by quotation marks to escape spaces. For an example see the example file.

Output format

The output file weekly.svg is placed in the current directory.

Each tick on the horizontal axis labeled with a month represents the week of the first day of that month. The bars show the total expenses, the lines show rolling averages for each week. The rolling averages are displayed until the previous week (based on the system time). The categories are ordered by the number of expense items descending.

About

Generates a weekly spending chart from tracked data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published