Html2Feedbooks 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/html2fb.rb +12 -9
- metadata +58 -23
data/bin/html2fb.rb
CHANGED
@@ -57,23 +57,26 @@ if options[:cache] && File.exists?(basedir+'.cache')
|
|
57
57
|
cache=Marshal.restore(File.open(basedir+'.cache','r'))
|
58
58
|
ok=Digest::MD5.hexdigest(content)==Digest::MD5.hexdigest(cache[:content])
|
59
59
|
abridged_conf.each do |k,v|
|
60
|
-
# puts (abridged_conf[k]==cache[:conf][k]).inspect
|
61
|
-
# puts (abridged_conf[k]).inspect
|
62
|
-
# puts (cache[:conf][k]).inspect
|
63
|
-
# puts "-_-_-_-_"
|
60
|
+
# puts (abridged_conf[k]==cache[:conf][k]).inspect
|
61
|
+
# puts (abridged_conf[k]).inspect
|
62
|
+
# puts (cache[:conf][k]).inspect
|
63
|
+
# puts "-_-_-_-_"
|
64
64
|
ok&&=abridged_conf[k]==cache[:conf][k]
|
65
65
|
end
|
66
66
|
end
|
67
67
|
#puts content.size
|
68
68
|
if options[:cache] && ok
|
69
|
-
puts "Using cache file"
|
70
|
-
doc=cache[:doc]
|
69
|
+
puts "Using cache file"
|
70
|
+
doc=cache[:doc]
|
71
71
|
else
|
72
|
-
doc=Parser.new(conf).parse(content)
|
72
|
+
doc=Parser.new(conf).parse(content)
|
73
73
|
end
|
74
|
+
|
74
75
|
File.open(basedir+'.cache','w') do |e|
|
75
|
-
Marshal.dump({:url => url,:conf => abridged_conf, :content => content, :doc => doc},e)
|
76
|
+
Marshal.dump({:url => url,:conf => abridged_conf, :content => content, :doc => doc},e)
|
76
77
|
end
|
78
|
+
puts "Writing cache File "
|
79
|
+
|
77
80
|
puts doc.toc.to_yaml
|
78
81
|
if options[:preview]
|
79
82
|
page=File.join(Dir.tmpdir(),Digest::MD5.hexdigest(url.to_s))+'.html'
|
@@ -85,5 +88,5 @@ if options[:preview]
|
|
85
88
|
puts "When happy with the parsed output rerun with -s option to send to Feedbooks.com"
|
86
89
|
Launchy::Browser.run(page)
|
87
90
|
else
|
88
|
-
doc.to_feedbooks(conf)
|
91
|
+
doc.to_feedbooks(conf)
|
89
92
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Html2Feedbooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 17
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Benoit Larroque
|
@@ -14,46 +20,69 @@ default_executable: html2fb.rb
|
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: hpricot
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
|
-
- - "
|
27
|
+
- - "="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 61
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 8
|
33
|
+
- 1
|
23
34
|
version: 0.8.1
|
24
|
-
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
25
37
|
- !ruby/object:Gem::Dependency
|
26
38
|
name: htmlentities
|
27
|
-
|
28
|
-
|
29
|
-
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
30
42
|
requirements:
|
31
43
|
- - ">="
|
32
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 53
|
46
|
+
segments:
|
47
|
+
- 4
|
48
|
+
- 2
|
49
|
+
- 1
|
33
50
|
version: 4.2.1
|
34
|
-
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
35
53
|
- !ruby/object:Gem::Dependency
|
36
54
|
name: launchy
|
37
|
-
|
38
|
-
|
39
|
-
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
40
58
|
requirements:
|
41
59
|
- - ">="
|
42
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 13
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
- 3
|
43
65
|
version: "0.3"
|
44
|
-
|
66
|
+
type: :runtime
|
67
|
+
version_requirements: *id003
|
45
68
|
- !ruby/object:Gem::Dependency
|
46
69
|
name: progressbar
|
47
|
-
|
48
|
-
|
49
|
-
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
50
73
|
requirements:
|
51
74
|
- - ">="
|
52
75
|
- !ruby/object:Gem::Version
|
76
|
+
hash: 25
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
- 0
|
80
|
+
- 3
|
53
81
|
version: 0.0.3
|
54
|
-
|
82
|
+
type: :runtime
|
83
|
+
version_requirements: *id004
|
55
84
|
description: Html2Feedbooks is script to automate basic publishing on feedbooks.com
|
56
|
-
email:
|
85
|
+
email: benoit dot larroque at feedbooks dot com
|
57
86
|
executables:
|
58
87
|
- html2fb.rb
|
59
88
|
extensions: []
|
@@ -71,7 +100,7 @@ files:
|
|
71
100
|
- bin/html2fb.rb
|
72
101
|
- lib/parser.rb
|
73
102
|
has_rdoc: true
|
74
|
-
homepage: http://github.com/Html2Feedbooks
|
103
|
+
homepage: http://github.com/zetaben/Html2Feedbooks
|
75
104
|
licenses: []
|
76
105
|
|
77
106
|
post_install_message:
|
@@ -80,21 +109,27 @@ rdoc_options: []
|
|
80
109
|
require_paths:
|
81
110
|
- lib
|
82
111
|
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
83
113
|
requirements:
|
84
114
|
- - ">="
|
85
115
|
- !ruby/object:Gem::Version
|
116
|
+
hash: 3
|
117
|
+
segments:
|
118
|
+
- 0
|
86
119
|
version: "0"
|
87
|
-
version:
|
88
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
89
122
|
requirements:
|
90
123
|
- - ">="
|
91
124
|
- !ruby/object:Gem::Version
|
125
|
+
hash: 3
|
126
|
+
segments:
|
127
|
+
- 0
|
92
128
|
version: "0"
|
93
|
-
version:
|
94
129
|
requirements: []
|
95
130
|
|
96
131
|
rubyforge_project:
|
97
|
-
rubygems_version: 1.3.
|
132
|
+
rubygems_version: 1.3.7
|
98
133
|
signing_key:
|
99
134
|
specification_version: 3
|
100
135
|
summary: Html2Feedbooks is script to automate basic publishing on feedbooks.com
|