70322ae3 |
1 | TODO list for agedu |
2 | =================== |
3 | |
4 | Before it's non-embarrassingly releasable: |
5 | |
f2e52893 |
6 | - more flexible running modes |
f2e52893 |
7 | + at least some ability to chain actions within the same run: |
8 | "agedu -s dirname -w" would seem handy. |
70322ae3 |
9 | |
9d0b9596 |
10 | - work out what to do about atimes on directories in the absence of |
11 | the Linux syscall magic |
70322ae3 |
12 | * one option is to read them during the scan and reinstate them |
13 | after each recursion pop. Race-condition prone. |
9d0b9596 |
14 | * marking them in a distinctive colour in the reports is another |
15 | option. |
16 | * a third option is simply to ignore space taken up by |
17 | directories in the first place; inaccurate but terribly simple. |
18 | * incidentally, sometimes open(...,O_NOATIME) will fail, and |
19 | then we have to fall back to ordinary open. Be prepared to do |
20 | this, which probably means getting rid of the icky macro |
21 | hackery in du.c and turning it into a more sensible run-time |
22 | abstraction layer. |
70322ae3 |
23 | |
f2e52893 |
24 | - polish the plain-text output to make it look more like du |
25 | + configurable recursive output depth |
26 | + show the right bits last |
27 | |
f2e52893 |
28 | - cross-Unix portability: |
29 | + use autoconf |
30 | * configure use of stat64 |
31 | * configure use of /proc/net/tcp |
32 | * configure use of /dev/random |
33 | * configure use of Linux syscall magic replacing readdir |
34 | + later glibcs have fdopendir, hooray! So we can use that |
35 | too, if it's available and O_NOATIME is too. |
36 | * what do we do elsewhere about _GNU_SOURCE? |
37 | |
f2e52893 |
38 | - man page, licence. |
9d0b9596 |
39 | |
cfe942fb |
40 | Future possibilities: |
70322ae3 |
41 | |
1e8d78b9 |
42 | - IPv6 support in the HTTP server |
cfe942fb |
43 | * of course, Linux magic auth can still work in this context; we |
44 | merely have to be prepared to open one of /proc/net/tcp or |
45 | /proc/net/tcp6 as appropriate. |
1e8d78b9 |
46 | |
70322ae3 |
47 | - run-time configuration in the HTTP server |
48 | * I think this probably works by having a configuration form, or |
49 | a link pointing to one, somewhere on the report page. If you |
50 | want to reconfigure anything, you fill in and submit the form; |
51 | the web server receives HTTP GET with parameters and a |
52 | referer, adjusts its internal configuration, and returns an |
53 | HTTP redirect back to the referring page - which it then |
54 | re-renders in accordance with the change. |
55 | * All the same options should have their starting states |
56 | configurable on the command line too. |
57 | |
70322ae3 |
58 | - curses-ish equivalent of the web output |
59 | + try using xterm 256-colour mode. Can (n)curses handle that? If |
60 | not, try doing it manually. |
f2e52893 |
61 | + I think my current best idea is to bypass ncurses and go |
62 | straight to terminfo: generate lines of attribute-interleaved |
63 | text and display them, so we only really need the sequences |
64 | "go here and display stuff", "scroll up", "scroll down". |
65 | + I think the attribute-interleaved text might be possible to do |
66 | cunningly, as well: we autodetect a basically VT-style |
67 | terminal, and add 256-colour sequences on the end. So, for |
68 | instance, we might set ANSI-yellow foreground, set ANSI-red |
69 | background, _then_ set both foreground and background to the |
70 | appropriate xterm 256-colour, and then display some |
71 | appropriate character which would have given the right blend |
72 | of the ANSI-16 fore and background colours. Then the same |
73 | display code should gracefully degrade in the face of a |
74 | terminal which doesn't support xterm-256. |
75 | * current best plan is to simulate the xterm-256 shading from |
76 | 0/5 to 5/5 by doing space, colon and hash in colour A on |
77 | colour B background, then hash, colon and space in B on A |
78 | background. |
79 | + Infrastructure work before doing any of this would be to split |
80 | html.c into two: one part to prepare an abstract data |
81 | structure describing an HTML-like report (in particular, all |
82 | the index lookups, percentage calculation, vector arithmetic |
83 | and line sorting), and another part to generate the literal |
84 | HTML. Then the former can be reused to produce very similar |
85 | reports in coloured plain text. |
70322ae3 |
86 | |
f2e52893 |
87 | - http://msdn.microsoft.com/en-us/library/ms724290.aspx suggest |
88 | modern Windowses support atime-equivalents, so a Windows port is |
373a02e5 |
89 | possible in principle. |
90 | + For a full Windows port, would need to modify the current |
91 | structure a lot, to abstract away (at least) memory-mapping of |
92 | files, details of disk scan procedure, networking for httpd. |
93 | Unclear what the right UI would be on Windows, too; |
94 | command-line exactly as now might be considered just a |
95 | _little_ unfriendly. Or perhaps not. |
96 | + Alternatively, a much easier approach would be to write a |
97 | Windows version of just the --scan-dump mode, which does a |
98 | filesystem scan via the Windows API and generates a valid |
99 | agedu dump file on standard output. Then one would simply feed |
100 | that over the network connection of one's choice to the rest |
101 | of agedu running on Unix as usual. |