feedzirra-podcast 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bf178771542d09fa0659e00d136c4e235b43ad4f
4
+ data.tar.gz: 9e6ed2f6b8e6ef8e727ccbc48b7ecf12ea2a525f
5
+ SHA512:
6
+ metadata.gz: 8d242e9e7f93d4b0ea5dca69b6859f1674bbdd6844299c9fe921713b6d8fa1f3b531c311b894e7a7c1550da5f5516fb17dc920a041188aa5a3bfe40400173a6d
7
+ data.tar.gz: 2fb68e1873e23d68034c55ad7734c77909347424676ec1ae3024c76cc610d31a37160b97a6ee533350107bdb8de7206c60a78696dc086b4f6695e537c79c560a
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ .DS_Store
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ vendor/
13
+ lib/bundler/man
14
+ pkg
15
+ rdoc
16
+ spec/reports
17
+ test/tmp
18
+ test/version_tmp
19
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in feedzirra-podcast.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 PRX, Inc.
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # Feedzirra-Podcast
2
+
3
+ A set of Feedzirra parsers intended to parse common RSS feeds used for podcasting.
4
+
5
+ At present, there is no specific attribute (DTD, namespace, etc) that indicates an RSS feed is a podcsat. In general, a feed that uses only standard RSS 2.0 elements is acceptable for representing a podcast. Because of this, `feedzirra-podcast` parsers will
6
+
7
+ Even though there is an RSS 2.0 parser included in this library, it is not explicitly intended to be used to parse any RSS feed. This library is only intended to handle feeds you expect to be podcasts.
8
+
9
+ ### Compatibility
10
+
11
+ Unlike the parsers that are included with Feedzirra by default, these parsers do not try to normalize the names of similar elements from different types of feeds (RSS, Atom, etc).
12
+
13
+ If you add feedzirra-podcast parsers to the set of global Feedzirra parsers, it will likely match many feeds that would otherwise be handled by the native parsers. Your code would likely stop working if you had previously been using the normalized accessors.
14
+
15
+ If you want to avoid potential conflicts, you can directly pass feeds to the podcast parser, without registering it to Feedzirra.
16
+
17
+ FeedzirraPodcast::Parser::Podcast.parse(feed_xml_string)
18
+
19
+ ## Usage
20
+
21
+ The parser attempts to match the structure and naming conventions of the actual feed XML elements as closely as possible. `<link>` tags are accessed through `item.link`, etc.
22
+
23
+ The goal is to support all elements common to podcast feeds. Currently not all elements are supported; as they are added, they will be listed below.
24
+
25
+ When it makes sense for an element's value to be parsed or tranformed into a non-string object, that will be done. The string value is always preserved, though.
26
+
27
+ ### Channel
28
+
29
+ <link> feed.link
30
+ <title> feed.title
31
+ <description> feed.description
32
+
33
+ <language> feed.language
34
+ <copyright> feed.copyright
35
+ <managingEditor> feed.managingEditor
36
+ <webMaster> feed.webMaster
37
+ <pubDate> feed.pubDate (Time)
38
+ feed.pub_date_string (String)
39
+ <lastBuildDate> feed.lastBuildDate (Time)
40
+ feed.last_build_date_string (String)
41
+ <category> feed.categories (Array of Strings)
42
+ <image> feed.image (RSS2ChannelImage)
43
+ feed.image.url
44
+ feed.image.title
45
+ feed.image.link
46
+ feed.image.width
47
+ feed.image.height
48
+ feed.image.description
49
+ <docs> feed.docs
50
+
51
+ <generator> feed.generator
52
+ <rating> feed.rating
53
+ <ttl> feed.ttl
54
+
55
+ <item> feed.items (Array)
56
+
57
+ <itunes:author> feed.itunes_author
58
+ <itunes:owner> feed.itunes_owner
59
+ feed.itunes_owner.email
60
+ feed.itunes_owner.name
61
+ <itunes:explicit> feed.itunes_explicit (true, false, :clean)
62
+ feed.itunes_explicit_string
63
+ <itunes:subtitle> feed.itunes_subtitle
64
+ <itunes:summary> feed.itunes_summary
65
+ <itunes:keywords> feed.itunes_keywords (Array of Strings)
66
+ feed.itunes_keywords_string
67
+
68
+ <itunes:block> feed.itunes_block (true, false)
69
+ feed.itunes_block_string
70
+ <itunes:complete> feed.itunes_complete (true, false)
71
+ feed.itunes_complete_string
72
+ <itunes:new-feed-url> feed.itunes_new_feed_url
73
+
74
+ <issn> feed.issn
75
+
76
+ ### Items
77
+
78
+ <title> item.title
79
+ <description> item.description
80
+
81
+ <link> item.link
82
+ <author> item.author
83
+ <pubDate> item.pubDate (Time)
84
+ <source> item.source
85
+ item.source.title
86
+ item.source.url
87
+ <category> item.categories (Array of Strings)
88
+ <guid> item.guid
89
+ <enclosure> item.enclosure
90
+ item.enclosure.url
91
+ item.enclosure.type
92
+ item.enclosure.length
93
+
94
+ <comments> item.comments
95
+
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.libs.push 'lib'
6
+ t.test_files = FileList['test/*_test.rb']
7
+ t.verbose = true
8
+ end
9
+
10
+ desc 'Run tests'
11
+ task :default => :test