Tidy up the reporting of the disk scan progress on standard error.
[sgt/agedu] / TODO
CommitLineData
70322ae3 1TODO list for agedu
2===================
3
4Before it's non-embarrassingly releasable:
5
70322ae3 6 - sort out the command line syntax
7 * I think there should be a unified --mode / -M for every
8 running mode, possibly without the one-letter option for the
9 diagnostic sorts of things
10 * there should be some configurable options:
11 + range limits on the age display
12 + server address in httpd mode
812e4bf2 13 + HTTP authentication: specify username and/or password, the
14 latter by at least some means which doesn't involve it
15 showing up in "ps"
70322ae3 16
17 - do some configurability for the disk scan
18 * wildcard-based includes and excludes
19 + wildcards can act on the last pathname component or the
20 whole lot
21 + include and exclude can be interleaved; implicit "include
22 *" before any
23 * reinstate filesystem crossing, though not doing so should
24 remain the default
25
70322ae3 26 - work out what to do about atimes on directories
27 * one option is to read them during the scan and reinstate them
28 after each recursion pop. Race-condition prone.
29 * marking them in a distinctive colour in the reports is the
30 other option.
31
32 - make a final decision on the name!
33
34Future directions:
35
36 - run-time configuration in the HTTP server
37 * I think this probably works by having a configuration form, or
38 a link pointing to one, somewhere on the report page. If you
39 want to reconfigure anything, you fill in and submit the form;
40 the web server receives HTTP GET with parameters and a
41 referer, adjusts its internal configuration, and returns an
42 HTTP redirect back to the referring page - which it then
43 re-renders in accordance with the change.
44 * All the same options should have their starting states
45 configurable on the command line too.
46
47 - polish the plain-text output:
48 + do the same formatting as in HTML, by showing files as a
49 single unit and also sorting by size? (Probably the other way
50 up, due to scrolling.)
51 + configurable recursive output depth
52
53 - curses-ish equivalent of the web output
54 + try using xterm 256-colour mode. Can (n)curses handle that? If
55 not, try doing it manually.
56
57 - cross-module:
58 + figure out what to do about scans starting in the root
59 directory!
60 * Currently we end up with a double leading slash on the
61 pathnames, which is ugly, and we also get a zero-length
62 href in between those slashes which means the web interface
63 doesn't let you click back up to the top level at all.
64 * One big problem here is that a lot of the code assumes that
65 you can find the extent of a pathname by searching for
66 "foo" and "foo^A", trusting that anything inside the
67 directory will begin "foo/". So I'd need to consistently
68 fix this everywhere so that a trailing slash is disregarded
69 while doing it, but not actually removed.
70 * The text output gets it all wrong.
71 * The HTML output is fiddly even at the design stage: where
72 would I _ideally_ put the link to click on to get back to
73 /? It's unclear!
74
75 - more flexible running modes
76 + decouple the disk scan from the index building code, so that
77 the former can optionally output in the same format as --dump
78 and the latter can optionally work from input on stdin (having
79 also fixed the --dump format in the process so it's perfectly
80 general). Then we could scan on one machine and transfer the
81 results over the net to another machine where they'd be
82 indexed; in particular, this way the indexing machine could be
83 64-bit even if the machine owning the filesystems was only 32.
8b1f55d6 84 + in the other direction, ability to build a database _and_
85 immediately run one of the ongoing interactive report modes
86 (httpd, curses) in a single invocation would seem handy.
70322ae3 87
88 - portability
89 + between Unices:
90 * autoconf?
91 * configure use of stat64
92 * configure use of /proc/net/tcp
8b1f55d6 93 * configure use of /dev/random
94 * configure use of Linux syscall magic replacing readdir
70322ae3 95 * what do we do elsewhere about _GNU_SOURCE?
8b1f55d6 96 + http://msdn.microsoft.com/en-us/library/ms724290.aspx suggest
97 modern Windowses support atime-equivalents, so a Windows port
98 is possible in principle. Would need to modify the current
99 structure a lot, to abstract away (at least) memory-mapping of
100 files, details of disk scan procedure, networking for httpd,
101 the path separator character (yuck). Unclear what the right UI
102 would be on Windows, too; command-line exactly as now might be
103 considered just a _little_ unfriendly. Or perhaps not.