Changeset 63 in code for trunk/cli/atom.ml
- Timestamp:
- Apr 1, 2024, 3:49:44 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/atom.ml
r61 r63 12 12 module P = Parsers.Plain_text.Make (Converter.Html) 13 13 14 let id txt = "<id>urn:txtid:" ^ Logarion.(txt.Text.id) ^ "</id> "15 let title text = "<title>" ^ esc text.Logarion.Text.title ^ "</title> "14 let id txt = "<id>urn:txtid:" ^ Logarion.(txt.Text.id) ^ "</id>\n" 15 let title text = "<title>" ^ esc text.Logarion.Text.title ^ "</title>\n" 16 16 17 17 let authors text = … … 21 21 a ^ "<author>" ^ (opt_element "name" @@ esc txt.Person.name) 22 22 ^ (List.fold_left u "" txt.Person.addresses) 23 ^ "</author> " in23 ^ "</author>\n" in 24 24 Person.Set.fold fn text.Text.authors "" 25 25 26 26 let updated txt = let open Logarion in 27 "<updated>"^ Date.(txt.Text.date |> listing |> rfc_string) ^"</updated> "27 "<updated>"^ Date.(txt.Text.date |> listing |> rfc_string) ^"</updated>\n" 28 28 29 29 let htm_entry base_url text = 30 30 let open Logarion in 31 31 let u = Text.short_id text in 32 "<entry>\n<link rel=\"alternate\" href=\"" ^ base_url ^ "/" ^ u ^ ".htm\" /> "32 "<entry>\n<link rel=\"alternate\" href=\"" ^ base_url ^ "/" ^ u ^ ".htm\" />\n" 33 33 ^ title text ^ id text ^ updated text ^ authors text 34 34 ^ (opt_element "summary" @@ esc @@ Text.str "abstract" text)
Note:
See TracChangeset
for help on using the changeset viewer.