liveblog-plugin-dxtags 0.2.6 → 0.2.7
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/liveblog-plugin-dxtags.rb +14 -13
- metadata +18 -18
- 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: 3448041ae636819b9fffa8fd0aefdc0cdaf6180a
|
4
|
+
data.tar.gz: 0a00972acf310269cdece174a72bf6eb3267e9e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e099c670a6ca03ab5054fc63bb7e4fb5b73a00924cfc77af4f9fc2fd028fc5df40fa23c88bd0da0b9a768cba675c614c66972438d5eea5371c7d8908ea5a4a1
|
7
|
+
data.tar.gz: '081a71fade23b644062ad9a3504f93875a7b9642cddeeb72b8b0a969aca111bc9db45edcf86554d47feaebf405bc8484954175e1c3814ab1abd81154f8e7236d'
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -19,6 +19,11 @@ class LiveBlogPluginDxTags
|
|
19
19
|
|
20
20
|
def on_new_day(filepath, urlpath)
|
21
21
|
|
22
|
+
px = Polyrex.new 'tags/tag[label]/entry[title, url]'
|
23
|
+
px.save File.join(@todays_filepath, 'tags-seealso.xml')
|
24
|
+
|
25
|
+
return unless File.exists? filepath
|
26
|
+
|
22
27
|
dxt = DynarexTags.new(@parent_filepath, tagfile_xslt: @tag_xsltpath)
|
23
28
|
|
24
29
|
dxt.generate(filepath) do |section|
|
@@ -34,9 +39,6 @@ class LiveBlogPluginDxTags
|
|
34
39
|
end
|
35
40
|
|
36
41
|
return unless @todays_filepath
|
37
|
-
|
38
|
-
px = Polyrex.new 'tags/tag[label]/entry[title, url]'
|
39
|
-
px.save File.join(@todays_filepath, 'tags-seealso.xml')
|
40
42
|
|
41
43
|
end
|
42
44
|
|
@@ -45,23 +47,24 @@ class LiveBlogPluginDxTags
|
|
45
47
|
# check the pxtags file (if it exists) for a matching hashtag
|
46
48
|
|
47
49
|
pxtagsfilepath = File.join(@parent_filepath, 'pxtags.xml')
|
48
|
-
|
50
|
+
pxfilepath = File.join(@todays_filepath, 'tags-seealso.xml')
|
49
51
|
|
50
52
|
if File.exists? pxtagsfilepath then
|
51
53
|
|
52
54
|
doc = Rexle.new File.read(pxtagsfilepath)
|
53
|
-
tags = doc.root.xpath("//tag[
|
55
|
+
tags = doc.root.xpath("//tag[*='#{hashtag}']/text()").uniq
|
54
56
|
|
55
57
|
tags.each do |tag|
|
56
58
|
|
57
59
|
filepath = File.join(@parent_filepath, 'tags', tag + '.xml')
|
60
|
+
|
58
61
|
|
59
|
-
if File.exists? filepath then
|
62
|
+
if File.exists? filepath and File.exists? pxfilepath then
|
60
63
|
|
61
64
|
dx = Dynarex.new filepath
|
62
65
|
recs = dx.to_h
|
63
66
|
|
64
|
-
|
67
|
+
|
65
68
|
px = Polyrex.new pxfilepath
|
66
69
|
px.create.tag( label: hashtag) {|create| recs.each {|h| create.entry h} }
|
67
70
|
px.save options: {pretty: true}
|
@@ -73,17 +76,16 @@ class LiveBlogPluginDxTags
|
|
73
76
|
return if tags.any?
|
74
77
|
|
75
78
|
end
|
76
|
-
|
79
|
+
|
77
80
|
# check the dxtags file for any matching hashtags
|
78
81
|
|
79
82
|
filepath = File.join(@parent_filepath, 'tags', hashtag + '.xml')
|
80
83
|
|
81
|
-
if File.exists? filepath then
|
84
|
+
if File.exists? filepath and File.exists? pxfilepath then
|
82
85
|
|
83
86
|
dx = Dynarex.new filepath
|
84
87
|
recs = dx.to_h
|
85
88
|
|
86
|
-
pxfilepath = File.join(@todays_filepath, 'tags-seealso.xml')
|
87
89
|
px = Polyrex.new pxfilepath
|
88
90
|
px.create.tag( label: hashtag) {|create| recs.each {|h| create.entry h} }
|
89
91
|
px.save options: {pretty: true}
|
@@ -97,7 +99,7 @@ class LiveBlogPluginDxTags
|
|
97
99
|
url = File.join(@urlbase, @todays_filepath)
|
98
100
|
dx.create title: raw_entry.sub(/#\s+/,''), url: url
|
99
101
|
dx.save filepath
|
100
|
-
end
|
102
|
+
end
|
101
103
|
|
102
104
|
end
|
103
105
|
|
@@ -140,5 +142,4 @@ class LiveBlogPluginDxTags
|
|
140
142
|
|
141
143
|
end
|
142
144
|
|
143
|
-
|
144
|
-
end
|
145
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liveblog-plugin-dxtags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -12,26 +12,26 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE2MDYzMDE2MTc0N1oXDTE3MDYzMDE2MTc0N1owSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
17
|
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
ggEBAL09Tlt7UlSqom5sorvj0goCSnFkzy929i2EYLeY1BsvUatp6hR8JCX29X8+
|
19
|
+
+aGchal7mxV39eHBPN816OYnYHZs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
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dynarex-tags
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.5.1
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: A LiveBlog plugin which creates or updates the hashtags lookup files from
|
metadata.gz.sig
CHANGED
Binary file
|