From 491c581d561576c1bce9c3710106e6a82a25cb9d Mon Sep 17 00:00:00 2001 From: "yakumo.izuru" Date: Wed, 18 Oct 2023 21:49:13 +0000 Subject: [PATCH] Switch HTML doctype to 4.01 Transitional, update documentation Signed-off-by: Izuru Yakumo git-svn-id: file:///srv/svn/repo/kosuzu/trunk@48 eb64cd80-c68d-6f47-b6a3-0ada418499da --- Makefile | 4 ++- README.md | 16 +++++++++ cli/html.ml | 33 +++++++++-------- cli/txt.ml | 2 +- dune-project | 4 +-- install | 6 ---- logarion.opam | 4 +-- readme.txt | 28 --------------- header => txt/d41e68.txt | 6 ++++ txt/footer.html | 4 +++ txt/header.html | 2 ++ txt/htm/3sqd84.txt | 10 ++++++ txt/htm/9egbae.txt | 14 ++++++++ txt/htm/d41e68.txt | 26 ++++++++++++++ txt/htm/h1a9tg.txt | 16 +++++++++ txt/htm/hvhhwf.txt | 76 +++++++++++++++++++++++++++++++++++++++ txt/htm/main.css | 8 +++++ txt/index.pck | Bin 0 -> 465 bytes txt/txt.conf | 6 ++++ 19 files changed, 208 insertions(+), 57 deletions(-) create mode 100644 README.md delete mode 100644 install delete mode 100644 readme.txt rename header => txt/d41e68.txt (84%) create mode 100644 txt/footer.html create mode 100644 txt/header.html create mode 100644 txt/htm/3sqd84.txt create mode 100644 txt/htm/9egbae.txt create mode 100644 txt/htm/d41e68.txt create mode 100644 txt/htm/h1a9tg.txt create mode 100644 txt/htm/hvhhwf.txt create mode 100644 txt/htm/main.css create mode 100644 txt/index.pck create mode 100644 txt/txt.conf diff --git a/Makefile b/Makefile index 7f3742e..697017e 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ MACHINE=`uname -m` DATE=`date -r _build/default/cli/txt.exe +%Y%m%d` COMMIT=`git rev-parse --short HEAD` +CC=cc +LD=cc + all: dune build @@ -16,7 +19,6 @@ clean: dune clean dist: - dune subst dune build cp _build/default/cli/txt.exe txt.exe strip txt.exe diff --git a/README.md b/README.md new file mode 100644 index 0000000..b6bc181 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Logarion +Text archival and exchange. + +## Contact +* [Mailing list](https://lists.tildeverse.org/postorius/lists/logarion.lists.tildeverse.org/) + +## References +* [Building from source](https://logarion.chaotic.ninja/9egbae.htm) +* [Creating texts & publishing on the net](https://logarion.chaotic.ninja/hvhhwf.htm) +* [Exploring & pulling texts from Logarion repositories](https://logarion.chaotic.ninja/3sqd84.htm) +* [Header format](https://logarion.chaotic.ninja/d41e68.htm) +* [Txt uniform resource names](https://logarion.chaotic.ninja/h1a9tg.htm) + +## Maintainers +* orbifx (original author, former maintainer) +* Izuru Yakumo (contributor, current maintainer) diff --git a/cli/html.ml b/cli/html.ml index 19050e8..580d438 100644 --- a/cli/html.ml +++ b/cli/html.ml @@ -27,13 +27,12 @@ let wrap conv htm text_title body = then "feed.atom" else "" in let header = match htm.templates.header with | Some x -> replace x - | None -> Printf.(sprintf "
%s%s
" site_title - (if feed <> "" then sprintf "" feed else "")) + | None -> Printf.(sprintf "%s%s" site_title + (if feed <> "" then sprintf "feed" feed else "")) in let footer = match htm.templates.footer with None -> "" | Some x -> replace x in - Printf.sprintf "%s%s\n%s\n%s\ - \ - \n%s%s%s" + Printf.sprintf "%s%s\n%s\n%s\ + \n%s%s%s" text_title (if site_title <> "" then (" • " ^ site_title) else "") htm.style (if feed <> "" then Printf.sprintf "" feed else "") @@ -62,7 +61,7 @@ let page htm conversion text = (* let author acc auth = sep_append acc Person.(auth.name ^ " ") in*) let authors = Person.Set.to_string text.authors in let header = - let time x = Printf.sprintf {||} + let time x = Printf.sprintf {|%s|} (Date.rfc_string x) (Date.pretty_date x) in let topic_links x = let to_linked t a = @@ -79,7 +78,7 @@ let page htm conversion text = with Not_found -> Rel.empty in ref_links ref_set, ref_links rep_set in - "
" + "
" ^ opt_kv "Title:" text.title ^ opt_kv "Authors:" authors ^ opt_kv "Date:" (time (Date.listing text.date)) @@ -90,8 +89,8 @@ let page htm conversion text = ^ opt_kv "In reply to:" (ref_links (set "in-reply-to" text)) ^ opt_kv "Referred by:" references ^ opt_kv "Replies:" replies - ^ {|
|} in
-	wrap conversion htm text.title ((T.of_string text.body header) ^ "
") + ^ {|
|} in
+	wrap conversion htm text.title ((T.of_string text.body header) ^ "
") let to_dated_links ?(limit) meta_list = let meta_list = match limit with @@ -115,9 +114,9 @@ let date_index ?(limit) conv htm meta_list = let fold_topic_roots topic_roots = let list_item root t = "
  • " ^ topic_link root t in - "" + ^ "" let fold_topics topic_map topic_roots metas = let open Logarion in @@ -134,14 +133,14 @@ let fold_topics topic_map topic_roots metas = in "
  • " ^ item ^ sub_items root t in - "" + ^ "" let text_item path meta = let open Logarion in - " |} ^ meta.Text.title + "" ^ Date.(pretty_date (listing meta.Text.date)) + ^ {| |} ^ meta.Text.title ^ "
    " let listing_index topic_map topic_roots path metas = @@ -161,12 +160,12 @@ let listing_index topic_map topic_roots path metas = | "" -> "" | x -> {|

    |} ^ String.capitalize_ascii topic ^ "

    " ^ x in - "" + "

    Texts

    " ^ item_group topic_roots ^ "" let topic_main_index conv htm topic_roots metas = wrap conv htm "Topics" (fold_topic_roots topic_roots - ^ "