39 local function handle_results(ok, result) |
39 local function handle_results(ok, result) |
40 for i=1,#result do |
40 for i=1,#result do |
41 print_message(result[i]); |
41 print_message(result[i]); |
42 end |
42 end |
43 if result.last then |
43 if result.last then |
44 io.stderr:write "--More--" |
44 local fetch_next = opts.everything; |
45 if io.read"*l" then |
45 if opts.interactive and not fetch_next then |
|
46 io.stderr:write "--More--" |
|
47 fetch_next = io.read"*l"; |
|
48 end |
|
49 if fetch_next then |
46 opts.after = result.last; |
50 opts.after = result.last; |
47 conn:query_archive(opts.to, opts, handle_results); |
51 conn:query_archive(opts.to, opts, handle_results); |
48 return |
52 return |
|
53 else |
|
54 conn:info("Next page: --after=%s", result.last); |
49 end |
55 end |
50 end |
56 end |
51 conn:close(); |
57 conn:close(); |
52 end |
58 end |
53 conn:add_plugin"archive"; |
59 conn:add_plugin"archive"; |