This commit is contained in:
Stuce 2025-11-17 17:42:26 +01:00
parent cc1950aa94
commit f1ff6afdc8
5 changed files with 130 additions and 180 deletions

View file

@ -1,11 +1,26 @@
## TODO
- [x] settings file to not have hardcoded credentials
- [ ] change production credentials
- [x] nix flake with complete module
- [ ] post behavior (simple)
- [ ] post behavior (concurrent protection)
- [ ] check if better http server availible or fastcgi better suited
- [ ] parse args to not hardcode config location
- [ ] cleanup nix flake
- [ ] de-duplicate hard coded strings in flake
## Goals
The goal is to make a service between a m5paper and my radicale (caldav) server.
The service will query the caldav server and modify the data in an easy to digest csv that can be sent back and forth without issues.
## Problems to solve
Caldav format too hard to parse. Prefer to use a high level library. High level library can't run on esp32. Need a third party.
## Justification of choices
The time invested in a proper caldav format parser would take too much time reading a specification, and not enough enjoying/learning programming.
An intermediary could prove interesting as I want to use a self-signed cert to authenticate, which I never did (everything goes trough ldap or authelia behind a reverse proxy atm).
It also forces me to learn enough about caldav to be interesting yet not cumbersome. (The rfc doc is very long, and does feel like a chore to read).
@ -17,17 +32,19 @@ Allows a call to fetch the specified caldav (specified in the config, not via a
Nix will be used as it is planned to be deployed on nixos like the rest of my web infrastructure (simply the best to not get overwhelmed by the amount of tweaking I do)
## client facing interface specification
GET / -> gets 10 next tasks of calendar data as a csv containing an id, a boolean value (0 or 1), and a string (terminated by a \n, no carriage return windows bullshit)
POST /id -> checks the item -> returns same as GET /
## parent server facing interface specification
GET -> find a way to get the list of VTODO on the specified calendar.
POST -> find post the updated item
## internal logic
Filter requests by due date and truncate them.
Update an item with respecting repeating events
parse to csv
update list according to csv
conflict management policy