Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/atom.ml
r26 r61 12 12 module P = Parsers.Plain_text.Make (Converter.Html) 13 13 14 let id txt = "<id>urn: uuid:" ^ Logarion.(txt.Text.id) ^ "</id>"14 let id txt = "<id>urn:txtid:" ^ Logarion.(txt.Text.id) ^ "</id>" 15 15 let title text = "<title>" ^ esc text.Logarion.Text.title ^ "</title>" 16 16 … … 30 30 let open Logarion in 31 31 let u = Text.short_id text in 32 "<entry> <link rel=\"alternate\" href=\"" ^ base_url ^ "/" ^ u ^ ".htm\" />"32 "<entry>\n<link rel=\"alternate\" href=\"" ^ base_url ^ "/" ^ u ^ ".htm\" />" 33 33 ^ title text ^ id text ^ updated text ^ authors text 34 34 ^ (opt_element "summary" @@ esc @@ Text.str "abstract" text) 35 ^ String_set.fold (fun elt a -> a ^ "<category term=\"" ^ esc elt ^ "\"/>") (Text.set "topics" text) "" 36 ^ "<content type=\"xhtml\"><div xmlns=\"http://www.w3.org/1999/xhtml\">" 37 ^ P.of_string text.body "" 38 ^ "</div></content></entry>\n" 35 ^ String_set.fold (fun elt a -> a ^ "<category term=\"" ^ esc elt ^ "\"/>\n") (Text.set "topics" text) "" 36 ^ "</entry>\n" 39 37 40 38 let gmi_entry base_url text = 41 39 let open Logarion in 42 40 let u = Text.short_id text in 43 "<entry> <link rel=\"alternate\" href=\"" ^ base_url ^ "/" ^ u ^ ".gmi\" />"41 "<entry>\n<link rel=\"alternate\" href=\"" ^ base_url ^ "/" ^ u ^ ".gmi\" />\n" 44 42 ^ title text ^ id text ^ updated text ^ authors text 45 43 ^ (opt_element "summary" @@ esc @@ Text.str "abstract" text) 46 ^ String_set.fold (fun elt a -> a ^ "<category term=\"" ^ elt ^ "\"/> ") (Text.set "topics" text) ""44 ^ String_set.fold (fun elt a -> a ^ "<category term=\"" ^ elt ^ "\"/>\n") (Text.set "topics" text) "" 47 45 ^ "</entry>\n" 48 46 … … 66 64 ^ title ^ {|</title><link rel="alternate" type="|} ^ alternate_type ^ {|" href="|} 67 65 ^ base_url ^ {|/" /><link rel="self" type="application/atom+xml" href="|} 68 ^ self ^ {|" /><id>urn: uuid:|} ^ c.Conversion.id ^ "</id><updated>"66 ^ self ^ {|" /><id>urn:txtid:|} ^ c.Conversion.id ^ "</id><updated>" 69 67 ^ Logarion.Date.now () ^ "</updated>\n" 70 68 ^ List.fold_left (fun acc t -> acc ^ entry base_url t) "" c.texts -
trunk/cli/dune
r43 r61 3 3 (public_name txt) 4 4 (modules txt authors convert conversion edit file index last listing 5 new topics html atom gemini peers pu blish pull read recent)5 new topics html atom gemini peers pull read recent) 6 6 (libraries text_parse.converter text_parse.parsers logarion msgpck curl str cmdliner)) -
trunk/cli/txt.ml
r60 r61 1 let version = "1.3. 1"1 let version = "1.3.2" 2 2 3 3 open Cmdliner 4 4 let default_cmd = 5 5 let doc = "Discover, collect & exchange texts" in 6 let man = [ `S "CONTACT"; `P "<mailto:logarion @lists.tildeverse.org?subject=Logarion>" ] in6 let man = [ `S "CONTACT"; `P "<mailto:logarion-dev@chaotic.ninja>" ] in 7 7 Term.(ret (const (`Help (`Pager, None)))), Term.info "txt" ~version ~doc ~man 8 8 … … 17 17 New.term; 18 18 Peers.term; 19 Publish.term;20 19 Pull.term; 21 20 Read.term;
Note:
See TracChangeset
for help on using the changeset viewer.