* Add pull command.
* Add publish command.
* Enforce start's old semantics.
* Add pull test cases:
- Pull with no events anywhere
- Pull with one event on mobilizon and none on the db
- Pull with one event on mobilizon and another on the db
- Pull with one event on mobilizon and the same event on the db
* Add pull tests:
- Sequence: pull->start
- Sequence: start->pull
- Sequence: pull->new event on mobilizon -> pull
* manifest.scm: Add cloc.
* query: read: Prefer return list to generators.
* tests: pull: Actually test that models are written to the DB.
* added timezone fixture
* Make output dependent on local timezone.
* Fix non deterministic behavior in html to text conversion.
Co-authored-by: Giacomo Leidi <goodoldpaul@autistici.org>
* add column last_update_time
* save last_update_time in event db record
* use id + updatedAt for comparison instead of mobilizon_id, this will treat updated events like new ones
* rework event selection/comparison to include unpublished with updates to ones need to be saved
* added update for unpublished events
* tests: test_update: Add create_unpublished_events tests.
* Move `MobilizonEvent.to_model` to `storage.query`
* Move `MobilizonEvent.from_model` to `storage.query`
* Move `MobilizonEvent.compute_status` to `storage.query`
* Move `publishers.exception.EventNotFound` to `storage.query.exceptions`
Now the inspect command can display informations about
different kind of objects including events and publications.
This patch also changes the cli to output columnar values
suitable for further processing with standard Unix
tool, such as awk.
$ mobilizon-reshare.sh inspect publication -s completed | awk '{ print }' | sort | uniq -c
[2021-12-01 01:05:55,321] [20] [INFO] Tortoise-ORM shutdown
2 mastodon
2 telegram
2 zulip
* added basic recap feature (no error handling)
* introduced abstractpublication
* extracted base reports
* added error report to recap
* added test
* added docs
* implemented publisher and formatter
* fixed API for recap
* removed redundant config validation
* added config sample
* added mobilizon link to templates
* added link format to telegram
* added mobilizon link to recap
* fixed config and emoji
* refactored commands
* added help messages
* improved format