papis-extract/papis_extract
Marty Oehme 5a6d672c76
refactor: Move formatting logic to formatters
Formatters (previously templates) were pure data containers before,
continating the 'template' for how things should be formatted using
mustache. The formatting would be done a) in the exporters and b) in the
annotations.

This spread of formatting has now been consolidated into the Formatter,
which fixes the overall spread of formatting code and now can coherently
format a whole output instead of just individual annotations.

A formatter contains references to all documents and contained
annotations and will format everything at once by default, but the
formatting function can be invoked with reference to a specific
annotated document to only format that.

This commit should put more separation into the concerns of exporter and
formatter and made formatting a concern purely of the formatters and
annotation objects.
2023-09-20 09:14:58 +02:00
..
__init__.py refactor: Move formatting logic to formatters 2023-09-20 09:14:58 +02:00
annotation_data.py refactor: Move formatting logic to formatters 2023-09-20 09:14:58 +02:00
exporter.py refactor: Move formatting logic to formatters 2023-09-20 09:14:58 +02:00
extractor.py docs: Add docstrings 2023-09-20 09:13:04 +02:00
formatter.py refactor: Move formatting logic to formatters 2023-09-20 09:14:58 +02:00