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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e426a45b7a21e55a9835cee795ec447d08f6771c
4
- data.tar.gz: 282191502cedd0c1f93959bd92890da6b5890447
3
+ metadata.gz: fd932fccec28e8b74d755006f6a6fdc11396676f
4
+ data.tar.gz: 546e65d2f4ac4e2c2bd10d59853dbf44e287f85a
5
5
  SHA512:
6
- metadata.gz: d252005f628f0ffa7bcb2647fb1b0bb109ea082b36f2e6f43b1af82ac4648f6e0b4d83ee06513ab9f1de6f3c7738ac64e433740326997af5db14080a14b4ee30
7
- data.tar.gz: 9cec95ba6788eb1b5d0f0ed41dfd2140aa441fe08d1bb036305da30faf26fd89cf4af476b8cbddd848a8b542a352c73c33641c0c251c6839ff5b1accd84cdd40
6
+ metadata.gz: 0f3974af7a1d30474b81dac81e5de632ebff123d6b927eb041ba8358ae643d307ca80327e2854473bde436a954d73461bda33d76ee07d6e4ae3dc126da1ee044
7
+ data.tar.gz: de6e059fa0683b59fd331aaa8297bc39a253a243a40f83474f71cedb7fd66df80316a34d14bc547ed6800ff019d48c717a77fd901af16b001f5ed41f5d62ac75
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.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