Last change
on this file since 63 was 25, checked in by fox, 2 years ago |
New edit <ID> command and updated readme
|
File size:
1.0 KB
|
Line | |
---|
1 | open Logarion
|
---|
2 |
|
---|
3 | open Cmdliner
|
---|
4 | let term =
|
---|
5 | let id = Arg.(value & pos 0 string "" & info [] ~docv:"text ID") in
|
---|
6 | let recurse = Arg.(value & flag & info ["R"] ~doc:"recurse, include subdirs") in
|
---|
7 | let reverse = Arg.(value & flag & info ["r"] ~doc:"reverse order") in
|
---|
8 | let time = Arg.(value & flag & info ["t"] ~doc:"sort by time, newest first") in
|
---|
9 | let number = Arg.(value & opt (some int) None & info ["n"]
|
---|
10 | ~docv:"number" ~doc:"number of entries to list") in
|
---|
11 | let authed = Arg.(value & opt (some string) None & info ["authored"]
|
---|
12 | ~docv:"comma-separated names" ~doc:"texts by authors") in
|
---|
13 | let topics = Arg.(value & opt (some string) None & info ["topics"]
|
---|
14 | ~docv:"comma-separated topics" ~doc:"texts with topics") in
|
---|
15 | Term.(const (Archive.apply_sys_util "PAGER" "less") $ recurse $ time $ reverse $ number $ authed $ topics $ id),
|
---|
16 | Term.info "read" ~doc: "read a text" ~man:[ `S "DESCRIPTION";
|
---|
17 | `P "List header information for current directory. If -R is used, list header
|
---|
18 | information for texts found in subdirectories too, along with their filepaths" ]
|
---|
Note:
See
TracBrowser
for help on using the repository browser.