Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.