Changeset 78 in code for trunk/cmd/txt_init/txt_init.ml


Ignore:
Timestamp:
Apr 21, 2025, 9:47:16 PM (7 weeks ago)
Author:
Izuru Yakumo
Message:

Bring back the publish subcommand (adapted)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmd/txt_init/txt_init.ml

    r77 r78  
    1 (* $Id$ *)
    21let init_repo =
    3         print_endline "Initializing repository...";
    4         print_endline "It's required for the repository name and id.";
    5         print_endline "Create one? (y/n)";
    6         match input_line stdin with
    7         |"y"->
    8                         let title =
    9                                 print_endline "Title for repository: ";
    10                                 input_line stdin in
    11                         let authors =
    12                                 print_endline "Authors (format: name <name@email> <http://website>): ";
    13                                 input_line stdin in
    14                         Kosuzu.File_store.file "txt.conf"
    15                         (Printf.sprintf "Id:%s\nTitle: %s\nAuthors: %s\n" (Kosuzu.Id.generate ()) title authors);
    16                         Kosuzu.File_store.of_kv_file ()
    17         | _ ->
    18                         print_endline "Aborting..."; exit 1
     2  print_endline "Initializing repository...";
     3  print_endline "It's required for the repository name and id.";
     4  print_endline "Create one? (y/n)";
     5  match input_line stdin with
     6  |"y"->
     7    let title =
     8      print_endline "Title for repository: ";
     9      input_line stdin in
     10    let authors =
     11      print_endline "Authors (format: name <name@email> <http://website>): ";
     12      input_line stdin in
     13    Kosuzu.File_store.file "txt.conf"
     14      (Printf.sprintf "Id:%s\nTitle: %s\nAuthors: %s\n" (Kosuzu.Id.generate ()) title authors);
     15    Kosuzu.File_store.of_kv_file ()
     16  | _ ->
     17     print_endline "Aborting..."; exit 1
Note: See TracChangeset for help on using the changeset viewer.