Bill Generator
Similar to how neoscim was built (mainly) for my business, I also have created some bill generators. I solved this in two ways, so you get your pick:
Personally, I’m using option 2 - csv to pdf, because of the tight workflow it has with neoscim.
Workflow
Throughout the month I’m tracking expenses and hours in a spreadsheet. Something that might look like this:
| Work | Hrs |
|---|---|
| Setup Thing | 1.5 |
| Moved Thing | .25 |
There may be some other data flying around in the rest of the spreadsheet, but that’s ok.
In neoscim I enter visual mode with v, select the region, then run the command :export hrs.csv.
TADA!
A new csv file has appeared in my workspace with just the selected data.
I can then run this through the bill generator like such: bill-gen -1 hrs.csv 'Person Who is Paying Me'.
Lo and behold; there is now a pdf already labeled with an invoice number (globally tracked and incremented) all ready to send out to a client!
In an alternate form (“bill-gen -2 hrs.csv items.csv ‘Person Who is Paying Me’) I can also generate a bill that cost of goods:
How does all this magic work?
With the power of groff!
Perhaps at some point I will do a post or video on groff, since it is quite nice (mm macros used in this program), but it wouldn’t really fit with the content of this post.
If you are currious in the meantime, feel free to man groff and man groff_mm.
A quick start is groff -m mm file.mm -T pdf > out.pdf.