html2rss 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.mergify.yml +15 -0
- data/.rubocop.yml +11 -145
- data/Gemfile +19 -2
- data/Gemfile.lock +111 -97
- data/README.md +323 -270
- data/bin/console +1 -0
- data/exe/html2rss +6 -0
- data/html2rss.gemspec +15 -20
- data/lib/html2rss/attribute_post_processors/gsub.rb +30 -8
- data/lib/html2rss/attribute_post_processors/html_to_markdown.rb +7 -2
- data/lib/html2rss/attribute_post_processors/html_transformers/transform_urls_to_absolute_ones.rb +27 -0
- data/lib/html2rss/attribute_post_processors/html_transformers/wrap_img_in_a.rb +41 -0
- data/lib/html2rss/attribute_post_processors/markdown_to_html.rb +11 -2
- data/lib/html2rss/attribute_post_processors/parse_time.rb +11 -4
- data/lib/html2rss/attribute_post_processors/parse_uri.rb +12 -2
- data/lib/html2rss/attribute_post_processors/sanitize_html.rb +40 -44
- data/lib/html2rss/attribute_post_processors/substring.rb +14 -4
- data/lib/html2rss/attribute_post_processors/template.rb +36 -12
- data/lib/html2rss/attribute_post_processors.rb +28 -5
- data/lib/html2rss/cli.rb +29 -0
- data/lib/html2rss/config/channel.rb +117 -0
- data/lib/html2rss/config/selectors.rb +91 -0
- data/lib/html2rss/config.rb +71 -82
- data/lib/html2rss/item.rb +118 -42
- data/lib/html2rss/item_extractors/attribute.rb +20 -7
- data/lib/html2rss/item_extractors/href.rb +20 -4
- data/lib/html2rss/item_extractors/html.rb +18 -6
- data/lib/html2rss/item_extractors/static.rb +18 -7
- data/lib/html2rss/item_extractors/text.rb +17 -5
- data/lib/html2rss/item_extractors.rb +75 -10
- data/lib/html2rss/object_to_xml_converter.rb +56 -0
- data/lib/html2rss/rss_builder/channel.rb +21 -0
- data/lib/html2rss/rss_builder/item.rb +83 -0
- data/lib/html2rss/rss_builder/stylesheet.rb +37 -0
- data/lib/html2rss/rss_builder.rb +96 -0
- data/lib/html2rss/utils.rb +94 -19
- data/lib/html2rss/version.rb +5 -1
- data/lib/html2rss.rb +51 -20
- data/rakefile.rb +16 -0
- metadata +51 -154
- data/.travis.yml +0 -25
- data/CHANGELOG.md +0 -221
- data/lib/html2rss/feed_builder.rb +0 -81
- data/lib/html2rss/item_extractors/current_time.rb +0 -21
- data/support/logo.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d51b095228dec5d98a1ff66ee7329171d2297bad67ca27a7930afe296b589e8
|
4
|
+
data.tar.gz: 32bf56a05ed45a1bb8c3341f228f41d1441e65243c6a5d55908e90d002f8880b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cbe761521ec3cd43bd25565f6425e6ced445814c30706d50d52c008ce6e3905a6f95b9f6d9dfa2faf90baf4bc2fbeb43741af5bc185e1488d31b55b9ffa3c75
|
7
|
+
data.tar.gz: 353e1586ddde92858ea95a2eecda6d752975585038acc29e6d09ff97363e5429d15966a005e1f9c4a41e9ad83b972973cfadd9c840160849d530166e7dd84298
|
data/.gitignore
CHANGED
data/.mergify.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
queue_rules:
|
2
|
+
- name: dependabot
|
3
|
+
conditions:
|
4
|
+
- author=dependabot[bot]
|
5
|
+
- status-success=test
|
6
|
+
- base=master
|
7
|
+
|
8
|
+
pull_request_rules:
|
9
|
+
- name: automatic merge for Dependabot pull requests
|
10
|
+
conditions:
|
11
|
+
- author=dependabot[bot]
|
12
|
+
actions:
|
13
|
+
queue:
|
14
|
+
method: squash
|
15
|
+
name: dependabot
|
data/.rubocop.yml
CHANGED
@@ -1,164 +1,30 @@
|
|
1
1
|
require:
|
2
2
|
- rubocop-performance
|
3
3
|
- rubocop-rspec
|
4
|
+
- rubocop-md
|
5
|
+
- rubocop-rake
|
4
6
|
|
5
7
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.5
|
7
8
|
DisplayCopNames: true
|
9
|
+
NewCops: enable
|
10
|
+
Exclude:
|
11
|
+
- vendor/**/*
|
8
12
|
|
9
13
|
Metrics/BlockLength:
|
10
14
|
Exclude:
|
11
|
-
- "
|
15
|
+
- "spec/**/*_spec.rb"
|
12
16
|
- html2rss.gemspec
|
13
17
|
|
14
|
-
Metrics/ModuleLength:
|
15
|
-
Exclude:
|
16
|
-
- "**/*_spec.rb"
|
17
|
-
|
18
|
-
Layout/ClassStructure:
|
19
|
-
Enabled: true
|
20
|
-
|
21
|
-
Layout/HeredocArgumentClosingParenthesis:
|
22
|
-
Enabled: true
|
23
|
-
|
24
|
-
Layout/LineLength:
|
25
|
-
Max: 110
|
26
|
-
|
27
|
-
Layout/MultilineArrayLineBreaks:
|
28
|
-
Enabled: true
|
29
|
-
|
30
|
-
Layout/MultilineHashKeyLineBreaks:
|
31
|
-
Enabled: true
|
32
|
-
|
33
|
-
Layout/SpaceInsideParens:
|
34
|
-
Enabled: true
|
35
|
-
|
36
|
-
Layout/EmptyLinesAroundAttributeAccessor:
|
37
|
-
Enabled: true
|
38
|
-
|
39
|
-
Layout/SpaceAroundMethodCallOperator:
|
40
|
-
Enabled: true
|
41
|
-
|
42
|
-
Lint/HeredocMethodCallPosition:
|
43
|
-
Enabled: true
|
44
|
-
|
45
|
-
Lint/NumberConversion:
|
46
|
-
Enabled: false
|
47
|
-
|
48
|
-
Lint/DeprecatedOpenSSLConstant:
|
49
|
-
Enabled: true
|
50
|
-
|
51
|
-
Lint/MixedRegexpCaptureTypes:
|
52
|
-
Enabled: true
|
53
|
-
|
54
|
-
Lint/RaiseException:
|
55
|
-
Enabled: true
|
56
|
-
|
57
|
-
Lint/StructNewOverride:
|
58
|
-
Enabled: true
|
59
|
-
|
60
|
-
|
61
|
-
Performance/CaseWhenSplat:
|
62
|
-
Enabled: true
|
63
|
-
|
64
|
-
Performance/ChainArrayAllocation:
|
65
|
-
Enabled: true
|
66
|
-
|
67
|
-
Performance/OpenStruct:
|
68
|
-
Enabled: true
|
69
|
-
|
70
|
-
|
71
18
|
RSpec/NestedGroups:
|
72
19
|
Exclude:
|
73
20
|
- spec/html2rss_spec.rb
|
74
21
|
|
75
|
-
|
76
|
-
Style/AsciiComments:
|
77
|
-
Enabled: false
|
78
|
-
|
79
|
-
Style/AutoResourceCleanup:
|
80
|
-
Enabled: true
|
81
|
-
|
82
|
-
Style/BlockDelimiters:
|
83
|
-
Enabled: true
|
22
|
+
RSpec/DescribeClass:
|
84
23
|
Exclude:
|
85
|
-
-
|
86
|
-
|
87
|
-
Style/HashEachMethods:
|
88
|
-
Enabled: true
|
24
|
+
- spec/exe/**/*_spec.rb
|
89
25
|
|
90
|
-
|
91
|
-
Enabled: true
|
92
|
-
|
93
|
-
Style/HashTransformValues:
|
94
|
-
Enabled: true
|
95
|
-
|
96
|
-
Style/CollectionMethods:
|
97
|
-
Enabled: true
|
98
|
-
|
99
|
-
Style/ConstantVisibility:
|
100
|
-
Enabled: true
|
101
|
-
|
102
|
-
Style/DateTime:
|
103
|
-
Enabled: true
|
104
|
-
|
105
|
-
Style/Documentation:
|
106
|
-
Exclude:
|
107
|
-
- lib/html2rss/version.rb
|
108
|
-
|
109
|
-
Style/DocumentationMethod:
|
26
|
+
RSpec/NamedSubject:
|
110
27
|
Enabled: false
|
111
28
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
Style/FrozenStringLiteralComment:
|
116
|
-
Enabled: false
|
117
|
-
|
118
|
-
Style/HashSyntax:
|
119
|
-
Enabled: true
|
120
|
-
|
121
|
-
Style/InlineComment:
|
122
|
-
Enabled: true
|
123
|
-
|
124
|
-
Style/IpAddresses:
|
125
|
-
Enabled: true
|
126
|
-
|
127
|
-
Style/MethodCallWithArgsParentheses:
|
128
|
-
Enabled: false
|
129
|
-
|
130
|
-
Style/MethodCalledOnDoEndBlock:
|
131
|
-
Enabled: true
|
132
|
-
|
133
|
-
Style/MissingElse:
|
134
|
-
Enabled: true
|
135
|
-
|
136
|
-
Style/MultilineMethodSignature:
|
137
|
-
Enabled: true
|
138
|
-
|
139
|
-
Style/OptionHash:
|
140
|
-
Enabled: true
|
141
|
-
|
142
|
-
Style/ReturnNil:
|
143
|
-
Enabled: true
|
144
|
-
|
145
|
-
Style/SingleLineBlockParams:
|
146
|
-
Enabled: true
|
147
|
-
|
148
|
-
Style/StderrPuts:
|
149
|
-
Enabled: true
|
150
|
-
|
151
|
-
Style/StringMethods:
|
152
|
-
Enabled: true
|
153
|
-
|
154
|
-
Style/ExponentialNotation:
|
155
|
-
Enabled: true
|
156
|
-
|
157
|
-
Style/RedundantRegexpCharacterClass:
|
158
|
-
Enabled: true
|
159
|
-
|
160
|
-
Style/RedundantRegexpEscape:
|
161
|
-
Enabled: true
|
162
|
-
|
163
|
-
Style/SlicingWithRange:
|
164
|
-
Enabled: true
|
29
|
+
Naming/RescuedExceptionsVariableName:
|
30
|
+
PreferredName: error
|
data/Gemfile
CHANGED
@@ -1,8 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
6
|
|
5
|
-
gem 'coveralls', require: false
|
6
|
-
|
7
7
|
# Specify your gem's dependencies in html2rss.gemspec
|
8
8
|
gemspec
|
9
|
+
|
10
|
+
group :development, :test do
|
11
|
+
gem 'byebug'
|
12
|
+
gem 'rake'
|
13
|
+
gem 'rspec', '~> 3.0'
|
14
|
+
gem 'rubocop'
|
15
|
+
gem 'rubocop-md'
|
16
|
+
gem 'rubocop-performance'
|
17
|
+
gem 'rubocop-rake'
|
18
|
+
gem 'rubocop-rspec'
|
19
|
+
gem 'vcr'
|
20
|
+
gem 'yard'
|
21
|
+
end
|
22
|
+
|
23
|
+
group :test do
|
24
|
+
gem 'simplecov', require: false
|
25
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,139 +1,153 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
html2rss (0.
|
5
|
-
activesupport (>= 5, < 7)
|
4
|
+
html2rss (0.10.0)
|
6
5
|
addressable (~> 2.7)
|
7
|
-
|
8
|
-
faraday
|
9
|
-
faraday_middleware
|
6
|
+
faraday (> 2.0.1, < 3.0)
|
7
|
+
faraday-follow_redirects
|
10
8
|
kramdown
|
11
9
|
mime-types (> 3.0)
|
12
10
|
nokogiri (>= 1.10, < 2.0)
|
11
|
+
regexp_parser
|
13
12
|
reverse_markdown (~> 2.0)
|
14
|
-
|
15
|
-
|
13
|
+
rss
|
14
|
+
sanitize (~> 6.0)
|
15
|
+
thor
|
16
|
+
tzinfo
|
16
17
|
zeitwerk
|
17
18
|
|
18
19
|
GEM
|
19
20
|
remote: https://rubygems.org/
|
20
21
|
specs:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
minitest (~> 5.1)
|
25
|
-
tzinfo (~> 1.1)
|
26
|
-
zeitwerk (~> 2.2, >= 2.2.2)
|
27
|
-
addressable (2.7.0)
|
28
|
-
public_suffix (>= 2.0.2, < 5.0)
|
29
|
-
ast (2.4.1)
|
30
|
-
builder (3.2.4)
|
22
|
+
addressable (2.8.6)
|
23
|
+
public_suffix (>= 2.0.2, < 6.0)
|
24
|
+
ast (2.4.2)
|
31
25
|
byebug (11.1.3)
|
32
|
-
concurrent-ruby (1.
|
33
|
-
coveralls (0.7.2)
|
34
|
-
multi_json (~> 1.3)
|
35
|
-
rest-client (= 1.6.7)
|
36
|
-
simplecov (>= 0.7)
|
37
|
-
term-ansicolor (= 1.2.2)
|
38
|
-
thor (= 0.18.1)
|
26
|
+
concurrent-ruby (1.2.3)
|
39
27
|
crass (1.0.6)
|
40
|
-
diff-lcs (1.
|
41
|
-
docile (1.
|
42
|
-
faraday (
|
43
|
-
|
44
|
-
|
45
|
-
faraday (
|
46
|
-
|
47
|
-
|
48
|
-
|
28
|
+
diff-lcs (1.5.1)
|
29
|
+
docile (1.4.0)
|
30
|
+
faraday (2.9.0)
|
31
|
+
faraday-net_http (>= 2.0, < 3.2)
|
32
|
+
faraday-follow_redirects (0.3.0)
|
33
|
+
faraday (>= 1, < 3)
|
34
|
+
faraday-net_http (3.1.0)
|
35
|
+
net-http
|
36
|
+
json (2.7.2)
|
37
|
+
kramdown (2.4.0)
|
49
38
|
rexml
|
50
|
-
|
39
|
+
language_server-protocol (3.17.0.3)
|
40
|
+
mime-types (3.5.2)
|
51
41
|
mime-types-data (~> 3.2015)
|
52
|
-
mime-types-data (3.
|
53
|
-
mini_portile2 (2.
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
42
|
+
mime-types-data (3.2024.0305)
|
43
|
+
mini_portile2 (2.8.6)
|
44
|
+
net-http (0.4.1)
|
45
|
+
uri
|
46
|
+
nokogiri (1.16.5)
|
47
|
+
mini_portile2 (~> 2.8.2)
|
48
|
+
racc (~> 1.4)
|
49
|
+
nokogiri (1.16.5-x86_64-darwin)
|
50
|
+
racc (~> 1.4)
|
51
|
+
nokogiri (1.16.5-x86_64-linux)
|
52
|
+
racc (~> 1.4)
|
53
|
+
parallel (1.24.0)
|
54
|
+
parser (3.3.1.0)
|
55
|
+
ast (~> 2.4.1)
|
56
|
+
racc
|
57
|
+
public_suffix (5.0.5)
|
58
|
+
racc (1.7.3)
|
59
|
+
rainbow (3.1.1)
|
60
|
+
rake (13.2.1)
|
61
|
+
regexp_parser (2.9.0)
|
62
|
+
reverse_markdown (2.1.1)
|
70
63
|
nokogiri
|
71
|
-
rexml (3.2
|
72
|
-
|
73
|
-
|
74
|
-
rspec-
|
75
|
-
rspec-
|
76
|
-
|
77
|
-
|
78
|
-
|
64
|
+
rexml (3.3.2)
|
65
|
+
strscan
|
66
|
+
rspec (3.13.0)
|
67
|
+
rspec-core (~> 3.13.0)
|
68
|
+
rspec-expectations (~> 3.13.0)
|
69
|
+
rspec-mocks (~> 3.13.0)
|
70
|
+
rspec-core (3.13.0)
|
71
|
+
rspec-support (~> 3.13.0)
|
72
|
+
rspec-expectations (3.13.0)
|
79
73
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
-
rspec-support (~> 3.
|
81
|
-
rspec-mocks (3.
|
74
|
+
rspec-support (~> 3.13.0)
|
75
|
+
rspec-mocks (3.13.0)
|
82
76
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
|
-
rspec-support (~> 3.
|
84
|
-
rspec-support (3.
|
85
|
-
|
77
|
+
rspec-support (~> 3.13.0)
|
78
|
+
rspec-support (3.13.1)
|
79
|
+
rss (0.3.0)
|
80
|
+
rexml
|
81
|
+
rubocop (1.63.4)
|
82
|
+
json (~> 2.3)
|
83
|
+
language_server-protocol (>= 3.17.0)
|
86
84
|
parallel (~> 1.10)
|
87
|
-
parser (>=
|
85
|
+
parser (>= 3.3.0.2)
|
88
86
|
rainbow (>= 2.2.2, < 4.0)
|
89
|
-
regexp_parser (>= 1.
|
90
|
-
rexml
|
91
|
-
rubocop-ast (>=
|
87
|
+
regexp_parser (>= 1.8, < 3.0)
|
88
|
+
rexml (>= 3.2.5, < 4.0)
|
89
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
92
90
|
ruby-progressbar (~> 1.7)
|
93
|
-
unicode-display_width (>=
|
94
|
-
rubocop-ast (
|
95
|
-
parser (>=
|
96
|
-
rubocop-
|
97
|
-
rubocop (
|
98
|
-
rubocop-
|
99
|
-
rubocop (
|
100
|
-
|
101
|
-
|
91
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
92
|
+
rubocop-ast (1.31.3)
|
93
|
+
parser (>= 3.3.1.0)
|
94
|
+
rubocop-capybara (2.20.0)
|
95
|
+
rubocop (~> 1.41)
|
96
|
+
rubocop-factory_bot (2.25.1)
|
97
|
+
rubocop (~> 1.41)
|
98
|
+
rubocop-md (1.2.2)
|
99
|
+
rubocop (>= 1.0)
|
100
|
+
rubocop-performance (1.21.0)
|
101
|
+
rubocop (>= 1.48.1, < 2.0)
|
102
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
103
|
+
rubocop-rake (0.6.0)
|
104
|
+
rubocop (~> 1.0)
|
105
|
+
rubocop-rspec (2.29.1)
|
106
|
+
rubocop (~> 1.40)
|
107
|
+
rubocop-capybara (~> 2.17)
|
108
|
+
rubocop-factory_bot (~> 2.22)
|
109
|
+
rubocop-rspec_rails (~> 2.28)
|
110
|
+
rubocop-rspec_rails (2.28.3)
|
111
|
+
rubocop (~> 1.40)
|
112
|
+
ruby-progressbar (1.13.0)
|
113
|
+
sanitize (6.1.0)
|
102
114
|
crass (~> 1.0.2)
|
103
|
-
nokogiri (>= 1.
|
104
|
-
|
105
|
-
simplecov (0.18.5)
|
115
|
+
nokogiri (>= 1.12.0)
|
116
|
+
simplecov (0.22.0)
|
106
117
|
docile (~> 1.1)
|
107
118
|
simplecov-html (~> 0.11)
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
zeitwerk (2.3.0)
|
119
|
+
simplecov_json_formatter (~> 0.1)
|
120
|
+
simplecov-html (0.12.3)
|
121
|
+
simplecov_json_formatter (0.1.4)
|
122
|
+
strscan (3.1.0)
|
123
|
+
thor (1.3.1)
|
124
|
+
tzinfo (2.0.6)
|
125
|
+
concurrent-ruby (~> 1.0)
|
126
|
+
unicode-display_width (2.5.0)
|
127
|
+
uri (0.13.0)
|
128
|
+
vcr (6.2.0)
|
129
|
+
yard (0.9.36)
|
130
|
+
zeitwerk (2.6.13)
|
121
131
|
|
122
132
|
PLATFORMS
|
123
133
|
ruby
|
134
|
+
x86_64-darwin
|
135
|
+
x86_64-darwin-20
|
136
|
+
x86_64-linux
|
124
137
|
|
125
138
|
DEPENDENCIES
|
126
|
-
bundler
|
127
139
|
byebug
|
128
|
-
coveralls
|
129
140
|
html2rss!
|
141
|
+
rake
|
130
142
|
rspec (~> 3.0)
|
131
143
|
rubocop
|
144
|
+
rubocop-md
|
132
145
|
rubocop-performance
|
146
|
+
rubocop-rake
|
133
147
|
rubocop-rspec
|
134
148
|
simplecov
|
135
149
|
vcr
|
136
150
|
yard
|
137
151
|
|
138
152
|
BUNDLED WITH
|
139
|
-
2.1
|
153
|
+
2.4.1
|