]> git.tuebingen.mpg.de Git - adu.git/blob - select.ggo
Make the array of summary comparators local.
[adu.git] / select.ggo
1
2 option "uid" u
3 #~~~~~~~~~~~~~
4 "user id(s) to take into account"
5 string typestr="uid_spec"
6 optional
7 details="
8         An uid specifier may be a single number, or a range of uids.
9         Example:
10
11         --uid 42    # only consider uid 42
12         --uid 42-   # only consider uids greater or equal than 42
13         --uid 23-42 # only consider uids between 23 and 42, inclusively.
14         --uid 23-42,666-777,88 # consider uids 23-42, 666-777 and 88.
15 "
16
17 option "limit" L
18 #~~~~~~~~~~~~~~~
19 "Limit output"
20 int  typestr="num"
21 default="-1"
22 optional
23 details="
24         Only print num lines of output. If negative (the default),
25         print all lines.
26 "
27
28 option "no-headers" -
29 #~~~~~~~~~~~~~~~~~~~~
30 "supress descriptions for listings/summaries"
31 flag off
32 details="
33         This is mostly useful to feed the output of adu to scripts.
34 "
35
36 option "select-mode" m
37 #~~~~~~~~~~~~~~~~~~~~~
38 "How to print the results of the query"
39 enum typestr="<key>"
40 values="global_list","global_summary","user_list","user_summary"
41 default="global_list"
42 optional
43 details="
44         global_list: List of directories, regardless of owner.
45         global_summary: Only print totals.
46         user_list: Print a list for each admissible uid.
47         user_summary Print totals for each admissible uid.
48 "
49
50 option "list-sort" s
51 #~~~~~~~~~~~~~~~~~~~
52 "how to sort the user list or the global list"
53 enum typestr="<key>"
54 values="size","file_count"
55 default="size"
56 optional
57 details="
58         This option is ignored if select-mode is neither \"user_list\", nor
59         \"global_list\".
60 "
61
62 option "output" o
63 #~~~~~~~~~~~~~~~~
64 "file to write output to"
65 string typestr="<path>"
66 optional
67 default="-"
68 details="
69         If empty, or not given, use stdout.
70 "
71
72 option "user-summary-sort" -
73 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
74 "how to sort the user-summary"
75 enum typestr="col_spec"
76 values="name","uid","dir_count","file_count","size"
77 default="size"
78 optional
79 details="
80         It is enough to specify the first letter of the column specifier,
81         e.g. \"--user-summary-sort f\" sorts by file count.
82 "
83
84 option "print-base-dir" -
85 #~~~~~~~~~~~~~~~~~~~~~~~~
86 "whether to include the base-dir in the output"
87 flag off
88 details="
89         If this flag is given, all directories printed are prefixed
90         with the base directory. The default is to print paths relative
91         to the base dir.
92 "
93
94 ########################
95 section "Format strings"
96 ########################
97
98 option "global-list-format" -
99 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100 "How to format the global list"
101 string typestr="<format>"
102 default="%(size:r:8) %(files:r:8) %(dirname)\n"
103 details="
104         size: Total size of all files
105         files: The number of files
106         dirname: The name of the directory
107 "
108
109 optional
110 option "global-summary-format" -
111 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112 "How to format the global summary"
113 string typestr="<format>"
114 default="#directories: %(dirs), #files: %(files), size: %(size)\n\n"
115 details="
116         dirs: The number of directories
117         files: The number of files
118         size: Total size of all files
119 "
120 optional
121
122 option "user-list-format" -
123 #~~~~~~~~~~~~~~~~~~~~~~~~~~
124 "How to format the user list"
125 string typestr="<format>"
126 default="%(size:r:5) %(files:r:5) %(dirname)\n"
127 details="
128         pw_name: The user name
129         uid: The user id
130         files: The number of files
131         size: size of all files in that directory
132         dirname: The name of the directory
133 "
134 optional
135 option "user-summary-format" -
136 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137 "How to format the user summary"
138 string typestr="<format>"
139 default="%(pw_name:l:16) %(uid:r:5) %(dirs:r:5) %(files:r:5) %(size:r:5)\n"
140 details="
141         pw_name: The user name
142         uid: The user id
143         dirs: The number of directories
144         files: The number of files
145         size: Total size of all files
146 "
147 optional