mymedia-kvx 0.2.0 → 0.2.1

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: 607dfe595e27693b8ecb3f4660ca1da1441eee67
4
- data.tar.gz: 8f685ec20d5d2ceccf63e185a6981138fd3131c3
3
+ metadata.gz: dfd302542de5394b130d108785afe9c42e94badf
4
+ data.tar.gz: a3f18e8cc7e2611e719377dc91451568c8622c78
5
5
  SHA512:
6
- metadata.gz: 882295d9cdc0a0264df79ab262c86d8874d58b6b971ac9ac6a0af4c7d39514b5bd18ba145d0637e12cfb146ab0a5e4b5dfe2eb69cb66aeef72c41fbe07f891be
7
- data.tar.gz: 7d82e1e554947658c1295140096a0857f15d7ec552ec70665e12167e7336f4b2d6fd13f1399ba25f771eacef6ca303654e2e184d66df9d7e3c0ff131eebd1df6
6
+ metadata.gz: 72d545ad82de933c07bb18b4e60c0ce91fa31aa342129652783781cc78dd5a1eda68a1e52c4c51fb05e48ad604719368f14556c9635a4cea7d74b308a8e1372b
7
+ data.tar.gz: d3fcdff70227e23e42b1f4c61515ca564e271e1c87e16d79b1af31a480f8aaf42a98c3dbc15cdf4376d3f50e014f3ba0a72048909ec02074199fb4cdeabb0307
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/mymedia-kvx.rb CHANGED
@@ -9,8 +9,8 @@ class MyMediaKvx < MyMedia::Base
9
9
 
10
10
  attr_reader :kvx
11
11
 
12
- def initialize(opt={}, public_type: 'kvx', media_type: public_type,
13
- config: nil, ext: '.txt')
12
+ def initialize(public_type: 'kvx', media_type: public_type,
13
+ config: nil, ext: '.txt', xsl: nil)
14
14
 
15
15
  @public_type = public_type
16
16
  super(media_type: media_type, public_type: public_type, config: config)
@@ -21,6 +21,7 @@ class MyMediaKvx < MyMedia::Base
21
21
 
22
22
  @media_type = media_type
23
23
  @ext = ext
24
+ @xsl = xsl
24
25
 
25
26
  end
26
27
 
@@ -54,6 +55,7 @@ class MyMediaKvx < MyMedia::Base
54
55
  kvx.summary[:original_source] = File.basename(src_path)
55
56
 
56
57
  File.write dest_xml, kvx.to_s
58
+ File.write raw_dest_xml, kvx.to_s
57
59
 
58
60
  end
59
61
 
@@ -106,9 +108,14 @@ class MyMediaKvx < MyMedia::Base
106
108
  raw_msg = ("%s %s" % [title, tags]).strip
107
109
 
108
110
  kvx.summary[:original_source] = File.basename(src_path)
109
- kvx.summary[:source] = File.basename(txt_destination)
111
+
112
+ source = txt_destination[/\/#{@public_type}.*/]
113
+ relative_path = '/r' + source
110
114
 
111
- kvx.summary[:xslt] = @xsl unless kvx.item[:xslt]
115
+ kvx.summary[:source_url] = relative_path
116
+ kvx.summary[:source_file] = File.basename(txt_destination)
117
+ kvx.summary[:published] = Time.now.strftime("%d-%m-%Y %H:%M")
118
+ kvx.summary[:xslt] = @xsl unless kvx.summary[:xslt]
112
119
  File.write destination, kvx.to_xml
113
120
 
114
121
  [kvx, raw_msg]
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mymedia-kvx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file