wayback_machine_downloader 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f581f0aa09dbfecb7080ae0788073c38bef547b1
4
- data.tar.gz: 8013f6f7b57cf41b8674e37eb0beb9dada4d1b2b
3
+ metadata.gz: 98ea352b6eae2e49f915634245d65f109a864ed0
4
+ data.tar.gz: 5eee04e5f319e23709ef94f6677c194deaa81640
5
5
  SHA512:
6
- metadata.gz: 02ce907c84817031c068a10c4b78eeaf08ff4b2c4805159d01bb1a0fb40eb4fa0d212a0a101f4c61cd1309dc6aafc0f95969759e0930dacddcc566f500051cfc
7
- data.tar.gz: 7131a398e753f271a8db19c7ad1677de9241b3cddf951efa9bf561e97d10b8a81e8f41ae0a676d7eccd8ed0d76770c3b7fb582989f8cab2659af94fa07681d0c
6
+ metadata.gz: 6788c3f2e764e1ebe02ee967e4653814b1fe8de316ffc8eb307dbd85eabc5c6b867b4abda5b2dd36300cd5e96f353429740b206d6ad871cd1b78b760f99ca029
7
+ data.tar.gz: 7795541cd32a39a7b78875a8a841ec8124df01aa38b9504e8f29109d2d431b1299d76170624739786d3ebf28fa8eeacd1081ed496498e69ef6fa40f31dfc29c0
@@ -9,20 +9,24 @@ option_parser = OptionParser.new do |opts|
9
9
  opts.banner = "Usage: wayback_machine_downloader http://example.com"
10
10
 
11
11
  opts.separator ""
12
- opts.separator "Download any website from the Wayback Machine."
12
+ opts.separator "Download an entire website from the Wayback Machine."
13
13
 
14
14
  opts.separator ""
15
15
  opts.separator "Optional options:"
16
16
 
17
- opts.on("-t", "--timestamp TIMESTAMP", Integer, "Only files on or before timestamp supplied (ie. 20150806225358)") do |t|
18
- options[:timestamp] = t
17
+ opts.on("-f", "--from TIMESTAMP", Integer, "Only files on or after timestamp supplied (ie. 20060716231334)") do |t|
18
+ options[:from_timestamp] = t
19
+ end
20
+
21
+ opts.on("-t", "--to TIMESTAMP", Integer, "Only files on or before timestamp supplied (ie. 20100916231334)") do |t|
22
+ options[:to_timestamp] = t
19
23
  end
20
24
 
21
25
  opts.on("-o", "--only ONLY_FILTER", String, "Restrict downloading to urls that match this filter (use // notation for the filter to be treated as a regex)") do |t|
22
26
  options[:only_filter] = t
23
27
  end
24
28
 
25
- opts.on("-x", "--exclude EXCLUDE_FILTER", String, "Skip urls that match this filter (use // notation for the filter to be treated as a regex)") do |t|
29
+ opts.on("-x", "--exclude EXCLUDE_FILTER", String, "Skip downloading of urls that match this filter (use // notation for the filter to be treated as a regex)") do |t|
26
30
  options[:exclude_filter] = t
27
31
  end
28
32
 
@@ -32,7 +36,8 @@ option_parser = OptionParser.new do |opts|
32
36
  end.parse!
33
37
 
34
38
  if (base_url = ARGV[-1])
35
- wayback_machine_downloader = WaybackMachineDownloader.new base_url: base_url, timestamp: options[:timestamp], only_filter: options[:only_filter], exclude_filter: options[:exclude_filter]
39
+ options[:base_url] = base_url
40
+ wayback_machine_downloader = WaybackMachineDownloader.new options
36
41
  wayback_machine_downloader.download_files
37
42
  elsif options[:version]
38
43
  puts WaybackMachineDownloader::VERSION
@@ -8,7 +8,7 @@ require_relative 'wayback_machine_downloader/to_regex'
8
8
 
9
9
  class WaybackMachineDownloader
10
10
 
11
- VERSION = "0.4.0"
11
+ VERSION = "0.4.1"
12
12
 
13
13
  attr_accessor :base_url, :from_timestamp, :to_timestamp, :only_filter, :exclude_filter
14
14
 
@@ -110,6 +110,8 @@ class WaybackMachineDownloader
110
110
  puts "No files to download."
111
111
  puts "Possible reaosons:"
112
112
  puts "\t* Site is not in Wayback Machine Archive."
113
+ puts "\t* From timestamp too much in the future." if @from_timestamp and @from_timestamp != 0
114
+ puts "\t* To timestamp too much in the past." if @to_timestamp and @to_timestamp != 0
113
115
  puts "\t* Only filter too restrictive (#{only_filter.to_s})" if @only_filter
114
116
  puts "\t* Exclude filter too wide (#{exclude_filter.to_s})" if @exclude_filter
115
117
  return
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wayback_machine_downloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hartator
@@ -38,9 +38,10 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.2'
41
- description: Download any website from the Wayback Machine. Wayback Machine by Internet
42
- Archive (archive.org) is an awesome tool to view any website at any point of time
43
- but lacks an export feature. Wayback Machine Downloader brings exactly this.
41
+ description: Download an entire website from the Wayback Machine. Wayback Machine
42
+ by Internet Archive (archive.org) is an awesome tool to view any website at any
43
+ point of time but lacks an export feature. Wayback Machine Downloader brings exactly
44
+ this.
44
45
  email: hartator@gmail.com
45
46
  executables:
46
47
  - wayback_machine_downloader
@@ -74,5 +75,5 @@ rubyforge_project:
74
75
  rubygems_version: 2.4.5.1
75
76
  signing_key:
76
77
  specification_version: 4
77
- summary: Download any website from the Wayback Machine.
78
+ summary: Download an entire website from the Wayback Machine.
78
79
  test_files: []