feedparser 2.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12a89b6c4d0ad5290a16d44a79245a25bb6ff349
4
- data.tar.gz: 63057209038f7cab23eb4fd963d9525b154d2fbb
3
+ metadata.gz: 41e434db09f31136e1a0e9aad46893b738ab50e2
4
+ data.tar.gz: 8f7030711c61cdde977a13f68d5cc5e321ec81b4
5
5
  SHA512:
6
- metadata.gz: 6220dd036c705fedb52a17495001003c88891a912c3ad9e3fed07045adde3f0902d8dcbf3fc7000fbc297b91bba388979c54fbdaf1890f20e541d9216bfc5438
7
- data.tar.gz: 049a3b9cdf4b27fe1fbc2e9109241ed951e4a717e6f620bd6aa7b2b17c9657e1fe468b86fd52cd1bf5ff48192935b3939d6579ca612c5ac576553c2f9bfcb433
6
+ metadata.gz: 674d3d2c3f606036f394cfd9c4ce17787941fc743b75c485373987ceb27326b526f9057253306e2c9dfd19591773cae9ef1c1b953a68530e43db4bec0ee5b16f
7
+ data.tar.gz: f94e683d0dbc429cafed117213dae71797e7a2d6030c3425761fc959e1d42e36410c8d33b8e91d9d611cab64a1ac26687fce43ebcf0f15f101e94f06bff397e0
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # feedparser
2
2
 
3
- feedparser gem - web feed parser and normalizer (Atom, RSS 2.0, JSON Feed, HTML h-entry, etc.)
3
+ feedparser gem - web feed parser and normalizer (Atom, RSS, JSON Feed, HTML h-entry, etc.)
4
4
 
5
5
  * home :: [github.com/feedparser/feedparser](https://github.com/feedparser/feedparser)
6
6
  * bugs :: [github.com/feedparser/feedparser/issues](https://github.com/feedparser/feedparser/issues)
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ Hoe.spec 'feedparser' do
5
5
 
6
6
  self.version = FeedParser::VERSION
7
7
 
8
- self.summary = 'feedparser - web feed parser and normalizer (RSS 2.0, Atom, JSON Feed, HTML h-entry, etc.)'
8
+ self.summary = 'feedparser - web feed parser and normalizer (RSS, Atom, JSON Feed, HTML h-entry, etc.)'
9
9
  self.description = summary
10
10
 
11
11
  self.urls = ['https://github.com/feedparser/feedparser']
@@ -22,7 +22,7 @@ class Author
22
22
  ## or managingEditor (rss) or webMaster (rss) - why? why not??
23
23
 
24
24
  attr_accessor :text # note: holds "unparsed" text (content) line form dc:creator or rss:author
25
-
25
+ alias :line :text # line|text (add str?? too)
26
26
 
27
27
  def to_s
28
28
  ## note: to_s - allows to use just author in templates
@@ -57,6 +57,7 @@ class RssFeedBuilder
57
57
  feed.authors << author
58
58
  end
59
59
 
60
+ ## todo/check - if tag is called webmaster or webMaster ???
60
61
  if rss_feed.channel.webMaster
61
62
  author = Author.new
62
63
  author.text = rss_feed.channel.webMaster.strip
@@ -139,8 +140,8 @@ class RssFeedBuilder
139
140
  logger.debug " rss | item.content_encoded[0..40] >#{rss_item.content_encoded ? rss_item.content_encoded[0..40] : ''}< : #{rss_item.content_encoded.class.name}"
140
141
 
141
142
 
142
- item.updated_local = handle_date( rss_item.pubDate, 'item.pubDate => updated' )
143
- item.updated = item.updated_local.utc if item.updated_local
143
+ item.published_local = handle_date( rss_item.pubDate, 'item.pubDate => published' )
144
+ item.published = item.published_local.utc if item.published_local
144
145
 
145
146
 
146
147
  ## fix/todo: check if rss_item.guid present? !!!!
@@ -25,10 +25,19 @@ class Feed
25
25
  attr_accessor :tags
26
26
  def tags?() @tags && @tags.size > 0; end
27
27
 
28
+ ## add alias category for tags (remove - why? why not?)
29
+ alias :categories :tags
30
+
28
31
 
29
32
  def summary?() @summary.nil? == false; end
30
33
  attr_accessor :summary # e.g. description (rss)|subtitle (atom)
31
34
 
35
+ ## add description as alias for summary (remove - why? why not?)
36
+ alias :description :summary
37
+ alias :description= :summary=
38
+ alias :description? :summary?
39
+
40
+
32
41
  ##
33
42
  ## todo/check/fix:
34
43
  ## use a extra field for atom subtitle
@@ -47,10 +56,16 @@ class Feed
47
56
  attr_accessor :updated # e.g. lastBuildDate (rss)|updated (atom) -- always (converted) to utc
48
57
  attr_accessor :updated_local # "unparsed" local datetime as in feed (NOT converted to utc)
49
58
 
59
+ attr_accessor :updated_text # string version of date
60
+ alias :updated_line :updated_text # text|line - convention for "unparsed" 1:1 from feed; add str(too ??)
61
+
50
62
  def published?() @published.nil? == false; end
51
63
  attr_accessor :published # e.g. pubDate (rss)\n/a (atom) -- note: published is basically an alias for created
52
64
  attr_accessor :published_local # "unparsed" local datetime as in feed (NOT converted to utc)
53
65
 
66
+ attr_accessor :published_text # string version of date
67
+ alias :published_line :published_text # text|line - convention for "unparsed" 1:1 from feed; add str(too ??)
68
+
54
69
 
55
70
  attr_accessor :generator
56
71
 
@@ -18,6 +18,8 @@ class Generator
18
18
 
19
19
 
20
20
  attr_accessor :text # note: holds "unparsed" text (content) line form rss:generator
21
+ alias :line :text # line|text (add str?? too)
22
+
21
23
 
22
24
  def to_s
23
25
  ## note: to_s - allows to use just generator in templates
@@ -35,15 +35,27 @@ class Item
35
35
  def summary?() @summary.nil? == false; end
36
36
  attr_accessor :summary
37
37
 
38
+ ## add description as alias for summary (remove - why? why not?)
39
+ alias :description :summary
40
+ alias :description= :summary=
41
+ alias :description? :summary?
42
+
43
+
38
44
 
39
45
  def updated?() @updated.nil? == false; end
40
46
  attr_accessor :updated # pubDate (RSS)|updated (Atom)
41
47
  attr_accessor :updated_local # "unparsed" local datetime as in feed (NOT converted to utc)
42
48
 
49
+ attr_accessor :updated_text # string version of date
50
+ alias :updated_line :updated_text # text|line - convention for "unparsed" 1:1 from feed; add str(too ??)
51
+
52
+
43
53
  def published?() @published.nil? == false; end
44
54
  attr_accessor :published # note: published is basically an alias for created
45
55
  attr_accessor :published_local # "unparsed" local datetime as in feed (NOT converted to utc)
46
56
 
57
+ attr_accessor :published_text # string version of date
58
+ alias :published_line :published_text # text|line - convention for "unparsed" 1:1 from feed; add str(too ??)
47
59
 
48
60
 
49
61
  attr_accessor :id
@@ -67,6 +79,8 @@ class Item
67
79
  attr_accessor :tags
68
80
  def tags?() @tags && @tags.size > 0; end
69
81
 
82
+ alias :categories :tags # for now allow categories alias for tags - remove (why? why not?)
83
+
70
84
  def initialize
71
85
  ## note: make authors, tags empty arrays on startup (e.g. not nil)
72
86
  @authors = []
@@ -4,7 +4,7 @@ module FeedParser
4
4
 
5
5
  MAJOR = 2
6
6
  MINOR = 0
7
- PATCH = 0
7
+ PATCH = 1
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-08 00:00:00.000000000 Z
11
+ date: 2017-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logutils
@@ -58,16 +58,16 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.15'
61
+ version: '3.16'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '3.15'
69
- description: feedparser - web feed parser and normalizer (RSS 2.0, Atom, JSON Feed,
70
- HTML h-entry, etc.)
68
+ version: '3.16'
69
+ description: feedparser - web feed parser and normalizer (RSS, Atom, JSON Feed, HTML
70
+ h-entry, etc.)
71
71
  email: wwwmake@googlegroups.com
72
72
  executables: []
73
73
  extensions: []
@@ -122,6 +122,6 @@ rubyforge_project:
122
122
  rubygems_version: 2.6.7
123
123
  signing_key:
124
124
  specification_version: 4
125
- summary: feedparser - web feed parser and normalizer (RSS 2.0, Atom, JSON Feed, HTML
126
- h-entry, etc.)
125
+ summary: feedparser - web feed parser and normalizer (RSS, Atom, JSON Feed, HTML h-entry,
126
+ etc.)
127
127
  test_files: []