Skip to content

Conversation

johanfforsberg
Copy link
Contributor

Should solve issue #4, and replaces PR #9 (which it also builds upon. Thanks @dschick!).

There was a very simple PDF export feature in Elogy before, but it was barely usable; formatting was very simple and it did not include images. This PR fixes those things and adds a HTML export.

The feature can be used like this:
$ curl -OJ "http://elogy/api/logbooks/1/entries/?download=html&reverse_order=false&n=10"

This should produce a HTML file containing the first ten entries in logbook 1, named after the logbook and the current time. The "download" parameter can be set to "html" or "pdf". The usual filtering options are also available.

There's also a simple helper script included, to export a whole logbook to a zipped file. The idea is that exporting a very large logbook might take some time - probably not more than some seconds but still, it will lock up the server meanwhile - so it's better to export it incrementally.

Formatting of the HTML is still not great (see templates/entry_export.html.jinja2), feedback would be appreciated. Also, testing is needed as I had to make a few changes to the config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants