math_metadata_lookup 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -3,6 +3,7 @@ About
3
3
 
4
4
  This utility search mathematical reviews sites and fetches metadata about articles.
5
5
  It returns results as one of text, xml, html, yaml or ruby formats.
6
+ It can work with LaTeX accent notation.
6
7
 
7
8
 
8
9
  Installation
@@ -58,25 +58,25 @@ Ref.: #{idx+1}. #{[a[:authors]].flatten.join("; ")}: #{a[:title]}~
58
58
  <authors>~
59
59
  @metadata[:authors].to_a.each do |author|
60
60
  result += %~
61
- <author>#{::CGI.escapeHTML author}</author>~
61
+ <author>#{::CGI.escapeHTML author.to_s}</author>~
62
62
  end
63
63
  result += %~
64
64
  </authors>
65
65
  <msc>~
66
66
  @metadata[:msc].to_a.each do |msc|
67
67
  result += %~
68
- <class>#{::CGI.escapeHTML msc}</class>~
68
+ <class>#{::CGI.escapeHTML msc.to_s}</class>~
69
69
  end
70
70
  result += %~
71
71
  </msc>
72
72
  <pages>#{::CGI.escapeHTML @metadata[:range].to_s}</pages>~
73
73
  @metadata[:issn].to_a.each do |issn|
74
74
  result += %~
75
- <issn>#{::CGI.escapeHTML issn}</issn>~
75
+ <issn>#{::CGI.escapeHTML issn.to_s}</issn>~
76
76
  end
77
77
  @metadata[:keywords].to_a.each do |keyword|
78
78
  result += %~
79
- <keyword>#{::CGI.escapeHTML keyword}</keyword>~
79
+ <keyword>#{::CGI.escapeHTML keyword.to_s}</keyword>~
80
80
  end
81
81
  result += %~
82
82
  <references>
@@ -85,11 +85,11 @@ Ref.: #{idx+1}. #{[a[:authors]].flatten.join("; ")}: #{a[:title]}~
85
85
  ref = reference.article
86
86
  result += %~
87
87
  <reference id="#{::CGI.escapeHTML ref[:id].to_s}" number="#{::CGI.escapeHTML(ref[:number].to_s || (idx+1).to_s)}">
88
- <source>#{::CGI.escapeHTML reference.source}</source>
88
+ <source>#{::CGI.escapeHTML reference.source.to_s}</source>
89
89
  <authors>~
90
90
  [ref[:authors]].flatten.each do |author|
91
91
  result += %~
92
- <author>#{::CGI.escapeHTML author}</author>~
92
+ <author>#{::CGI.escapeHTML author.to_s}</author>~
93
93
  end
94
94
  result += %~
95
95
  </authors>
@@ -128,13 +128,13 @@ Ref.: #{idx+1}. #{[a[:authors]].flatten.join("; ")}: #{a[:title]}~
128
128
  ref = reference.article
129
129
  result += %~
130
130
  <div class="reference">
131
- Source: #{reference.source}
132
- Authors: #{[ref[:authors]].flatten.join("; ")}
133
- Title: #{ref[:title]}
134
- Publication: #{ref[:publication]}
135
- Publisher: #{ref[:publisher]}
136
- Year: #{ref[:year]}
137
- Id: #{ref[:id]}
131
+ Source: #{::CGI.escapeHTML reference.source.to_s}
132
+ Authors: #{::CGI.escapeHTML [ref[:authors]].flatten.join("; ")}
133
+ Title: #{::CGI.escapeHTML ref[:title].to_s}
134
+ Publication: #{::CGI.escapeHTML ref[:publication].to_s}
135
+ Publisher: #{::CGI.escapeHTML ref[:publisher].to_s}
136
+ Year: #{::CGI.escapeHTML ref[:year].to_s}
137
+ Id: #{::CGI.escapeHTML ref[:id].to_s}
138
138
  </div>
139
139
  ~
140
140
  end
@@ -16,10 +16,10 @@ Other: #{form}~
16
16
  def to_xml
17
17
  result = %~
18
18
  <author id="#{::CGI.escapeHTML(@metadata[:id])}">
19
- <name form="preferred">#{::CGI.escapeHTML(@metadata[:preferred])}</name>~
19
+ <name form="preferred">#{::CGI.escapeHTML(@metadata[:preferred].to_s)}</name>~
20
20
  @metadata[:forms].each do |form|
21
21
  result += %~
22
- <name form="other">#{::CGI.escapeHTML(form)}</name>~
22
+ <name form="other">#{::CGI.escapeHTML(form.to_s)}</name>~
23
23
  end
24
24
  result += %~
25
25
  </author>
@@ -32,11 +32,11 @@ Other: #{form}~
32
32
  result = %~
33
33
  <div class="author">
34
34
  <div class="author_id">Id: #{::CGI.escapeHTML(@metadata[:id])}</div>
35
- <div class="preferred">Preferred: #{::CGI.escapeHTML(@metadata[:preferred])}</div>~
35
+ <div class="preferred">Preferred: #{::CGI.escapeHTML(@metadata[:preferred].to_s)}</div>~
36
36
 
37
37
  @metadata[:forms].each do |form|
38
38
  result += %~
39
- <div class="other">Other: #{::CGI.escapeHTML(form)}</div>~
39
+ <div class="other">Other: #{::CGI.escapeHTML(form.to_s)}</div>~
40
40
  end
41
41
 
42
42
  result += %~
@@ -13,7 +13,7 @@ spec = Gem::Specification.new do |s|
13
13
  s.email = "pejuko@gmail.com"
14
14
  s.authors = ["Petr Kovar"]
15
15
  s.name = 'math_metadata_lookup'
16
- s.version = '0.1.2'
16
+ s.version = '0.1.3'
17
17
  s.date = Time.now.strftime("%Y-%m-%d")
18
18
  s.add_dependency('unicode')
19
19
  s.add_dependency('unidecoder')
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Petr Kovar