jazzband / Watson

:watch: A wonderful CLI to track your time!
http://tailordev.github.io/Watson/
MIT License
2.46k stars 240 forks source link

Question about printable reports #393

Open satirebird opened 4 years ago

satirebird commented 4 years ago

It there any way to generate printable (nice looking) reports. I want to do something like this:

watson report --json > report.json
some_converter report.json report.html/pdf
print report.pdf

My first idea was to use some intermediate formats like latex with some templates. But I couldn't found something which can be used with watson.

jmaupetit commented 4 years ago

Maybe adding an HTML serializer to the report would be nice combined with Weasyprint and a custom stylesheet to generate a pretty PDF report.

satirebird commented 4 years ago

I created a small wheezy.template which generates an asciidoc document. A PDF can be create with one line in bash:

JR=$(watson report --json) && wheezy.template report_en.adoc.wheezy "$JR" | asciidoctor-pdf -o report.pdf -

The template can be used from here.

raphaelfournier commented 1 year ago

I don't know if that would help anyone, but a long time ago, I made this: https://github.com/raphaelfournier/watson-weekly-timetable, a week-based report, with matplotlib.