Use the new formating code to print the user summary.
[adu.git] / select.ggo
index a1de3a910d7cb6dc045d76011417861a3c02a128..1093d46a7e2ba2ecd1870ed63853f7c6a1432420 100644 (file)
@@ -95,3 +95,80 @@ details="
        format.
 "
 
+
+option "user-summary-sort" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"how to sort the user-summary"
+enum typestr="col_spec"
+values="name","uid","dir_count","file_count","size"
+default="size"
+optional
+details="
+       It is enough to specify the first letter of the column specifier,
+       e.g. \"--user-summary-sort f\" sorts by file count.
+"
+
+option "no-user-summary" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"do not print the user summary table"
+flag off
+
+
+option "user-list" -
+#~~~~~~~~~~~~~~~~~~~
+"how to print per-user directory listings"
+enum typestr="which"
+values="size","file_count","both","none"
+default="both"
+optional
+details="
+       Similar to the global directory listings mentioned above,
+       adu can print two directory listings per user. This option
+       controls which of the these should be printed.
+"
+option "no-global-summary" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"do not print the summary line"
+flag off
+
+option "global-list" -
+#~~~~~~~~~~~~~~~~~~~~~
+"how to print global directory listings"
+enum typestr="which"
+values="size","file_count","both","none"
+default="both"
+optional
+details="
+       By default adu prints two global directory listings: The
+       first prints the directory names ordered by the sum of the
+       sizes of the contained files while the second listing prints
+       them sorted by the number of files. This option can be used
+       to print only one or neither of these two listings.
+"
+option "print-base-dir" -
+#~~~~~~~~~~~~~~~~~~~~~~~~
+"whether to include the base-dir in the output"
+flag off
+details="
+       If this flag is given, all directories printed are prefixed
+       with the base directory. The default is to print paths relative
+       to the base dir.
+"
+
+########################
+section "Format strings"
+########################
+
+option "user-summary-format" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"How to format the user summary"
+string typestr="<format>"
+default="%(pw_name:l:16) %(uid:r:5) %(dirs:r:5) %(files:r:5) %(size:r:5)\n"
+details="
+       pw_name: The user name
+       uid: The user id
+       dirs: The number of directories
+       files: The number of files
+       size: Total size of all files
+"
+optional