Suggestion from James Beal: support a '--title' option to override the
[sgt/agedu] / TODO
1 TODO list for agedu
2 ===================
3
4 - flexibility in the HTML report output mode: expose the internal
5 mechanism for configuring the output filenames, and allow the
6 user to request individual files with hyperlinks as if the other
7 files existed. (In particular, functionality of this kind would
8 enable other modes of use like the built-in --cgi mode, without
9 me having to anticipate them in detail.)
10
11 - we could still be using more of the information coming from
12 autoconf. Our config.h is defining a whole bunch of HAVE_FOOs for
13 particular functions (e.g. HAVE_INET_NTOA, HAVE_MEMCHR,
14 HAVE_FNMATCH). We could usefully supply alternatives for some of
15 these functions (e.g. cannibalise the PuTTY wildcard matcher for
16 use in the absence of fnmatch, switch to vanilla truncate() in
17 the absence of ftruncate); where we don't have alternative code,
18 it would perhaps be polite to throw an error at configure time
19 rather than allowing the subsequent build to fail.
20 + however, I don't see anything here that looks very
21 controversial; IIRC it's all in POSIX, for one thing. So more
22 likely this should simply wait until somebody complains.
23
24 - IPv6 support in the HTTP server
25 * of course, Linux magic auth can still work in this context; we
26 merely have to be prepared to open one of /proc/net/tcp or
27 /proc/net/tcp6 as appropriate.
28
29 - run-time configuration in the HTTP server
30 * I think this probably works by having a configuration form, or
31 a link pointing to one, somewhere on the report page. If you
32 want to reconfigure anything, you fill in and submit the form;
33 the web server receives HTTP GET with parameters and a
34 referer, adjusts its internal configuration, and returns an
35 HTTP redirect back to the referring page - which it then
36 re-renders in accordance with the change.
37 * All the same options should have their starting states
38 configurable on the command line too.
39
40 - curses-ish equivalent of the web output
41 + try using xterm 256-colour mode. Can (n)curses handle that? If
42 not, try doing it manually.
43 + I think my current best idea is to bypass ncurses and go
44 straight to terminfo: generate lines of attribute-interleaved
45 text and display them, so we only really need the sequences
46 "go here and display stuff", "scroll up", "scroll down".
47 + Infrastructure work before doing any of this would be to split
48 html.c into two: one part to prepare an abstract data
49 structure describing an HTML-like report (in particular, all
50 the index lookups, percentage calculation, vector arithmetic
51 and line sorting), and another part to generate the literal
52 HTML. Then the former can be reused to produce very similar
53 reports in coloured plain text.
54
55 - abstracting away all the Unix calls so as to enable a full
56 Windows port. We can already do the difficult bit on Windows
57 (scanning the filesystem and retrieving atime-analogues).
58 Everything else is just coding - albeit quite a _lot_ of coding,
59 since the Unix assumptions are woven quite tightly into the
60 current code.
61 + If nothing else, it's unclear what the user interface properly
62 ought to be in a Windows port of agedu. A command-line job
63 exactly like the Unix version might be useful to some people,
64 but would certainly be strange and confusing to others.
65
66 - it might conceivably be useful to support a choice of indexing
67 strategies. The current "continuous index" mechanism' tradeoff of
68 taking O(N log N) space in order to be able to support any age
69 cutoff you like is not going to be ideal for everybody. A second
70 more conventional "discrete index" mechanism which allows the
71 user to specify a number of fixed cutoffs and just indexes each
72 directory on those alone would undoubtedly be a useful thing for
73 large-scale users. This will require considerable thought about
74 how to make the indexers pluggable at both index-generation time
75 and query time.
76 * however, now we have the cut-down version of the continuous
77 index, the space saving is less compelling.
78
79 - A user requested what's essentially a VFS layer: given multiple
80 index files and a map of how they fit into an overall namespace,
81 we should be able to construct the right answers for any query
82 about the resulting aggregated hierarchy by doing at most
83 O(number of indexes * normal number of queries) work.
84
85 - Support for filtering the scan by ownership and permissions. The
86 index data structure can't handle this, so we can't build a
87 single index file admitting multiple subset views; but a user
88 suggested that the scan phase could record information about
89 ownership and permissions in the dump file, and then the indexing
90 phase could filter down to a particular sub-view - which would at
91 least allow the construction of various subset indices from one
92 dump file, without having to redo the full disk scan which is the
93 most time-consuming part of all.