Bring back the publish subcommand (adapted)

git-svn-id: file:///srv/svn/repo/kosuzu/trunk@78 eb64cd80-c68d-6f47-b6a3-0ada418499da
This commit is contained in:
yakumo.izuru
2025-04-21 21:47:16 +00:00
parent d7dc784765
commit 7919277b64
7 changed files with 96 additions and 26 deletions

View File

@@ -1,18 +1,17 @@
(* $Id$ *)
let init_repo =
print_endline "Initializing repository...";
print_endline "It's required for the repository name and id.";
print_endline "Create one? (y/n)";
match input_line stdin with
|"y"->
let title =
print_endline "Title for repository: ";
input_line stdin in
let authors =
print_endline "Authors (format: name <name@email> <http://website>): ";
input_line stdin in
Kosuzu.File_store.file "txt.conf"
(Printf.sprintf "Id:%s\nTitle: %s\nAuthors: %s\n" (Kosuzu.Id.generate ()) title authors);
Kosuzu.File_store.of_kv_file ()
| _ ->
print_endline "Aborting..."; exit 1
print_endline "Initializing repository...";
print_endline "It's required for the repository name and id.";
print_endline "Create one? (y/n)";
match input_line stdin with
|"y"->
let title =
print_endline "Title for repository: ";
input_line stdin in
let authors =
print_endline "Authors (format: name <name@email> <http://website>): ";
input_line stdin in
Kosuzu.File_store.file "txt.conf"
(Printf.sprintf "Id:%s\nTitle: %s\nAuthors: %s\n" (Kosuzu.Id.generate ()) title authors);
Kosuzu.File_store.of_kv_file ()
| _ ->
print_endline "Aborting..."; exit 1