Changeset 78 in code for trunk


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

Bring back the publish subcommand (adapted)

Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/README.md

    r77 r78  
    33
    44Homepage: https://suzunaan.yakumo.dev/kosuzu/
     5Issue tracker: https://suzunaan.yakumo.dev/kosuzu/report/1
    56
    67## Differences from Logarion
     
    89* A `txt_init` program in the spirit of the old subcommand from years past
    910* Due to the current maintainer's decision, this project isn't hosted on Git anymore (but there is a [mirror](https://git.yakumo.dev/yakumo.izuru/kosuzu) available)
    10 
    11 ## To-do
    12 * Support [geomyidae](gopher://bitreich.org/1/scm/geomyidae) `.gph` indexes, for now those can be generated manually somewhat
    13 * Support tab-separated value gophermaps for any other gopher daemon
  • trunk/cmd/txt/dune

    r73 r78  
    33 (public_name txt)
    44 (modules txt authors convert conversion edit file index last listing
    5   new topics html atom gemini peers pull recent unfile)
     5  new topics html atom gemini peers publish pull recent unfile)
    66 (libraries text_parse.converter text_parse.parsers kosuzu msgpck curl str cmdliner))
  • trunk/cmd/txt/txt.ml

    r77 r78  
    1111    New.cmd;
    1212    Peers.cmd;
     13    Publish.cmd;
    1314    Pull.cmd;
    1415    Recent.cmd;
     
    2930      `P "https://en.touhouwiki.net/wiki/Forbidden_Scrollery" ]
    3031  in
    31   Cmd.group (Cmd.info "txt" ~version:"%%VERSION%%" ~doc ~man) ~default:default_cmd subs
     32  Cmd.group (Cmd.info "txt" ~version:"1.4.5" ~doc ~man) ~default:default_cmd subs
    3233
    3334let main () = exit (Cmd.eval txt)
  • 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
  • trunk/dune-project

    r77 r78  
    11(lang dune 2.0)
    22(name kosuzu)
    3 (version 1.4.4)
     3(version 1.4.5)
    44(license EUPL-1.2)
    55(authors "orbifx <fox@orbitalfox.eu>")
    66(maintainers "Izuru Yakumo <eternal-servant@yakumo.dev>")
    77(homepage "https://suzunaan.yakumo.dev/kosuzu/")
    8 (source (uri svn+https://svn.yakumo.dev/yakumo.izuru/kosuzu))
     8(source (uri svn+https://svn.yakumo.dev/repo/kosuzu))
    99
    1010(generate_opam_files true)
  • trunk/kosuzu.opam

    r77 r78  
    2222  ]
    2323]
    24 dev-repo: "svn+https://svn.yakumo.dev/yakumo.izuru/kosuzu"
     24dev-repo: "svn+https://svn.yakumo.dev/repo/kosuzu"
Note: See TracChangeset for help on using the changeset viewer.