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 - ^ "