Changeset 66 in code for trunk/cli/authors.ml


Ignore:
Timestamp:
Aug 21, 2024, 1:37:05 AM (8 months ago)
Author:
yakumo.izuru
Message:

Migrate the codebase to the latest revision of Cmdliner

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/authors.ml

    r65 r66  
    77        Person.Set.iter (fun x -> print_endline (Person.to_string x)) s
    88
    9 open Ocmd
    10 let term =
    11         let recurse = Arg.(value & flag & info ["R"]
    12                 ~doc:"include texts in subdirectories too") in
    13         let topics = Arg.(value & opt (some string) None & info ["topics"]
    14                 ~docv:"TOPICS" ~doc:"display authors who have written on topics") in
    15         Term.(const authors $ recurse $ topics),
    16         Term.info "authors" ~doc:"list authors"
    17                 ~man:[ `S "DESCRIPTION"; `P "List author names" ]
     9open Cmdliner
     10let recurse = Arg.(value & flag & info ["R"] ~doc: "Include texts in subdirectories too")
     11let topics = Arg.(value & opt (some string) None & info ["topics"] ~docv:"topics" ~doc: "Display authors who have written on topics")
     12
     13let authors_t = Term.(const authors $ recurse $ topics)
     14
     15let cmd =
     16  let doc = "List authors" in
     17  let man = [
     18      `S Manpage.s_description;
     19      `P "List author names" ]
     20  in
     21  let info = Cmd.info "authors" ~version:"%%VERSION%%" ~doc ~man in
     22  Cmd.v info authors_t
Note: See TracChangeset for help on using the changeset viewer.