Last change
on this file since 47 was 23, checked in by fox, 2 years ago |
Directory parameter for listing, defaults to txtdir
|
File size:
1.1 KB
|
Line | |
---|
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 | let dir = Arg.(value & pos 0 string "" & info []
|
---|
17 | ~docv:"directory to index") in
|
---|
18 | Term.(const Listing.listing $ recurse $ (const true) $ reverse $ number $ paths $ authed $ topics $ dir),
|
---|
19 | Term.info "recent" ~doc:"list recent texts" ~man:[ `S "DESCRIPTION";
|
---|
20 | `P "List header information of most recent texts. If -R is used, list header
|
---|
21 | information for texts found in subdirectories too, along with their filepaths" ]
|
---|
Note:
See
TracBrowser
for help on using the repository browser.