Changeset 21 in code for trunk/cli/convert.ml
- Timestamp:
- Nov 1, 2022, 5:11:09 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/convert.ml
r20 r21 40 40 41 41 let 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 44 43 let idx = Filename.concat dir "index.pck" in 45 44 if not (Sys.file_exists idx) then kv else … … 49 48 let kv = if Store.KV.mem "Id" kv then kv else Store.KV.add "Id" info.Header_pack.id kv in 50 49 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 in50 let kv = if Store.KV.mem "Locations" kv then kv else Store.KV.add "Locations" (String.concat ";\n" info.Header_pack.locations) kv in 52 51 let kv = Store.KV.add "Peers" (String.concat ";\n" Header_pack.(to_str_list peers)) kv in 53 52 kv
Note:
See TracChangeset
for help on using the changeset viewer.