rss_to_dynarex 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rss_to_dynarex.rb +29 -0
- metadata +2 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd932fccec28e8b74d755006f6a6fdc11396676f
|
4
|
+
data.tar.gz: 546e65d2f4ac4e2c2bd10d59853dbf44e287f85a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f3974af7a1d30474b81dac81e5de632ebff123d6b927eb041ba8358ae643d307ca80327e2854473bde436a954d73461bda33d76ee07d6e4ae3dc126da1ee044
|
7
|
+
data.tar.gz: de6e059fa0683b59fd331aaa8297bc39a253a243a40f83474f71cedb7fd66df80316a34d14bc547ed6800ff019d48c717a77fd901af16b001f5ed41f5d62ac75
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# file: rss_to_dynarex.rb
|
4
|
+
|
5
|
+
require 'dynarex'
|
6
|
+
require 'nokogiri'
|
7
|
+
|
8
|
+
class RSStoDynarex
|
9
|
+
|
10
|
+
attr_reader :to_dynarex
|
11
|
+
|
12
|
+
def initialize(url)
|
13
|
+
|
14
|
+
lib = File.dirname(__FILE__)
|
15
|
+
xsl_buffer = File.read(lib + '/rss_to_dynarex.xsl')
|
16
|
+
|
17
|
+
xslt = Nokogiri::XSLT(xsl_buffer)
|
18
|
+
doc = open(url, 'UserAgent' => 'RSStoDynarex')
|
19
|
+
@to_dynarex = xslt.transform(Nokogiri::XML(doc.to_s))
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
if __FILE__ == $0 then
|
25
|
+
|
26
|
+
rtd = RSStoDynarex.new 'http://stallman.org/rss.xml'
|
27
|
+
dynarex = rtd.to_dynarex
|
28
|
+
dynarex.save 'rms.xml'
|
29
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rss_to_dynarex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -67,6 +67,7 @@ executables: []
|
|
67
67
|
extensions: []
|
68
68
|
extra_rdoc_files: []
|
69
69
|
files:
|
70
|
+
- lib/rss_to_dynarex.rb
|
70
71
|
- lib/rss_to_dynarex.xsl
|
71
72
|
homepage: https://github.com/jrobertson/rss_to_dynarex
|
72
73
|
licenses:
|
metadata.gz.sig
CHANGED
Binary file
|