Commit graph

7 commits

Author SHA1 Message Date
Profpatsch
8c4730c433 chore(users/Profpatsch/*): more cabal maintenance
Change-Id: Ib1714abce2815873eb50dbeac088e812fa9098ab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8686
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2023-07-13 23:03:09 +00:00
Profpatsch
f627ee84b3 feat(users/Profpatsch/mailbox-org): add simple request json example
Adds a simple json quasiquoter thingy.

Json can be sent to the `/mailfilter?action=update` endpoint.

Change-Id: Iba80c2ab69178e431519933c4a01cd68aaa9f637
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7839
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-01-15 20:36:33 +00:00
Profpatsch
1a18c25d81 feat(users/Profpatsch/mailbox-org): accept tools in main
Move the tool parsers down. Get `pass` from the tools. Add some
helpers for running tools.

Change-Id: Id2c47be58417faf434966eaae81e4944372f1bd5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7838
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-15 20:36:33 +00:00
Profpatsch
48686ca0d6 feat(users/Profpatsch/mailbox-org): Set up passing of sieve-test
Implement a parser for tools, and instantiate once for
arglib-netencode arguments (parsed by the new netencode parser) and
one just from the PATH for testing from the repl.

Change-Id: Id0cf264100123a87700880c7230d68426224fd0d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7798
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-08 23:10:28 +00:00
Profpatsch
30ec1adce8 feat(users/Profpatsch/mailbox-org): prepare adjusting filter config
In the end, it should be possible to write a single config which is
pushed to the service to steer which emails arrive.

This implements some helper functions and some more endpoints.

We implement Semigroup/Monoid for labelled tuples.

Change-Id: I48bfd311e4a7bba5bc08a9681d823a6a7d5175a8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7727
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-05 22:10:20 +00:00
Profpatsch
1b003db725 feat(users/Profpatsch/mailbox-org): list & update filters
One step closer towards a declarative description of filters.
In the end, the filters should be updated by their `rulename` field.

This implements a simple scheme where we list all filters, parse some
of their fields, use those fields to determine whether we want to
change the filters, and then only update the filters where we changed
something.

Unfortunately, we can only update the filters one-by-one (a common
mistake in APIs).

Pulls in some modules for Json parsing that I like to use, and an
`ErrorTree` abstraction over `Error` and `Data.Tree`.

Change-Id: Iea45d5aa0a3fee7ec570f06d3e77009769091274
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7720
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-01-02 02:14:55 +00:00
Profpatsch
7168cb0ed3 feat(users/Profpatsch/mailbox-org): init
A smol little tool to talk to the mailbox.org backend. This is handy
for eventually setting stuff like email filters. Their API is absolute
crap, but we’ll deal with it.

Updates the prelude & adds some pretty printing helpers.

Change-Id: Ie3688f8ee1d7f23c65bcf4bfecc00c8269dae788
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7717
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-01 22:02:25 +00:00