Changeset 15 in code for trunk/cli/gemini.ml
- Timestamp:
- Sep 24, 2022, 8:01:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/gemini.ml
r3 r15 72 72 List.fold_left (fun a x -> a ^ list_item x x) "" (List.rev topic_roots) 73 73 74 let topic_main_index title topic_roots metas =75 74 let topic_main_index r title topic_roots metas = 75 "# " ^ title ^ "\n\n" 76 76 ^ (if topic_roots <> [] then ("## Main topics\n\n" ^ fold_topic_roots topic_roots) else "") 77 77 ^ "\n## Latest\n\n" ^ to_dated_links ~limit:10 metas 78 ^ "\n=> index.date.gmi More by date\n" 78 ^ "\n=> index.date.gmi More by date\n\n" 79 ^ let peers = Logarion.Store.KV.find "Peers" r.Conversion.kv in 80 if peers = "" then "" else 81 List.fold_left (fun a s -> Printf.sprintf "%s=> %s\n" a s) "## Peers\n\n" 82 (Str.split (Str.regexp ";\n") peers) 79 83 80 84 let topic_sub_index title topic_map topic_root metas = … … 89 93 90 94 if index_name <> "" then 91 file index_name (topic_main_index title r.topic_roots r.texts);95 file index_name (topic_main_index r title r.topic_roots r.texts); 92 96 93 97 file "index.date.gmi" (date_index title r.texts);
Note:
See TracChangeset
for help on using the changeset viewer.