Remove support for OCaml Calendar v1.
[virt-top.git] / src / README
1 The code is structured into these files:
2
3   utils.mli, utils.ml
4
5     String functions and other small utility functions.  This is
6     included directly into virt_top.ml.
7
8   top.mli, top.ml
9
10     This is the virt-top program.
11
12     The two interesting functions are called 'collect' and 'redraw'.
13
14     'collect' collects all the information about domains, etc.
15
16     'redraw' updates the display on each frame.
17
18     Another interesting function is 'start_up' which handles all
19     start-up stuff, eg. command line arguments, connecting to the
20     hypervisor, enabling curses.
21
22     The function 'main_loop' runs the main loop and has sub-functions
23     to deal with keypresses, help screens and so on.
24
25   opt_gettext.ml
26     A generated file which adds gettext support if ocaml-gettext
27     was found at configure time, or else stubs it out.
28
29   opt_xml.ml
30
31     Any code which needs the optional xml-light library goes
32     in here.  Mainly for parsing domain XML descriptions to get
33     the list of block devices and network interfaces.
34
35     The reason for having it in a separate file is so that we
36     don't depend on xml-light.
37
38   opt_csv.ml
39
40     Any code which needs the optional ocaml-csv library goes
41     in here.  This implements the --csv command line option.
42
43   opt_calendar.ml
44
45     Any code which needs the optional ocaml-calendar library
46     (v2) goes in here.  This implements the --end-time command
47     line option.
48
49   main.ml
50
51     This is just a small bit of code to glue the modules together
52     Top + Opt_xml? + Opt_csv? + Opt_calendar?
53
54 The man-page is generated from the single file:
55
56   virt-top.pod
57
58 which generates (using perldoc) the following:
59
60   virt-top.1
61   virt-top.txt