Commit | Line | Data |
---|---|---|
a78e83b8 | 1 | # vim:sw=2:sts=2: |
f2ecd14e SK |
2 | - [ ] Output formats: |
3 | - [x] text long | |
4 | - [x] text short | |
5 | - [ ] HTML | |
6 | - [ ] JSON | |
33cf2848 SK |
7 | - [ ] Convert to Typed Racket |
8 | - requires: build executable (otherwise too slow) | |
3c9c8266 SK |
9 | - [x] Build executable |
10 | Implies fix of "collection not found" when executing the built executable | |
33cf2848 SK |
11 | outside the source directory: |
12 | ||
13 | collection-path: collection not found | |
14 | collection: "tt" | |
15 | in collection directories: | |
16 | context...: | |
17 | /usr/share/racket/collects/racket/private/collect.rkt:11:53: fail | |
18 | /usr/share/racket/collects/setup/getinfo.rkt:17:0: get-info | |
19 | /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3 | |
20 | /usr/share/racket/collects/racket/cmdline.rkt:191:51 | |
21 | '|#%mzc:p | |
22 | ||
d8b0e8b4 SK |
23 | - [ ] Support redirects |
24 | - should permanent redirects update the feed somehow? | |
c3d5dd06 | 25 | - [ ] Support time ranges (i.e. reading the timeline between given time points) |
3877a0c4 | 26 | - [x] Implement rfc3339->epoch |
c2a29873 | 27 | - [x] Remove dependency on rfc3339-old |
9c464d95 | 28 | - [x] remove dependency on http-client |
d96fa613 SK |
29 | - [ ] optional text wrap |
30 | - [ ] write | |
4214c0f3 | 31 | - [x] caching (use cache by default, unless explicitly asked for update) |
d96fa613 SK |
32 | - [x] value --> cache |
33 | - [x] value <-- cache | |
24f1f64b | 34 | requires: d command |
d96fa613 SK |
35 | - [ ] timeline limits |
36 | - [ ] feed set operations (perhaps better done externally?) | |
37 | - [ ] timeline as a result of a query (feed set op + filter expressions) | |
38 | - [ ] named timelines | |
39 | - [ ] config files | |
40 | - [ ] parse "following" from feed | |
41 | - following = <nick> <uri> | |
42 | - [ ] parse mentions: | |
43 | - @<source.nick source.url> | @<source.url> | |
44 | - [ ] highlight mentions | |
45 | - [ ] filter on mentions | |
46 | - [ ] highlight hashtags | |
47 | - [ ] filter on hashtags | |
48 | - [ ] hashtags as channels? initial hashtag special? | |
49 | - [ ] query language | |
50 | - [ ] console logger colors by level ('error) | |
51 | - [ ] file logger ('debug) | |
24f1f64b SK |
52 | - [-] commands: |
53 | - [x] r | read | |
d96fa613 | 54 | - see timeline ops above |
24f1f64b | 55 | - [ ] w | write |
d96fa613 SK |
56 | - arg or stdin |
57 | - nick expand to URI | |
24f1f64b | 58 | - [ ] q | query |
d96fa613 SK |
59 | - see timeline ops above |
60 | - see hashtag and channels above | |
4214c0f3 | 61 | - [x] d | download |
3a4b2233 | 62 | - [x] u | upload |
d96fa613 | 63 | - calls user-configured command to upload user's own feed file to their server |
24f1f64b SK |
64 | Looks like a better CLI parser than "racket/cmdline": https://docs.racket-lang.org/natural-cli/ |
65 | But it is no longer necessary now that I've figured out how to chain (command-line ..) calls. | |
3c3cd6cc | 66 | - [ ] Suport immutable timelines |
8a2d166a SK |
67 | - store individual messages |
68 | - where? | |
69 | - something like DBM or SQLite - faster | |
70 | - filesystem - transparent, easily published - probably best | |
71 | - [ ] block(chain/tree) of twtxts | |
72 | - distributed twtxt.db | |
73 | - each twtxt.txt is a ledger | |
74 | - peers can verify states of ledgers | |
75 | - peers can publish known nick->url mappings | |
76 | - peers can vote on nick->url mappings | |
77 | - we could break time periods into blocks | |
78 | - how to handle the facts that many(most?) twtxt are unseen by peers | |
79 | - longest X wins? | |
c91a1ca9 SK |
80 | - [ ] Peer discovery |
81 | requires: | |
82 | - parse mentions | |
83 | - parse following | |
84 | rough sketch from late 2019: | |
85 | ||
86 | let read file = | |
87 | ... | |
88 | let write file peers = | |
89 | ... | |
90 | let fetch peer = | |
91 | (* Fetch could mean either or both of: | |
92 | * - fetch peer's we-are-twtxt.txt | |
93 | * - fetch peer's twtxt.txt and extract mentioned peer URIs | |
94 | * *) | |
95 | ... | |
96 | let test peers = | |
97 | ... | |
98 | let rec discover peers_old = | |
99 | let peers_all = | |
100 | Set.fold peers_old ~init:peers_old ~f:(fun peers p -> | |
101 | match fetch p with | |
102 | | Error _ -> | |
103 | (* TODO: Should p be moved to down set here? *) | |
104 | log_warning ...; | |
105 | peers | |
106 | | Ok peers_fetched -> | |
107 | Set.union peers peers_fetched | |
108 | ) | |
109 | in | |
110 | if Set.empty (Set.diff peers_old peers_all) then | |
111 | peers_all | |
112 | else | |
113 | discover peers_all | |
114 | let rec loop interval peers_old = | |
115 | let peers_all = discover peers_old in | |
116 | let (peers_up, peers_down) = test peers_all in | |
117 | write "peers-all.txt" peers_all; | |
118 | write "peers-up.txt" peers_up; | |
119 | write "peers-down.txt" peers_down; | |
120 | sleep interval; | |
121 | loop interval peers_all | |
122 | let () = | |
123 | loop (Sys.argv.(1)) (read "peers-all.txt") |