Last change
on this file since 72 was 69, checked in by Izuru Yakumo, 8 months ago |
txt new no longer sets default titles, remove %%VERSION%% from all subcommands (as they're pulled from txt.ml)
Signed-off-by: Izuru Yakumo <yakumo.izuru@…>
|
File size:
1.2 KB
|
Line | |
---|
1 | open Logarion
|
---|
2 | module FS = File_store
|
---|
3 | module A = Archive
|
---|
4 |
|
---|
5 | open Cmdliner
|
---|
6 | let recurse = Arg.(value & flag & info ["R"] ~doc: "Recurse into subdirectories")
|
---|
7 | let reverse = Arg.(value & flag & info ["r"] ~doc: "Reverse order")
|
---|
8 | let paths = Arg.(value & flag & info ["p"] ~doc: "Show file paths")
|
---|
9 | let number = Arg.(value & opt (some int) (Some 10) & info ["n"] ~docv: "number" ~doc: "Number of entries to list")
|
---|
10 | let authed = Arg.(value & opt (some string) None & info ["authored"] ~docv: "Comma-separated names" ~doc: "Texts by authors")
|
---|
11 | let topics = Arg.(value & opt (some string) None & info ["topics"] ~docv: "Comma-separated topics" ~doc: "Texts with topics")
|
---|
12 | let dir = Arg.(value & pos 0 string "" & info [] ~docv: "Directory to index")
|
---|
13 |
|
---|
14 | let recent_t = Term.(const Listing.listing $ recurse $ (const true) $ reverse $ number $ paths $ authed $ topics $ dir)
|
---|
15 | let cmd =
|
---|
16 | let doc = "List recent texts" in
|
---|
17 | let man = [
|
---|
18 | `S Manpage.s_description;
|
---|
19 | `P "List header information of most recent texts.";
|
---|
20 | `P "If -R is used, list header information for texts found in subdirectories, too, along with their filepaths" ]
|
---|
21 | in
|
---|
22 | let info = Cmd.info "recent" ~doc ~man in
|
---|
23 | Cmd.v info recent_t
|
---|
Note:
See
TracBrowser
for help on using the repository browser.