Commit graph

13 commits

Author SHA1 Message Date
c2aec7add6
feat: Notify formatters if formatting first entry
This allows headers to be created by a formatter, which will
*only* be added to the very first entry created and not to
each entry. Currently for example this is used to create
a csv header but not for each document in turn.
2024-06-12 11:45:35 +02:00
b5c081fbf3
feat: Change count display to lead with count
The actual count is now the first item on each line,
to make it easier to sort, strip, delete and compare
afterwards.
2024-06-12 11:16:13 +02:00
333bd279b9
fix: Fix test fixtures for new annotation structure 2024-01-24 11:15:10 +01:00
765de505bb
refactor: Remove AnnotatedDocument class
The AnnotatedDocument class was, essentially, a simple tuple of a document
and a list of annotations. While not bad in a vacuum, it is unwieldy and
passing this around instead of a document, annotations, or both where
necessary is more restrictive and frankly unnecessary.

This commit removes the data class and any instances of its use. Instead,
we now pass the individual components around to anything that needs them.
This also frees us up to pass only annotations around for example.

We also do not iterate through the selected papis documents to work on
in each exporter anymore (since we only pass a single document), but
in the main function itself. This leads to less duplication and makes
the overall run function the overall single source of iteration through
selected documents. Everything else only knows about a single document -
the one it is operating on - which seems much neater.

For now, it does not change much, but should make later work on extra
exporters or extractors easier.
2024-01-20 16:36:24 +01:00
5cd5a05062
chore: Fix black fmt
Some checks failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/static_analysis Pipeline was successful
2023-10-17 22:07:09 +02:00
c9736a5f32
test: Add tests for formatter sad paths 2023-10-12 19:27:16 +02:00
1e29642cba
test: Fix formatting and annotation tests 2023-09-22 21:49:52 +02:00
4eb983d9e3
refactor: Move templating to separate file 2023-09-20 09:12:59 +02:00
e56f014136
Add formatting style Markdown 2023-08-31 21:40:17 +02:00
20873e6ef8
Change annotation color to simple rgb tuple
Some checks failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/static_analysis Pipeline was successful
2023-08-29 22:23:52 +02:00
256117d451
Add mustache templating
Added mustache templating engine to be able to provide custom
formatting strings.
2023-08-29 13:49:22 +02:00
b564ab4792
Add continuous integration pipeline
Some checks failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/static_analysis Pipeline was successful
Added static analysis (lint, type checking) to be done on each push, and
testing to be done on each master branch commit.
2023-08-29 12:15:10 +02:00
a22cc635b2
initial commit 2023-08-28 10:28:06 +02:00