List peers (from index.pck) in exported htm and gmi index
git-svn-id: file:///srv/svn/repo/kosuzu/trunk@15 eb64cd80-c68d-6f47-b6a3-0ada418499da
This commit is contained in:
@@ -44,12 +44,13 @@ let at_path types noindex path =
|
||||
let fname = Filename.concat dir "index.pck" in
|
||||
(match Header_pack.of_string @@ File_store.to_string fname with
|
||||
| Error s -> prerr_endline s
|
||||
| Ok { info; _ } ->
|
||||
| Ok { info; peers; _ } ->
|
||||
let kv = let f = Filename.concat dir ".convert.conf" in (* TODO: better place to store convert conf? *)
|
||||
if Sys.file_exists f then File_store.of_kv_file f else Store.KV.empty in
|
||||
let kv = if Store.KV.mem "Title" kv then kv
|
||||
else Store.KV.add "Title" info.Header_pack.title kv in
|
||||
let kv = Store.KV.add "Locations" (String.concat ";\n" info.Header_pack.locations) kv in
|
||||
let kv = Store.KV.add "Peers" (String.concat ";\n" Header_pack.(to_str_list peers)) kv in
|
||||
let cs = converters types kv in
|
||||
directory cs noindex dir info.Header_pack.id kv)
|
||||
| path when Sys.file_exists path ->
|
||||
|
||||
Reference in New Issue
Block a user