tabcast 0.1 → 0.2
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/bin/tabcast +2 -1
- data/lib/tabcast.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ad01c63680b740a4b845b429586d37bde47b56d
|
|
4
|
+
data.tar.gz: e1bca0e31ba0f7ec62db27ed4c95a635c3004935
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16c42de36a3134d0e7d24c48ab534fb3ba6151ac619768ea2780a75936af17c4557f107b0a5387aacf7f3902b8c6ec47c5437e1b5a47d19ebfcd5fb818ed6f12
|
|
7
|
+
data.tar.gz: 12dda365007f7cc20c6aaec970b48ced0220708d9fc9d22cc80673b3e6502aa04c45ed4faf71c4007dc7806c0e04a0615ad5b85e1dced70d335608bd8adbd644
|
data/bin/tabcast
CHANGED
|
@@ -23,6 +23,7 @@ The following variables are available to the template:
|
|
|
23
23
|
{{ title }} -> The title of the feed item with new lines removed.
|
|
24
24
|
{{ enclosure_url}} -> The full URL of the feed item's
|
|
25
25
|
{{ author }}, {{ itunes_author }} -> Just what it says on the tin.
|
|
26
|
+
{{ guid }} -> The item's guid (from the feed XML), if it exists, otherwise \"nil\".
|
|
26
27
|
|
|
27
28
|
The following filters are available to the template:
|
|
28
29
|
`whitespace_to_underscores` does exactly what it sounds like.
|
|
@@ -53,6 +54,6 @@ end
|
|
|
53
54
|
optparse.parse!
|
|
54
55
|
|
|
55
56
|
ARGV.each do |url|
|
|
56
|
-
feed = TabCastFeed.new(url, options[:format])
|
|
57
|
+
feed = Tabcast::TabCastFeed.new(url, options[:format])
|
|
57
58
|
puts feed.formatted
|
|
58
59
|
end
|
data/lib/tabcast.rb
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
module Tabcast
|
|
2
|
-
VERSION = "0.1"
|
|
3
|
-
|
|
4
1
|
module TextFilter
|
|
5
2
|
def spaces_to_underscores(input)
|
|
6
3
|
input.gsub(/\s/, '_')
|
|
@@ -19,6 +16,7 @@ VERSION = "0.1"
|
|
|
19
16
|
end
|
|
20
17
|
end
|
|
21
18
|
|
|
19
|
+
module Tabcast
|
|
22
20
|
Liquid::Template.register_filter(TextFilter)
|
|
23
21
|
|
|
24
22
|
class TabCastFeed
|
|
@@ -39,6 +37,7 @@ VERSION = "0.1"
|
|
|
39
37
|
vars['enclosure_url'] = i.enclosure.url if i.enclosure && i.enclosure.url
|
|
40
38
|
vars['itunes_author'] = i.itunes_author if i.itunes_author
|
|
41
39
|
vars['author'] = i.author if i.author
|
|
40
|
+
vars['guid'] = i.guid if i.guid
|
|
42
41
|
|
|
43
42
|
string += @template.render(vars)
|
|
44
43
|
end
|