Changeset 19 in code for trunk/cli/gemini.ml
- Timestamp:
- Oct 26, 2022, 7:36:02 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/gemini.ml
r15 r19 91 91 let index_name = try Store.KV.find "Gemini-index" r.kv with Not_found -> "index.gmi" in 92 92 let title = try Store.KV.find "Title" r.Conversion.kv with Not_found -> "" in 93 94 if index_name <> "" then 95 file index_name (topic_main_index r title r.topic_roots r.texts); 96 93 if index_name <> "" then file index_name (topic_main_index r title r.topic_roots r.texts); 97 94 file "index.date.gmi" (date_index title r.texts); 98 99 95 List.iter 100 96 (fun topic -> file ("index." ^ topic ^ ".gmi") 101 97 (topic_sub_index title r.topics topic r.texts)) 102 r.topic_roots ;98 r.topic_roots 103 99 104 let base_url = try 105 let _i = Str.(search_forward (regexp "gemini?://[^;]*") (Store.KV.find "Locations" r.kv) 0) in 106 Str.(matched_string (Store.KV.find "Locations" r.kv)) 107 with Not_found -> prerr_endline "Missing location for Gemini"; "" in 108 file "gmi.atom" (Atom.feed title r.id base_url "text/gemini" r.texts) 100 let converter = Conversion.{ ext; page = Some page; indices = Some indices}
Note:
See TracChangeset
for help on using the changeset viewer.