Changeset 22 in code for trunk/lib


Ignore:
Timestamp:
Nov 2, 2022, 9:47:20 PM (2 years ago)
Author:
fox
Message:

Use txt.conf to generate index.pck meta; fix double load while indexing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/header_pack.ml

    r7 r22  
    5454let of_string s = unpack @@ snd @@ Msgpck.StringBuf.read s
    5555
     56let of_kv kv =
     57        let find k kv = try Store.KV.find k kv with Not_found -> "" in
     58        let find_ls k kv = try String_set.list_of_csv (Store.KV.find k kv) with Not_found -> [] in
     59        {
     60                info = { version = version; id = find "Id" kv; title = find "Title" kv;
     61                        people = find_ls "Authors" kv; locations = find_ls "Locations" kv };
     62                fields;
     63                texts = Msgpck.List [];
     64                peers = str_list (find_ls "Peers" kv);
     65        }
     66
    5667let list filename = try
    5768        let texts_list = function
Note: See TracChangeset for help on using the changeset viewer.