mymedia-dynarex 0.1.0 → 0.1.1
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/mymedia-dynarex.rb +8 -5
- metadata +2 -2
- 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: 2cb333703515c2a6b31929f039db78ec73042d7c
|
4
|
+
data.tar.gz: e12d558ea24b362ac14bb75411e503aa145edb47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d6e791b697846cc0ddc30d0832ce521550ba3f681b5c7122179c91f6fe274b8a1dd06aa5df2fb26d2b655919895a1fac5ae62837994935a51b76fa0f2507542
|
7
|
+
data.tar.gz: 4c43bebb1dd9e2e5bd2340ea95b9fb23b7b903e6a7d07b826faf794c2aecdb11424156e56d96635d6fe5787d2f15f1e8c55905fb9a10b7d247a8150b77f70db6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/mymedia-dynarex.rb
CHANGED
@@ -15,6 +15,7 @@ class MyMediaDynarex < MyMedia::Base
|
|
15
15
|
|
16
16
|
@xsl = '/xsl/dynarex-c.xsl'
|
17
17
|
super(media_type: media_type, public_type: @public_type=public_type, config: config)
|
18
|
+
|
18
19
|
@media_src = "%s/media/%s" % [@home, public_type]
|
19
20
|
@target_ext = '.xml'
|
20
21
|
@rss = true
|
@@ -49,7 +50,9 @@ class MyMediaDynarex < MyMedia::Base
|
|
49
50
|
end
|
50
51
|
|
51
52
|
if not File.basename(src_path)[/d\d{6}T\d{4}\.txt/] then
|
53
|
+
|
52
54
|
xml_filename = File.basename(src_path).sub(/txt$/,'xml')
|
55
|
+
|
53
56
|
FileUtils.cp destination, @home + '/dynarex/' + xml_filename
|
54
57
|
if File.extname(src_path) == '.txt' then
|
55
58
|
FileUtils.cp src_path, @home + '/dynarex/' + File.basename(src_path)
|
@@ -75,20 +78,20 @@ class MyMediaDynarex < MyMedia::Base
|
|
75
78
|
end
|
76
79
|
|
77
80
|
def copy_edit(src_path, destination, raw='')
|
81
|
+
|
78
82
|
txt_destination = destination.sub(/xml$/,'txt')
|
79
83
|
FileUtils.cp src_path, txt_destination
|
80
84
|
|
81
85
|
dynarex = Dynarex.new
|
82
86
|
buffer = File.read(src_path)
|
83
|
-
|
84
87
|
dynarex.parse(File.read(src_path))
|
85
88
|
|
86
89
|
title = dynarex.summary[:title]
|
87
90
|
|
88
|
-
if dynarex.summary
|
89
|
-
|
91
|
+
tags = if dynarex.summary.include? :tags then
|
92
|
+
'#' + dynarex.tags.split.join(' #')
|
90
93
|
else
|
91
|
-
|
94
|
+
''
|
92
95
|
end
|
93
96
|
|
94
97
|
raw_msg = ("%s %s" % [title, tags]).strip
|
@@ -114,4 +117,4 @@ class MyMediaDynarex < MyMedia::Base
|
|
114
117
|
[dynarex, raw_msg]
|
115
118
|
end
|
116
119
|
|
117
|
-
end
|
120
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mymedia-dynarex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
Kvp4vcZbrbtWbd3dbhTZO4vyrKTaYDC5I+bJrqqQS79Ee9i32us9I9vjda5VBbOD
|
32
32
|
LxIJBhL6Ema94A==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2015-01-23 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: mymedia
|
metadata.gz.sig
CHANGED
Binary file
|