An extension for the venerable CLI timetracker, Timewarrior. Use Billwarrior to generate invoices in LaTeX from your Timewarrior reports.
Trey Hunner's basic Invoice LaTeX template
(CC BY-NC-SA 3.0) is included in the etc/latex/
directory.
By cloning the repository:
git clone http://github.com/sw00/billwarrior.git
cd billwarrior
python setup.py install
setup.py
will create a directory $HOME/.config/billwarrior/
and copy billwarrior.ini
as well as LaTeX files there.
Edit $HOME/.config/billwarrior/billwarrior.ini
to add the categories of invoice items you'd
like to generate invoices for. For example:
[categories]
dev.tags = coding, dev, pairing
dev.text = Software Development Services
dev.rate = 44.85
consulting.tags = meeting, workshop, ceremony
consulting.text = Consulting Services
consulting.rate = 85.50
nonbillable.tags = pingpong, travel, lunch
nonbillable.text = Nonbillable Time
nonbillable.rate = 0.0
invisible.tags = invisible
invisible.rate = -1
-
Copy the
bin/billwarrior
script into your Timewarrior extensions directory and ensure that it's it executable -
Run a report and pipe output to the
billwarrior_items.tex
file that's imported byinvoice.tex
-
Run
pdflatex
(orxelatex
, whatever your preference) againstinvoice.tex
cp bin/billwarrior $TIMEWARRIORDB/extensions/billwarrior
chmod +x $TIMEWARRIORDB/extensions/billwarrior
timew report billwarrior > ~/.config/billwarrior/latex/billwarrior_items.tex
cd ~/.config/billwarrior/latex && pdflatex invoice.tex
-
It's up to you to customise the LaTeX template (
invoice.tex
andinvoice.cls
). -
Billwarrior is strict. It won't run if it encounters a time interval with tags that isn't configured to map to a category in
billwarrior.ini
. So make sure you givetimew
the appropriate filters.
-
Automated build (GH Actions).
-
Make line items' LaTeX output configurable.
-
Smarter
setup.py install
to detect Timewarrior extensions path and install itself. -
Upload/distribute to the cheese shop and support installation via
pip install