Preliminary support for cross-domain references

git-svn-id: file:///srv/svn/repo/kosuzu/trunk@42 eb64cd80-c68d-6f47-b6a3-0ada418499da
This commit is contained in:
fox
2022-12-15 21:25:18 +00:00
parent 3e971f40dc
commit 4dff69cb4a
7 changed files with 88 additions and 49 deletions

View File

@@ -75,7 +75,7 @@ let pull_text url dir id =
let file = open_out_gen [Open_creat; Open_trunc; Open_wronly] 0o640 (fname dir text) in
output_string file txt; close_out file
let per_text url dir filter print i id time title authors topics = match id with
let per_text url dir filter print i id time title authors topics _refs _reps = match id with
| "" -> Printf.eprintf "\nInvalid id for %s\n" title
| id -> let open Logarion in
print i;
@@ -127,11 +127,12 @@ let pull_list auths topics =
Curl.global_init Curl.CURLINIT_GLOBALALL;
let pull got_one peer_url = if got_one then got_one else
(pull_index peer_url auths topics) in
let open Logarion in
let fold_locations init peer =
ignore @@ List.fold_left pull init peer.Logarion.Peers.locations;
ignore @@ List.fold_left pull init peer.Peers.pack.Header_pack.info.locations;
false
in
ignore @@ Logarion.Peers.fold fold_locations false;
ignore @@ Peers.fold fold_locations false;
Curl.global_cleanup ()
let pull url auths topics = match url with