Be willing to follow a symlink if the user specifies one as the root
[sgt/agedu] / TODO
CommitLineData
70322ae3 1TODO list for agedu
2===================
3
50e82fdc 4 - we could still be using more of the information coming from
5 autoconf. Our config.h is defining a whole bunch of HAVE_FOOs for
6 particular functions (e.g. HAVE_INET_NTOA, HAVE_MEMCHR,
7 HAVE_FNMATCH). We could usefully supply alternatives for some of
8 these functions (e.g. cannibalise the PuTTY wildcard matcher for
9 use in the absence of fnmatch, switch to vanilla truncate() in
10 the absence of ftruncate); where we don't have alternative code,
11 it would perhaps be polite to throw an error at configure time
12 rather than allowing the subsequent build to fail.
13 + however, I don't see anything here that looks very
14 controversial; IIRC it's all in POSIX, for one thing. So more
15 likely this should simply wait until somebody complains.
16
1e8d78b9 17 - IPv6 support in the HTTP server
cfe942fb 18 * of course, Linux magic auth can still work in this context; we
19 merely have to be prepared to open one of /proc/net/tcp or
20 /proc/net/tcp6 as appropriate.
1e8d78b9 21
70322ae3 22 - run-time configuration in the HTTP server
23 * I think this probably works by having a configuration form, or
24 a link pointing to one, somewhere on the report page. If you
25 want to reconfigure anything, you fill in and submit the form;
26 the web server receives HTTP GET with parameters and a
27 referer, adjusts its internal configuration, and returns an
28 HTTP redirect back to the referring page - which it then
29 re-renders in accordance with the change.
30 * All the same options should have their starting states
31 configurable on the command line too.
32
70322ae3 33 - curses-ish equivalent of the web output
34 + try using xterm 256-colour mode. Can (n)curses handle that? If
35 not, try doing it manually.
f2e52893 36 + I think my current best idea is to bypass ncurses and go
37 straight to terminfo: generate lines of attribute-interleaved
38 text and display them, so we only really need the sequences
39 "go here and display stuff", "scroll up", "scroll down".
f2e52893 40 + Infrastructure work before doing any of this would be to split
41 html.c into two: one part to prepare an abstract data
42 structure describing an HTML-like report (in particular, all
43 the index lookups, percentage calculation, vector arithmetic
44 and line sorting), and another part to generate the literal
45 HTML. Then the former can be reused to produce very similar
46 reports in coloured plain text.
70322ae3 47
f2e52893 48 - http://msdn.microsoft.com/en-us/library/ms724290.aspx suggest
49 modern Windowses support atime-equivalents, so a Windows port is
373a02e5 50 possible in principle.
51 + For a full Windows port, would need to modify the current
52 structure a lot, to abstract away (at least) memory-mapping of
53 files, details of disk scan procedure, networking for httpd.
54 Unclear what the right UI would be on Windows, too;
55 command-line exactly as now might be considered just a
56 _little_ unfriendly. Or perhaps not.
b28bc23d 57 * Disk scan procedure: the FindFirstFile / FindNextFile
58 functions to scan a directory automatically return the file
59 times along with the filenames, so there's no need to stat
60 them later. Would want to fiddle the shape of the
61 abstraction layer to reflect this.
373a02e5 62 + Alternatively, a much easier approach would be to write a
63 Windows version of just the --scan-dump mode, which does a
64 filesystem scan via the Windows API and generates a valid
65 agedu dump file on standard output. Then one would simply feed
66 that over the network connection of one's choice to the rest
67 of agedu running on Unix as usual.
14601b5d 68
69 - it might conceivably be useful to support a choice of indexing
70 strategies. The current "continuous index" mechanism' tradeoff of
71 taking O(N log N) space in order to be able to support any age
72 cutoff you like is not going to be ideal for everybody. A second
73 more conventional "discrete index" mechanism which allows the
74 user to specify a number of fixed cutoffs and just indexes each
75 directory on those alone would undoubtedly be a useful thing for
76 large-scale users. This will require considerable thought about
77 how to make the indexers pluggable at both index-generation time
78 and query time.
79 * however, now we have the cut-down version of the continuous
522edd92 80 index, the space saving is less compelling.