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 | |
70322ae3 |
40 | Future directions: |
41 | |
1e8d78b9 |
42 | - IPv6 support in the HTTP server |
43 | |
70322ae3 |
44 | - run-time configuration in the HTTP server |
45 | * I think this probably works by having a configuration form, or |
46 | a link pointing to one, somewhere on the report page. If you |
47 | want to reconfigure anything, you fill in and submit the form; |
48 | the web server receives HTTP GET with parameters and a |
49 | referer, adjusts its internal configuration, and returns an |
50 | HTTP redirect back to the referring page - which it then |
51 | re-renders in accordance with the change. |
52 | * All the same options should have their starting states |
53 | configurable on the command line too. |
54 | |
70322ae3 |
55 | - curses-ish equivalent of the web output |
56 | + try using xterm 256-colour mode. Can (n)curses handle that? If |
57 | not, try doing it manually. |
f2e52893 |
58 | + I think my current best idea is to bypass ncurses and go |
59 | straight to terminfo: generate lines of attribute-interleaved |
60 | text and display them, so we only really need the sequences |
61 | "go here and display stuff", "scroll up", "scroll down". |
62 | + I think the attribute-interleaved text might be possible to do |
63 | cunningly, as well: we autodetect a basically VT-style |
64 | terminal, and add 256-colour sequences on the end. So, for |
65 | instance, we might set ANSI-yellow foreground, set ANSI-red |
66 | background, _then_ set both foreground and background to the |
67 | appropriate xterm 256-colour, and then display some |
68 | appropriate character which would have given the right blend |
69 | of the ANSI-16 fore and background colours. Then the same |
70 | display code should gracefully degrade in the face of a |
71 | terminal which doesn't support xterm-256. |
72 | * current best plan is to simulate the xterm-256 shading from |
73 | 0/5 to 5/5 by doing space, colon and hash in colour A on |
74 | colour B background, then hash, colon and space in B on A |
75 | background. |
76 | + Infrastructure work before doing any of this would be to split |
77 | html.c into two: one part to prepare an abstract data |
78 | structure describing an HTML-like report (in particular, all |
79 | the index lookups, percentage calculation, vector arithmetic |
80 | and line sorting), and another part to generate the literal |
81 | HTML. Then the former can be reused to produce very similar |
82 | reports in coloured plain text. |
70322ae3 |
83 | |
f2e52893 |
84 | - http://msdn.microsoft.com/en-us/library/ms724290.aspx suggest |
85 | modern Windowses support atime-equivalents, so a Windows port is |
373a02e5 |
86 | possible in principle. |
87 | + For a full Windows port, would need to modify the current |
88 | structure a lot, to abstract away (at least) memory-mapping of |
89 | files, details of disk scan procedure, networking for httpd. |
90 | Unclear what the right UI would be on Windows, too; |
91 | command-line exactly as now might be considered just a |
92 | _little_ unfriendly. Or perhaps not. |
93 | + Alternatively, a much easier approach would be to write a |
94 | Windows version of just the --scan-dump mode, which does a |
95 | filesystem scan via the Windows API and generates a valid |
96 | agedu dump file on standard output. Then one would simply feed |
97 | that over the network connection of one's choice to the rest |
98 | of agedu running on Unix as usual. |