Changeset 63 in code for trunk/cli/atom.ml


Ignore:
Timestamp:
Apr 1, 2024, 3:49:44 PM (13 months ago)
Author:
yakumo.izuru
Message:

Make the atom feed more palatable

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/atom.ml

    r61 r63  
    1212module P = Parsers.Plain_text.Make (Converter.Html)
    1313
    14 let id txt = "<id>urn:txtid:" ^ Logarion.(txt.Text.id) ^ "</id>"
    15 let title text = "<title>" ^ esc text.Logarion.Text.title ^ "</title>"
     14let id txt = "<id>urn:txtid:" ^ Logarion.(txt.Text.id) ^ "</id>\n"
     15let title text = "<title>" ^ esc text.Logarion.Text.title ^ "</title>\n"
    1616
    1717let authors text =
     
    2121        a ^ "<author>" ^ (opt_element "name" @@ esc txt.Person.name)
    2222        ^ (List.fold_left u "" txt.Person.addresses)
    23         ^ "</author>" in
     23        ^ "</author>\n" in
    2424  Person.Set.fold fn text.Text.authors ""
    2525
    2626let 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"
    2828       
    2929let htm_entry base_url text =
    3030  let open Logarion in
    3131  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"
    3333  ^ title text ^ id text ^ updated text ^ authors text
    3434  ^ (opt_element "summary" @@ esc @@ Text.str "abstract" text)
Note: See TracChangeset for help on using the changeset viewer.