isi 1.2.2 → 1.2.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 +10 -3
- data/Rakefile +2 -2
- data/index.en.html +346 -0
- data/index.ja.html +10 -10
- data/lib/isi.rb +10 -4
- metadata +4 -4
data/README
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
"isi2html" generates a list of articles in an HTML file.
|
6
6
|
The package also includes "isi2kakenhi" and "isi2tohoku".
|
7
7
|
|
8
|
-
(
|
8
|
+
(Thomson Reuters Web of Science http://webofknowledge.com provides their bibliographic
|
9
9
|
information in ISI Export Format. You can get the tagged Marked List in
|
10
10
|
Web of Science by clicking the [SAVE TO FILE] button.)
|
11
11
|
|
@@ -187,10 +187,17 @@ http://images.webofknowledge.com/WOKRS52B10/help/ja/WOS/hs_wos_fieldtags.html
|
|
187
187
|
* none.
|
188
188
|
|
189
189
|
== TODO
|
190
|
-
* lib/isi.rb combine
|
191
|
-
|
190
|
+
* In lib/isi.rb, combine
|
191
|
+
ISI_record#and_separated_authors() and
|
192
|
+
ISI_record#comma_and_separated_authors() into
|
193
|
+
ISI_record#separated_authors().
|
192
194
|
* Write papers, not tools for writing papers.
|
193
195
|
* tests/isi_test.rb
|
196
|
+
* Move output formats from lib/isi.rb to isi2html, isi2tohoku and isi2kakenhi.
|
197
|
+
Leave that for isi2bibtex in lib/isi.rb.
|
198
|
+
* We do not need journaltitleabbreviation.rb any more.
|
199
|
+
* Daemon for Linux. Automatic ~/Desktop/savedrecs.txt -> savedrecs.bib
|
200
|
+
using inotify().
|
194
201
|
|
195
202
|
# Local variables:
|
196
203
|
# mode: RD
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#! /usr/bin/env rake
|
2
2
|
# -*-Ruby-*-
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <2011-07-21 17:20:12 takeshi>
|
4
4
|
# Author: Takeshi Nishimatsu
|
5
5
|
##
|
6
6
|
$LOAD_PATH.unshift('lib')
|
@@ -49,7 +49,7 @@ task :package => [ :isi_version_rb, "index.en.html" ]
|
|
49
49
|
|
50
50
|
desc "Create index.en.html"
|
51
51
|
file "index.en.html" => ["style.css", "README"] do |t|
|
52
|
-
sh "
|
52
|
+
sh "ulmul2html5 -m 1 -s #{t.prerequisites[0]} #{t.prerequisites[1]} | sed -e 's%</h1>%</h1><div class=\"navi\">[<a href=\"index.en.html\">English</a>/<a href=\"index.ja.html\">Japanese</a>]</div>%' > #{t.name}"
|
53
53
|
end
|
54
54
|
|
55
55
|
desc "Copy lib/isi.rb ../isi-X.Y.Z.rb"
|
data/index.en.html
CHANGED
@@ -0,0 +1,346 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
|
+
<title>isi = Ruby Scripts and Libraries for ISI Export Format</title>
|
6
|
+
<meta name="author" content="takeshi" />
|
7
|
+
<meta name="copyright" content="Copyright © 2011 takeshi" />
|
8
|
+
<script type="text/x-mathjax-config">
|
9
|
+
MathJax.Hub.Config({
|
10
|
+
tex2jax: {
|
11
|
+
inlineMath: [ ['$','$'] ]
|
12
|
+
}
|
13
|
+
});
|
14
|
+
</script>
|
15
|
+
<link rel="stylesheet" href="style.css" type="text/css" />
|
16
|
+
<link rel="shortcut icon" href="favicon.ico" />
|
17
|
+
</head>
|
18
|
+
<body onload="prettyPrint()">
|
19
|
+
<div class="slide cover">
|
20
|
+
<h1 id="LABEL-1">isi = Ruby Scripts and Libraries for ISI Export Format</h1><div class="navi">[<a href="index.en.html">English</a>/<a href="index.ja.html">Japanese</a>]</div>
|
21
|
+
<!-- Contents -->
|
22
|
+
</div>
|
23
|
+
|
24
|
+
|
25
|
+
<div class="slide">
|
26
|
+
<h2 id="LABEL-2">What is isi?</h2>
|
27
|
+
<p>
|
28
|
+
"isi" is a package of Ruby libraries and scripts for ISI Export Format.
|
29
|
+
"isi2bibtex" converts ISI Export Format to BibTeX Format.
|
30
|
+
"isi2html" generates a list of articles in an HTML file.
|
31
|
+
The package also includes "isi2kakenhi" and "isi2tohoku".
|
32
|
+
</p>
|
33
|
+
<p>
|
34
|
+
(Thomson Reuters Web of Science <a href="http://webofknowledge.com">http://webofknowledge.com</a> provides their bibliographic
|
35
|
+
information in ISI Export Format. You can get the tagged Marked List in
|
36
|
+
Web of Science by clicking the [SAVE TO FILE] button.)
|
37
|
+
</p>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
|
41
|
+
<div class="slide">
|
42
|
+
<h2 id="LABEL-3">Where is the homepage of isi?</h2>
|
43
|
+
<p>
|
44
|
+
<a href="http://isi-rb.rubyforge.org/">http://isi-rb.rubyforge.org/</a>
|
45
|
+
</p>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
<div class="slide">
|
50
|
+
<h2 id="LABEL-4">Where can I download isi?</h2>
|
51
|
+
<p>
|
52
|
+
Go to <a href="http://rubyforge.org/projects/isi-rb">http://rubyforge.org/projects/isi-rb</a> or <a href="http://rubygems.org/gems/isi">http://rubygems.org/gems/isi</a> .
|
53
|
+
</p>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
<div class="slide">
|
58
|
+
<h2 id="LABEL-5">How can I install isi?</h2>
|
59
|
+
<p>
|
60
|
+
There are three different ways to install isi.
|
61
|
+
</p>
|
62
|
+
<h3 id="LABEL-6">I. Conservative way; use setup.rb</h3>
|
63
|
+
<p>
|
64
|
+
isi-X.Y.Z.tgz package can be installed as:
|
65
|
+
</p>
|
66
|
+
<pre>
|
67
|
+
$ tar zxf isi-X.Y.Z.tgz
|
68
|
+
$ cd isi-X.Y.Z
|
69
|
+
$ su
|
70
|
+
# ruby setup.rb
|
71
|
+
</pre>
|
72
|
+
<p>
|
73
|
+
Note that the text-format and text-hyphen libraries <a href="http://rubyforge.org/projects/text-format">http://rubyforge.org/projects/text-format</a> is required.
|
74
|
+
</p>
|
75
|
+
<h3 id="LABEL-7">II. RubyGems users can take an easy way</h3>
|
76
|
+
<p>
|
77
|
+
There is an easy way, if you are a RubyGems user:
|
78
|
+
</p>
|
79
|
+
<pre>
|
80
|
+
$ su
|
81
|
+
# gem install isi
|
82
|
+
</pre>
|
83
|
+
<p>
|
84
|
+
If you do not have the text-format and text-hyphen libraries,
|
85
|
+
gem will download and install the libraries automatically.
|
86
|
+
</p>
|
87
|
+
<h3 id="LABEL-8">III. Simple way; just copy isi.rb and journaltitleabbreviation.rb</h3>
|
88
|
+
<p>
|
89
|
+
Just copy lib/isi.rb (isi-X.Y.Z.rb) and
|
90
|
+
lib/journaltitleabbreviation.rb (journaltitleabbreviation-X.Y.Z.rb)
|
91
|
+
into your working directory which contains your saved "Marked List",
|
92
|
+
e.g. savedrecs.txt.
|
93
|
+
</p>
|
94
|
+
<pre>
|
95
|
+
$ cp lib/isi.rb lib/journaltitleabbreviation.rb ~/your/working/directory/
|
96
|
+
($ cp isi-X.Y.Z.rb ~/your/working/directory/isi.rb)
|
97
|
+
$ cp lib/journaltitleabbreviation.rb ~/your/working/directory/
|
98
|
+
($ cp journaltitleabbreviation-X.Y.Z.rb ~/your/working/directory/journaltitleabbreviation.rb)
|
99
|
+
$ cd ~/your/working/directory/
|
100
|
+
$ ruby isi.rb savedrecs1.txt savedrecs2.txt
|
101
|
+
$ ruby isi.rb < savedrecs.txt > savedrecs.bib
|
102
|
+
</pre>
|
103
|
+
<p>
|
104
|
+
Last two lines are examples of usage for this installation way.
|
105
|
+
</p>
|
106
|
+
<p>
|
107
|
+
Note that the text-format and text-hyphen libraries <a href="http://rubyforge.org/projects/text-format">http://rubyforge.org/projects/text-format</a> is required.
|
108
|
+
</p>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
112
|
+
<div class="slide">
|
113
|
+
<h2 id="LABEL-9">How can I use it?</h2>
|
114
|
+
<h3 id="LABEL-10">Save the marked records to an output file in ISI Web of Science</h3>
|
115
|
+
<p>
|
116
|
+
Mark the articles in ISI Web of Science. Then, view and save the
|
117
|
+
marked records to an output file (savedrecs.txt). I recommend to
|
118
|
+
check "Author(s)", "Title", "Source", "abstract*", "keywords",
|
119
|
+
"times cited" and "source abbreviation" as the fields to include
|
120
|
+
in the output file.
|
121
|
+
</p>
|
122
|
+
<h3 id="LABEL-11">Here are some examples</h3>
|
123
|
+
<pre>
|
124
|
+
$ isi2bibtex savedrecs.txt
|
125
|
+
$ isi2bibtex savedrecs1.txt savedrecs2.txt > savedrecs.bib
|
126
|
+
$ isi2bibtex < savedrecs.txt > savedrecs.bib
|
127
|
+
$ cat savedrecs.txt | isi2bibtex > savedrecs.bib
|
128
|
+
</pre>
|
129
|
+
<h3 id="LABEL-12">Some other useful executables</h3>
|
130
|
+
<p>
|
131
|
+
For KakenhiLaTeX <a href="http://osksn2.hep.sci.osaka-u.ac.jp/~taku/kakenhiLaTeX/">http://osksn2.hep.sci.osaka-u.ac.jp/~taku/kakenhiLaTeX/</a>
|
132
|
+
</p>
|
133
|
+
<pre>
|
134
|
+
$ isi2kakenhi --help
|
135
|
+
$ isi2kakenhi --name-regexp='(H\. Yukawa|Hideki Yukawa)' savedrecs.txt > papers.tex
|
136
|
+
</pre>
|
137
|
+
<p>
|
138
|
+
For the database of "Academic Research Staff at Tohoku University" <a href="http://db.tohoku.ac.jp/whois/TunvTopE.html">http://db.tohoku.ac.jp/whois/TunvTopE.html</a>
|
139
|
+
</p>
|
140
|
+
<pre>
|
141
|
+
$ isi2tohoku --help
|
142
|
+
$ isi2tohoku --id 12345678 --name 'Example Name' savedrecs.txt
|
143
|
+
</pre>
|
144
|
+
<p>
|
145
|
+
To convert ISI Export Format to HTML
|
146
|
+
</p>
|
147
|
+
<pre>
|
148
|
+
$ isi2html --help
|
149
|
+
$ isi2html --full-name='Hideki Yukawa' --name-regexp='(H\. Yukawa|Hideki Yukawa)' savedrecs.txt > index.html
|
150
|
+
</pre>
|
151
|
+
<h3 id="LABEL-13">You can use isi as a library.</h3>
|
152
|
+
<p>
|
153
|
+
Here is an example:
|
154
|
+
</p>
|
155
|
+
<pre>
|
156
|
+
#!/usr/bin/env ruby
|
157
|
+
##
|
158
|
+
require 'rubygems' # You may not need this line.
|
159
|
+
require 'isi'
|
160
|
+
|
161
|
+
class ISI_record
|
162
|
+
def to_title_author
|
163
|
+
"#{@hash['TI']} - #{and_separated_authors}\n"
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
while rec = ARGF.read_an_ISI_record
|
168
|
+
print rec.to_title_author
|
169
|
+
end
|
170
|
+
</pre>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
|
174
|
+
<div class="slide">
|
175
|
+
<h2 id="LABEL-14">Copying</h2>
|
176
|
+
<p>
|
177
|
+
isi is distributed in the hope that
|
178
|
+
it will be useful, but WITHOUT ANY WARRANTY.
|
179
|
+
You can copy, modify and redistribute isi,
|
180
|
+
but only under the conditions described in
|
181
|
+
the GNU General Public License (the "GPL").
|
182
|
+
For more detail, see COPYING.
|
183
|
+
</p>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
|
187
|
+
<div class="slide">
|
188
|
+
<h2 id="LABEL-15">Thanks to contributor(s)!</h2>
|
189
|
+
<p>
|
190
|
+
* Marcin Dulak
|
191
|
+
</p>
|
192
|
+
</div>
|
193
|
+
|
194
|
+
|
195
|
+
<div class="slide">
|
196
|
+
<h2 id="LABEL-16">Who is the author?</h2>
|
197
|
+
<p>
|
198
|
+
NISHIMATSU Takeshi t-nissie{at}imr.tohoku.ac.jp
|
199
|
+
</p>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
|
203
|
+
<div class="slide">
|
204
|
+
<h2 id="LABEL-17">Why did he write it?</h2>
|
205
|
+
<p>
|
206
|
+
Because he do not like the output format of the Perl version.
|
207
|
+
</p>
|
208
|
+
</div>
|
209
|
+
|
210
|
+
|
211
|
+
<div class="slide">
|
212
|
+
<h2 id="LABEL-18">Is there a Perl version?</h2>
|
213
|
+
<p>
|
214
|
+
Yes.
|
215
|
+
You can find the Perl version by Jonathan Swinton, Ben Bolker, Anthony Stone, John J. Lee
|
216
|
+
in CTAN <a href="http://www.ctan.org/tex-archive/biblio/bibtex/utils/isi2bibtex">http://www.ctan.org/tex-archive/biblio/bibtex/utils/isi2bibtex</a> .
|
217
|
+
</p>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
|
221
|
+
<div class="slide">
|
222
|
+
<h2 id="LABEL-19">I do not like the output format of isi2bibtex, neither!</h2>
|
223
|
+
<p>
|
224
|
+
The output format is defined in the source code WYSIWYGly.
|
225
|
+
So you can easily change the output format by yourself.
|
226
|
+
</p>
|
227
|
+
</div>
|
228
|
+
|
229
|
+
|
230
|
+
<div class="slide">
|
231
|
+
<h2 id="LABEL-20">How can I get the latest source tree of isi?</h2>
|
232
|
+
<p>
|
233
|
+
You can checkout the latest source tree of isi anonymously from
|
234
|
+
RubyForge with svn(1) command:
|
235
|
+
</p>
|
236
|
+
<pre>
|
237
|
+
$ svn checkout svn://rubyforge.org/var/svn/isi-rb/isi
|
238
|
+
</pre>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
|
242
|
+
<div class="slide">
|
243
|
+
<h2 id="LABEL-21">Meanings of tags in ISI Export Format</h2>
|
244
|
+
<h3 id="LABEL-22">file-unique tags</h3>
|
245
|
+
<pre>
|
246
|
+
FN: File type. The file starts with 'FN ISI Export Format' or 'FN Thomson Reuters Web of Knowledge'
|
247
|
+
VR: Version number of ISI export file format
|
248
|
+
EF: End of file
|
249
|
+
</pre>
|
250
|
+
<h3 id="LABEL-23">normal tags</h3>
|
251
|
+
<pre>
|
252
|
+
AB: Abstract
|
253
|
+
AF: Authors Full (AU Foo, BAR -> AF Foo, B. A. R.; AU Nishimatsu, T -> AF Nishimatsu Takeshi)
|
254
|
+
AP: Article number of new APS journals (in ISI Web of Knowledge, 2008-)
|
255
|
+
AR: Article number of new APS journals
|
256
|
+
AU: Authors
|
257
|
+
BE: Editors of Proceedings ???
|
258
|
+
BN: ISBN
|
259
|
+
BP: Beginning page
|
260
|
+
C1: Research addresses
|
261
|
+
CA: Group authors
|
262
|
+
CL: Conference location
|
263
|
+
CR: Cited references
|
264
|
+
CT: Conference title
|
265
|
+
CY: Conference Date
|
266
|
+
DE: Original keywords
|
267
|
+
DI: DOI
|
268
|
+
DT: Document type
|
269
|
+
ED: Editors
|
270
|
+
EM: E-mail address
|
271
|
+
EP: Ending page
|
272
|
+
ER: end of a record
|
273
|
+
FN: File name
|
274
|
+
FU: Funding agency and grant number
|
275
|
+
FX: Funding text
|
276
|
+
GA: IDS number (ISI original)
|
277
|
+
HO: Conference host
|
278
|
+
ID: New keywords given by ISI
|
279
|
+
IS: issue
|
280
|
+
J9: 29-character journal title abbreviation
|
281
|
+
JI: ISO journal title abbreviation
|
282
|
+
LA: Language
|
283
|
+
NR: Cited reference count
|
284
|
+
PD: Publication date e.g. "JUN 8" or "JUL"
|
285
|
+
PA: Publisher Address
|
286
|
+
PG: the number of pages
|
287
|
+
PI: Publisher city
|
288
|
+
PN: Part number
|
289
|
+
PT: Publication type (e.g., book, journal, book in series)
|
290
|
+
PU: Publisher
|
291
|
+
PY: Publication year
|
292
|
+
RID: Researcher ID
|
293
|
+
RP: Reprint address
|
294
|
+
SE: Book series title
|
295
|
+
SI: Special issue
|
296
|
+
SN: ISSN
|
297
|
+
SO: journal title, in full
|
298
|
+
SP: Conference Sponsors
|
299
|
+
SU: Supplement
|
300
|
+
TC: Times cited
|
301
|
+
TI: Title
|
302
|
+
UT: ISI unique article identifier
|
303
|
+
VL: Volume
|
304
|
+
WC: Research field
|
305
|
+
WP: Publisher web address
|
306
|
+
Z9: Total times cited ???
|
307
|
+
</pre>
|
308
|
+
<h3 id="LABEL-24">isi original tags</h3>
|
309
|
+
<pre>
|
310
|
+
UR: URL
|
311
|
+
</pre>
|
312
|
+
<h3 id="LABEL-25">See also</h3>
|
313
|
+
<p>
|
314
|
+
<a href="http://images.webofknowledge.com/WOKRS52B10/help/ja/WOS/hs_wos_fieldtags.html">http://images.webofknowledge.com/WOKRS52B10/help/ja/WOS/hs_wos_fieldtags.html</a>
|
315
|
+
</p>
|
316
|
+
</div>
|
317
|
+
|
318
|
+
|
319
|
+
<div class="slide">
|
320
|
+
<h2 id="LABEL-26">Known bugs</h2>
|
321
|
+
|
322
|
+
<ul>
|
323
|
+
<li>none.</li>
|
324
|
+
</ul>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
|
328
|
+
<div class="slide">
|
329
|
+
<h2 id="LABEL-27">TODO</h2>
|
330
|
+
|
331
|
+
<ul>
|
332
|
+
<li>In lib/isi.rb, combine
|
333
|
+
ISI_record#and_separated_authors() and
|
334
|
+
ISI_record#comma_and_separated_authors() into
|
335
|
+
ISI_record#separated_authors().</li>
|
336
|
+
<li>Write papers, not tools for writing papers.</li>
|
337
|
+
<li>tests/isi_test.rb</li>
|
338
|
+
<li>Move output formats from lib/isi.rb to isi2html, isi2tohoku and isi2kakenhi.
|
339
|
+
Leave that for isi2bibtex in lib/isi.rb.</li>
|
340
|
+
<li>We do not need journaltitleabbreviation.rb any more.</li>
|
341
|
+
<li>Daemon for Linux. Automatic ~/Desktop/savedrecs.txt -> savedrecs.bib
|
342
|
+
using inotify().</li>
|
343
|
+
</ul>
|
344
|
+
</div>
|
345
|
+
</body>
|
346
|
+
</html>
|
data/index.ja.html
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
</div>
|
16
16
|
|
17
17
|
<p>
|
18
|
-
「isi」はISI
|
18
|
+
「isi」はISI社(現トムソン・ロイター)の巨大な学術論文データベース
|
19
19
|
<a href="http://www.isiknowledge.com/">Web of Science</a>
|
20
20
|
のタグのついた出力ファイル(ISI形式)
|
21
21
|
をBibTeX形式やHTMLなどに変換するRubyスクリプトとライブラリのパッケージです.
|
@@ -82,25 +82,25 @@ gem install isi -p http://proxy.example.com:8080
|
|
82
82
|
|
83
83
|
|
84
84
|
<p>
|
85
|
-
★ 変換したいISI形式のファイルを用意します. ここでは
|
86
|
-
なお,<a href="http://www.isiknowledge.com/">Web of Science</a>でセーブのときに
|
87
|
-
|
85
|
+
★ 変換したいISI形式のファイルを用意します. ここではsavedrecs.txtとします.
|
86
|
+
なお,<a href="http://www.isiknowledge.com/">Web of Science</a>でセーブのときに
|
87
|
+
「ジャーナル省略形」や「抄録」にもチェックを付けておくとよいでしょう.
|
88
88
|
</p>
|
89
89
|
|
90
90
|
<p>
|
91
|
-
・
|
91
|
+
・ savedrecs.txtをBibTeX形式のfoo.bibに変換する方法:
|
92
92
|
</p>
|
93
93
|
|
94
94
|
<pre>
|
95
|
-
isi2bibtex
|
95
|
+
isi2bibtex savedrecs.txt > foo.bib
|
96
96
|
</pre>
|
97
97
|
|
98
98
|
<p>
|
99
|
-
・
|
99
|
+
・savedrecs.txtを「論文一括登録ファイル」形式のfoo.xlcに変換したいなら:
|
100
100
|
</p>
|
101
101
|
|
102
102
|
<pre>
|
103
|
-
isi2tohoku --id 12345678 --name 'Example Name'
|
103
|
+
isi2tohoku --id 12345678 --name 'Example Name' savedrecs.txt > foo.xlc
|
104
104
|
</pre>
|
105
105
|
|
106
106
|
<p>
|
@@ -116,12 +116,12 @@ isi2tohoku --help
|
|
116
116
|
</p>
|
117
117
|
|
118
118
|
<p>
|
119
|
-
・
|
119
|
+
・savedrecs.txtをHTML形式のfoo.htmlに変換したいなら:
|
120
120
|
</p>
|
121
121
|
|
122
122
|
<pre>
|
123
123
|
isi2html --help
|
124
|
-
isi2html --name-regexp='(H\. Yukawa|Hideki Yukawa)' --full-name='Hideki Yukawa'
|
124
|
+
isi2html --name-regexp='(H\. Yukawa|Hideki Yukawa)' --full-name='Hideki Yukawa' savedrecs.txt > foo.html
|
125
125
|
</pre>
|
126
126
|
|
127
127
|
<p>
|
data/lib/isi.rb
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Time-stamp: <2011-07-
|
2
|
+
# Time-stamp: <2011-07-21 17:09:44 takeshi>
|
3
3
|
# Author: Takeshi Nishimatsu
|
4
4
|
# Project homepage: http://isi-rb.rubyforge.org/
|
5
5
|
# Usage: ruby isi.rb savedrecs.txt > savedrecs.bib
|
6
6
|
##
|
7
|
-
ISI_RB_VERSION = '1.2.
|
7
|
+
ISI_RB_VERSION = '1.2.3'
|
8
8
|
require 'text/format' # http://rubyforge.org/projects/text-format/
|
9
|
+
|
10
|
+
# For m17n of Ruby 1.9.x. Thanks, Masayoshi Takahashi-san [ruby-list:47159].
|
11
|
+
if defined?(Encoding) && Encoding.respond_to?("default_external")
|
12
|
+
Encoding.default_external = "UTF-8"
|
13
|
+
end
|
14
|
+
|
9
15
|
class ISI_record
|
10
16
|
public
|
11
17
|
@@order = 0
|
@@ -212,7 +218,7 @@ def ARGF.read_an_ISI_record
|
|
212
218
|
while line = gets
|
213
219
|
#===== a few special cases
|
214
220
|
return ISI_record.new(hash) if line =~ /^ER/
|
215
|
-
next if line =~ /^(EF|FN
|
221
|
+
next if line =~ /^(EF|FN|.FN|...FN|VR)/ # ignore file-unique tags
|
216
222
|
next if line =~ /^\s*$/ # ignore blank lines
|
217
223
|
while line =~ /\!$/
|
218
224
|
line.chomp!.chop! # continued to next line if the line ends with "!"
|
@@ -236,7 +242,7 @@ def ARGF.read_an_ISI_record
|
|
236
242
|
else
|
237
243
|
hash[$1] = $2
|
238
244
|
end
|
239
|
-
when /^(AB|AP|AR|BN|BP|C1|CA|CL|CT|CY|DE|DI|DT|ED|EM|EP|
|
245
|
+
when /^(AB|AP|AR|BN|BP|C1|CA|CL|CT|CY|DE|DI|DT|ED|EM|EP|FU|FX|GA|HO|ID|IS|J9|JI|LA|PA|PD|PI|PN|PT|PU|RP|SC|SE|SI|SN|SO|SP|SU|TI|UT|VL|WC) (.*)$/
|
240
246
|
tag = $1
|
241
247
|
str = $2
|
242
248
|
while (line = gets) =~ /^ /
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 3
|
10
|
+
version: 1.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Takeshi Nishimatsu
|
@@ -15,7 +15,7 @@ autorequire: lib/isi.rb
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-21 00:00:00 +09:00
|
19
19
|
default_executable: isi2bibtex
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|