Last change
on this file since 21 was 17, checked in by fox, 3 years ago |
New subcommand 'recent'. Tidy last.ml
|
File size:
1018 bytes
|
Rev | Line | |
---|
[17] | 1 | open Logarion
|
---|
| 2 | module FS = File_store
|
---|
| 3 | module A = Archive
|
---|
| 4 |
|
---|
| 5 | open Cmdliner
|
---|
| 6 | let term =
|
---|
| 7 | let recurse = Arg.(value & flag & info ["R"] ~doc:"recurse, include subdirs") in
|
---|
| 8 | let reverse = Arg.(value & flag & info ["r"] ~doc:"reverse order") in
|
---|
| 9 | let paths = Arg.(value & flag & info ["p"] ~doc:"show file paths") in
|
---|
| 10 | let number = Arg.(value & opt (some int) (Some 10) & info ["n"]
|
---|
| 11 | ~docv:"number" ~doc:"number of entries to list") in
|
---|
| 12 | let authed = Arg.(value & opt (some string) None & info ["authored"]
|
---|
| 13 | ~docv:"comma-separated names" ~doc:"texts by authors") in
|
---|
| 14 | let topics = Arg.(value & opt (some string) None & info ["topics"]
|
---|
| 15 | ~docv:"comma-separated topics" ~doc:"texts with topics") in
|
---|
| 16 | Term.(const Listing.listing $ recurse $ (const true) $ reverse $ number $ paths $ authed $ topics),
|
---|
| 17 | Term.info "recent" ~doc:"list recent texts" ~man:[ `S "DESCRIPTION";
|
---|
| 18 | `P "List header information of most recent texts. If -R is used, list header
|
---|
| 19 | information for texts found in subdirectories too, along with their filepaths" ]
|
---|
Note:
See
TracBrowser
for help on using the repository browser.