Changeset 21 in code for trunk/cli/convert.ml


Ignore:
Timestamp:
Nov 1, 2022, 5:11:09 PM (2 years ago)
Author:
fox
Message:

Moved conversion file, conf -> pack, fixes

Conversion:

  • Configuration sought in: txt.conf, ~/.config/txt/txt.conf
  • logarion.conf to produce index and target formats

Publication:

  • publish <ids>: copies txt with ID into Pubdir/public_{html,gemini,gopher} (Pubdir fromtxt.conf), if dirs exist, and runs convert <pubdir>

Fixes:

  • Feed <nav> regression
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/convert.ml

    r20 r21  
    4040
    4141let load_kv dir =
    42         let conf = Filename.concat dir ".convert.conf" in (* TODO: better name? *)
    43         let kv = if Sys.file_exists conf then File_store.of_kv_file conf else Store.KV.empty in
     42        let kv = File_store.of_kv_file () in
    4443        let idx = Filename.concat dir "index.pck" in
    4544        if not (Sys.file_exists idx) then kv else
     
    4948                        let kv = if Store.KV.mem "Id" kv then kv else Store.KV.add "Id" info.Header_pack.id kv in
    5049                        let kv = if Store.KV.mem "Title" kv then kv else Store.KV.add "Title" info.Header_pack.title kv in
    51                         let kv = Store.KV.add "Locations" (String.concat ";\n" info.Header_pack.locations) kv in
     50                        let kv = if Store.KV.mem "Locations" kv then kv else Store.KV.add "Locations" (String.concat ";\n" info.Header_pack.locations) kv in
    5251                        let kv = Store.KV.add "Peers" (String.concat ";\n" Header_pack.(to_str_list peers)) kv in
    5352                        kv
Note: See TracChangeset for help on using the changeset viewer.