+# vim:sw=2:sts=2:
+- [ ] Output formats:
+ - [x] text long
+ - [x] text short
+ - [ ] HTML
+ - [ ] JSON
- [ ] Convert to Typed Racket
- requires: build executable (otherwise too slow)
-- [ ] Build executable
- - requires: fix of "collection not found" when executing the built executable
+- [x] Build executable
+ Implies fix of "collection not found" when executing the built executable
outside the source directory:
collection-path: collection not found
- [ ] Support redirects
- should permanent redirects update the feed somehow?
- [ ] Support time ranges (i.e. reading the timeline between given time points)
-- [ ] Implement rfc3339->epoch
+- [x] Implement rfc3339->epoch
- [x] Remove dependency on rfc3339-old
- [x] remove dependency on http-client
- [ ] optional text wrap
Looks like a better CLI parser than "racket/cmdline": https://docs.racket-lang.org/natural-cli/
But it is no longer necessary now that I've figured out how to chain (command-line ..) calls.
- [ ] Suport immutable timelines
- - store individual messages (possibly in something like DBM or SQLite)
+ - store individual messages
+ - where?
+ - something like DBM or SQLite - faster
+ - filesystem - transparent, easily published - probably best
+ - [ ] block(chain/tree) of twtxts
+ - distributed twtxt.db
+ - each twtxt.txt is a ledger
+ - peers can verify states of ledgers
+ - peers can publish known nick->url mappings
+ - peers can vote on nick->url mappings
+ - we could break time periods into blocks
+ - how to handle the facts that many(most?) twtxt are unseen by peers
+ - longest X wins?
+- [ ] Peer discovery
+ requires:
+ - parse mentions
+ - parse following
+ rough sketch from late 2019:
+
+ let read file =
+ ...
+ let write file peers =
+ ...
+ let fetch peer =
+ (* Fetch could mean either or both of:
+ * - fetch peer's we-are-twtxt.txt
+ * - fetch peer's twtxt.txt and extract mentioned peer URIs
+ * *)
+ ...
+ let test peers =
+ ...
+ let rec discover peers_old =
+ let peers_all =
+ Set.fold peers_old ~init:peers_old ~f:(fun peers p ->
+ match fetch p with
+ | Error _ ->
+ (* TODO: Should p be moved to down set here? *)
+ log_warning ...;
+ peers
+ | Ok peers_fetched ->
+ Set.union peers peers_fetched
+ )
+ in
+ if Set.empty (Set.diff peers_old peers_all) then
+ peers_all
+ else
+ discover peers_all
+ let rec loop interval peers_old =
+ let peers_all = discover peers_old in
+ let (peers_up, peers_down) = test peers_all in
+ write "peers-all.txt" peers_all;
+ write "peers-up.txt" peers_up;
+ write "peers-down.txt" peers_down;
+ sleep interval;
+ loop interval peers_all
+ let () =
+ loop (Sys.argv.(1)) (read "peers-all.txt")