urlarchiver 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/urlarchiver.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ec4c5a92b081c704d3b786a2dcdc2c337d661de
|
4
|
+
data.tar.gz: 311f7399609187fa07e097c408c0518417a462b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fab1ba0ea63788b21f1169a9e489f1387370bf6fc761b9615ad02385729c8b4fb6cd80377897d46569dbe6f6c3c4000ce3dd61cf9dd6033cb52822bd05adad3
|
7
|
+
data.tar.gz: faaaa6dff8f073f2fd3ed2c34039c3281207a2489cd34b29f1175eb18c686e02126dc4f801c58980f4d13077208d373d9cfa4d271a5aa0545198857f4ac1d072
|
data/lib/urlarchiver.rb
CHANGED
@@ -25,7 +25,7 @@ class URLArchiver
|
|
25
25
|
file = k.to_file(filepath)
|
26
26
|
|
27
27
|
# Save output if single url
|
28
|
-
if @type == "single"
|
28
|
+
if @type == "single"
|
29
29
|
@output = Hash.new
|
30
30
|
@output[:pdf_path] = filepath
|
31
31
|
@output[:html_path] = filepath.gsub(".pdf", ".html")
|
@@ -36,6 +36,10 @@ class URLArchiver
|
|
36
36
|
out = Hash.new
|
37
37
|
out[:pdf_path] = filepath
|
38
38
|
out[:html_path] = filepath.gsub(".pdf", ".html")
|
39
|
+
|
40
|
+
if @type == "multifull"
|
41
|
+
out[:text] = html.text
|
42
|
+
end
|
39
43
|
return out
|
40
44
|
rescue
|
41
45
|
end
|
@@ -63,6 +67,7 @@ class URLArchiver
|
|
63
67
|
pitem[key] = value
|
64
68
|
end
|
65
69
|
|
70
|
+
@output.to_a
|
66
71
|
@output.push(pitem)
|
67
72
|
end
|
68
73
|
end
|
@@ -72,4 +77,3 @@ class URLArchiver
|
|
72
77
|
return JSON.pretty_generate(@output)
|
73
78
|
end
|
74
79
|
end
|
75
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urlarchiver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. C. McGrath
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Saves html and pdfs of websites.
|
14
14
|
email: shidash@shidash.com
|