isi 1.1.2 → 1.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/ChangeLog +21 -0
- data/NewsForRubyforge.txt +3 -0
- data/README +45 -23
- data/Rakefile +12 -4
- data/html/classes/ARGF.src/M000004.html +39 -39
- data/html/classes/ISI_record.src/M000001.html +5 -5
- data/html/classes/ISI_record.src/M000002.html +28 -28
- data/html/classes/ISI_record.src/M000003.html +20 -20
- data/html/created.rid +1 -1
- data/html/files/README.html +55 -25
- data/html/files/lib/isi_rb.html +10 -4
- data/isi.gemspec +7 -6
- data/lib/isi.rb +12 -9
- data/tests/example.isi +53 -0
- data/tests/isi_test.rb +2 -1
- metadata +19 -17
data/ChangeLog
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
2007-08-21 NISHIMATSU Takeshi <takeshi@physics.rutgers.edu>
|
2
|
+
|
3
|
+
* isi-1.1.3.gem: release!
|
4
|
+
|
5
|
+
2007-08-16 NISHIMATSU Takeshi <takeshi@physics.rutgers.edu>
|
6
|
+
|
7
|
+
* lib/isi.rb (ISI_record::pages):
|
8
|
+
In the case of missing AR, BP and EP, pages returns "00000".
|
9
|
+
|
10
|
+
2007-05-01 NISHIMATSU Takeshi <takeshi@physics.rutgers.edu>
|
11
|
+
|
12
|
+
* tests/example.isi: New file
|
13
|
+
|
14
|
+
* lib/isi.rb (read_an_ISI_record): CR, SC
|
15
|
+
|
16
|
+
2007-04-28 NISHIMATSU Takeshi <takeshi@physics.rutgers.edu>
|
17
|
+
|
18
|
+
* Rakefile: isi_version_rb
|
19
|
+
|
20
|
+
* isi-1.1.2.gem: release!
|
21
|
+
|
1
22
|
2007-04-26 NISHIMATSU Takeshi <takeshi@physics.rutgers.edu>
|
2
23
|
|
3
24
|
* ChangeLog: New file.
|
data/README
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
= isi
|
2
2
|
|
3
3
|
== What is isi?
|
4
|
-
isi
|
5
|
-
|
4
|
+
isi is an ISI Export Format to BibTeX Format converter written in
|
5
|
+
Ruby script language. You can use isi as a library, too.
|
6
6
|
|
7
7
|
ISI Web of Science, http://portal.isiknowledge.com,
|
8
8
|
provides their bibliographic information in ISI Export Format.
|
9
9
|
You can get the tagged Marked List in Web of Science by
|
10
|
-
|
10
|
+
clicking the [SAVE TO FILE] button.
|
11
11
|
|
12
12
|
== Where is the homepage of isi?
|
13
13
|
http://isi-rb.rubyforge.org
|
@@ -16,24 +16,27 @@ http://isi-rb.rubyforge.org
|
|
16
16
|
Go to http://rubyforge.org/projects/isi-rb .
|
17
17
|
|
18
18
|
== How can I install isi?
|
19
|
-
There are three different ways to install isi.
|
19
|
+
There are three different ways to install isi.
|
20
20
|
=== I. Conservative way; use setup.rb
|
21
21
|
isi-X.Y.Z.tgz package can be installed as:
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
$ tar zxf isi-X.Y.Z.tgz
|
23
|
+
$ cd isi-X.Y.Z
|
24
|
+
$ su
|
25
|
+
# ruby setup.rb
|
26
26
|
=== II. RubyGems users can take an easy way
|
27
|
-
There is an
|
28
|
-
|
27
|
+
There is an easy way, if you are a RubyGems user:
|
28
|
+
$ gem install isi
|
29
29
|
=== III. Simple way; just copy isi.rb
|
30
|
-
Just copy isi.rb into your working directory which contains
|
30
|
+
Just copy lib/isi.rb (isi-X.Y.Z.rb) into your working directory which contains
|
31
31
|
your saved "Marked List", e.g. savedrecs.txt.
|
32
|
-
|
33
|
-
$
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
$ cp lib/isi.rb ~/your/working/directory/
|
33
|
+
($ cp isi-X.Y.Z.rb ~/your/working/directory/isi.rb)
|
34
|
+
$ cd ~/your/working/directory/
|
35
|
+
$ ruby isi.rb savedrecs1.txt savedrecs2.txt
|
36
|
+
$ ruby isi.rb < savedrecs.txt > savedrecs.bib
|
37
|
+
Last two lines are examples of usage for this installation way.
|
38
|
+
|
39
|
+
Note that Text::Format (http://rubyforge.org/projects/text-format) is required.
|
37
40
|
|
38
41
|
== How can I use it?
|
39
42
|
=== Save the marked records to an output file in ISI Web of Science
|
@@ -42,12 +45,26 @@ marked records to an output file (savedrecs.txt). I recommend to
|
|
42
45
|
check "Author(s)", "Title", "Source", "abstract*", "keywords" and
|
43
46
|
"source abbreviation" as the fields to include in the output file.
|
44
47
|
=== Here are some examples
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
48
|
+
$ isi2bibtex savedrecs.txt
|
49
|
+
$ isi2bibtex savedrecs1.txt savedrecs2.txt > savedrecs.bib
|
50
|
+
$ isi2bibtex < savedrecs.txt > savedrecs.bib
|
51
|
+
$ cat savedrecs.txt | isi2bibtex > savedrecs.bib
|
49
52
|
=== You can use isi as a library.
|
50
|
-
|
53
|
+
Here is an example:
|
54
|
+
#!/usr/bin/env ruby
|
55
|
+
##
|
56
|
+
require 'rubygems' # You may not need this line.
|
57
|
+
require 'isi'
|
58
|
+
|
59
|
+
class ISI_record
|
60
|
+
def to_title_author
|
61
|
+
"#{@hash['TI']} - #{and_separated_authors}\n"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
while rec = ARGF.read_an_ISI_record
|
66
|
+
print rec.to_title_author
|
67
|
+
end
|
51
68
|
|
52
69
|
== Copying
|
53
70
|
isi is distributed in the hope that
|
@@ -56,7 +73,7 @@ You can copy, modify and redistribute isi,
|
|
56
73
|
but only under the conditions described in
|
57
74
|
the GNU General Public License (the "GPL").
|
58
75
|
|
59
|
-
== Thanks to
|
76
|
+
== Thanks to contributor(s)!
|
60
77
|
* Marcin Dulak
|
61
78
|
|
62
79
|
== Who is the author?
|
@@ -72,7 +89,12 @@ in CTAN http://www.ctan.org/tex-archive/biblio/bibtex/utils/isi2bibtex .
|
|
72
89
|
|
73
90
|
== I do not like the output format of isi2bibtex, neither!
|
74
91
|
The output format is defined in the source code WYSIWYGly.
|
75
|
-
So you can change by yourself
|
92
|
+
So you can easily change the output format by yourself.
|
93
|
+
|
94
|
+
== How can I get the latest source tree of isi?
|
95
|
+
You can checkout the latest source tree of isi anonymously from
|
96
|
+
RubyForge with svn(1) command:
|
97
|
+
$ svn checkout svn://rubyforge.org/var/svn/isi-rb/isi
|
76
98
|
|
77
99
|
== Meanings of tags in ISI Export Format:
|
78
100
|
See http://isibasic.com/help/helpprn.html .
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#! /usr/bin/env rake
|
2
2
|
# -*-Ruby-*-
|
3
|
-
# Time-stamp: <2007-
|
3
|
+
# Time-stamp: <2007-08-21 13:17:15 takeshi>
|
4
4
|
# Author: Takeshi Nishimatsu
|
5
5
|
##
|
6
6
|
$LOAD_PATH.unshift('lib')
|
@@ -9,6 +9,7 @@ require 'rubygems'
|
|
9
9
|
require 'rake/gempackagetask'
|
10
10
|
require 'rake/testtask'
|
11
11
|
require 'rake/rdoctask'
|
12
|
+
require 'rake/clean'
|
12
13
|
require 'rake/contrib/rubyforgepublisher'
|
13
14
|
require 'isi.rb'
|
14
15
|
require 'archive/tar/minitar'
|
@@ -18,13 +19,15 @@ spec = eval(File.read("isi.gemspec"))
|
|
18
19
|
spec.version = ISI_RB_VERSION
|
19
20
|
RDOC_OPTS = %w(--title isi --main README --line-numbers)
|
20
21
|
spec.rdoc_options = RDOC_OPTS
|
22
|
+
ISI_PACKAGE_DIR = '..'
|
23
|
+
CLEAN.include('html')
|
21
24
|
|
22
25
|
desc "Build the RubyGem for isi"
|
23
26
|
task :gem => [ :test ]
|
24
27
|
Rake::GemPackageTask.new(spec) do |g|
|
25
28
|
g.need_tar = true
|
26
29
|
g.need_zip = true
|
27
|
-
g.package_dir =
|
30
|
+
g.package_dir = ISI_PACKAGE_DIR
|
28
31
|
end
|
29
32
|
|
30
33
|
task :default => [ :test ]
|
@@ -48,9 +51,14 @@ Rake::RDocTask.new do |rdoc|
|
|
48
51
|
end
|
49
52
|
|
50
53
|
desc "Build Packages"
|
51
|
-
task :package => [ :rdoc ]
|
54
|
+
task :package => [ :rdoc, :isi_version_rb ]
|
52
55
|
|
53
56
|
desc "Publish to RubyForge"
|
54
|
-
task :rubyforge => [ :
|
57
|
+
task :rubyforge => [ :rdoc ] do
|
55
58
|
Rake::RubyForgePublisher.new('isi-rb', 't-nissie').upload
|
56
59
|
end
|
60
|
+
|
61
|
+
desc "Copy lib/isi.rb ../isi-X.Y.Z.rb"
|
62
|
+
task :isi_version_rb do
|
63
|
+
FileUtils.copy_file('lib/isi.rb', ISI_PACKAGE_DIR + '/isi-' + ISI_RB_VERSION + '.rb')
|
64
|
+
end
|
@@ -10,44 +10,44 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/isi.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/isi.rb, line 161</span>
|
14
|
+
161: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ARGF</span>.<span class="ruby-identifier">read_an_ISI_record</span>
|
15
|
+
162: <span class="ruby-comment cmt"># singleton method (instance method associated only with ARGF)</span>
|
16
|
+
163: <span class="ruby-identifier">hash</span> = {}
|
17
|
+
164: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">line</span> = <span class="ruby-identifier">gets</span>
|
18
|
+
165: <span class="ruby-comment cmt">#===== a few special cases</span>
|
19
|
+
166: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ISI_record</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">hash</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^ER/</span>
|
20
|
+
167: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^(EF|FN|VR)/</span> <span class="ruby-comment cmt"># ignore file-unique tags</span>
|
21
|
+
168: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\s*$/</span> <span class="ruby-comment cmt"># ignore blank lines</span>
|
22
|
+
169: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\!$/</span>
|
23
|
+
170: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">chomp!</span>.<span class="ruby-identifier">chop!</span> <span class="ruby-comment cmt"># continued to next line if the line ends with "!"</span>
|
24
|
+
171: <span class="ruby-identifier">line</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">gets</span>
|
25
|
+
172: <span class="ruby-keyword kw">end</span>
|
26
|
+
173: <span class="ruby-comment cmt">#===== Normal tags</span>
|
27
|
+
174: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">line</span>
|
28
|
+
175: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^(AU|AF|CR) /</span>
|
29
|
+
176: <span class="ruby-identifier">tag</span> = <span class="ruby-identifier">$1</span>
|
30
|
+
177: <span class="ruby-identifier">authors</span> = [<span class="ruby-identifier">line</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/^(AU|AF|CR) /</span>,<span class="ruby-value str">''</span>)]
|
31
|
+
178: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">line</span> = <span class="ruby-identifier">gets</span>) <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^ /</span>
|
32
|
+
179: <span class="ruby-identifier">authors</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">line</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/^ /</span>,<span class="ruby-value str">''</span>))
|
33
|
+
180: <span class="ruby-keyword kw">end</span>
|
34
|
+
181: <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">tag</span>] = <span class="ruby-identifier">authors</span>
|
35
|
+
182: <span class="ruby-keyword kw">redo</span>
|
36
|
+
183: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^(NR|PG|PY|TC) (.*)$/</span>
|
37
|
+
184: <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">$1</span>] = <span class="ruby-identifier">$2</span>.<span class="ruby-identifier">to_i</span>
|
38
|
+
185: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^(TI|AB|DE|ID|SO|PT|JI|BP|EP|AR|PD|VL|IS|GA|PI|PU|PN|PA|J9|UT|DT|C1|RP|SI|SE|SN|SU|LA|DI|SC) (.*)$/</span>
|
39
|
+
186: <span class="ruby-identifier">tag</span> = <span class="ruby-identifier">$1</span>
|
40
|
+
187: <span class="ruby-identifier">str</span> = <span class="ruby-identifier">$2</span>
|
41
|
+
188: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">line</span> = <span class="ruby-identifier">gets</span>) <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^ /</span>
|
42
|
+
189: <span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/^ /</span>,<span class="ruby-value str">''</span>)
|
43
|
+
190: <span class="ruby-keyword kw">end</span>
|
44
|
+
191: <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">tag</span>] = <span class="ruby-identifier">str</span>
|
45
|
+
192: <span class="ruby-keyword kw">redo</span>
|
46
|
+
193: <span class="ruby-keyword kw">else</span>
|
47
|
+
194: <span class="ruby-constant">STDERR</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{$FILENAME}:#{file.lineno}: Unknown tag: #{line}"</span>
|
48
|
+
195: <span class="ruby-keyword kw">end</span>
|
49
|
+
196: <span class="ruby-keyword kw">end</span>
|
50
|
+
197: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
51
|
+
198: <span class="ruby-keyword kw">end</span></pre>
|
52
52
|
</body>
|
53
53
|
</html>
|
@@ -10,10 +10,10 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/isi.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/isi.rb, line 12</span>
|
14
|
+
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hash</span>)
|
15
|
+
13: <span class="ruby-ivar">@hash</span> = <span class="ruby-identifier">hash</span>
|
16
|
+
14: <span class="ruby-ivar">@@order</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
17
|
+
15: <span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|
@@ -10,33 +10,33 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/isi.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/isi.rb, line 17</span>
|
14
|
+
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_tohoku_DB</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">name</span>)
|
15
|
+
18: <span class="ruby-node">"#{id}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># A ID</span>
|
16
|
+
19: <span class="ruby-node">"#{name}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># B Name</span>
|
17
|
+
20: <span class="ruby-node">"#{@hash['TI']}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># C Title</span>
|
18
|
+
21: <span class="ruby-node">"#{@hash['TI']}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># D Title in English</span>
|
19
|
+
22: <span class="ruby-value str">"01\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># E Language</span>
|
20
|
+
23: <span class="ruby-value str">"2\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># F The number of Author(s) 1:1, 2:not 1 (default)</span>
|
21
|
+
24: <span class="ruby-value str">"1\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># G Kind - 1:regular paper</span>
|
22
|
+
25: <span class="ruby-value str">"1\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># H Refereep - 0:nil 1:t</span>
|
23
|
+
26: <span class="ruby-value str">"0\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># I Invitedp - 0:nil 1:t</span>
|
24
|
+
27: <span class="ruby-value str">"Greatly\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># J Contribution</span>
|
25
|
+
28: <span class="ruby-node">"#{@hash['JI']}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># K Journal</span>
|
26
|
+
29: <span class="ruby-node">"#{@hash['JI']}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># L Journal in English</span>
|
27
|
+
30: <span class="ruby-node">"#{@hash['VL']}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># M Vol.</span>
|
28
|
+
31: <span class="ruby-node">"#{@hash['IS']}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># N No.</span>
|
29
|
+
32: <span class="ruby-node">"#{@hash['AR'] or @hash['BP']}\t"</span> <span class="ruby-operator">+</span>
|
30
|
+
33: <span class="ruby-value str">"\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># P Page END</span>
|
31
|
+
34: <span class="ruby-node">"#{@hash['PY']}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># Q Year</span>
|
32
|
+
35: <span class="ruby-node">"#{month_in_number}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># R Month</span>
|
33
|
+
36: <span class="ruby-value str">"\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># S Date</span>
|
34
|
+
37: <span class="ruby-node">"#{and_separated_authors.gsub(" and ",", ")}\t"</span> <span class="ruby-operator">+</span>
|
35
|
+
38: <span class="ruby-node">"#{and_separated_authors.gsub(" and ",", ")}\t"</span> <span class="ruby-operator">+</span>
|
36
|
+
39: <span class="ruby-node">"#{@hash['UR']}\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># V URL of online journal</span>
|
37
|
+
40: <span class="ruby-value str">"\t"</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># W Other</span>
|
38
|
+
41: <span class="ruby-node">"#{@hash['PY']-2000}#{sprintf("%.2d",@@order)}\t"</span> <span class="ruby-operator">+</span>
|
39
|
+
42: <span class="ruby-value str">"1\n"</span>
|
40
|
+
43: <span class="ruby-keyword kw">end</span></pre>
|
41
41
|
</body>
|
42
42
|
</html>
|
@@ -10,25 +10,25 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/isi.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/isi.rb, line 45</span>
|
14
|
+
45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_bibtex</span>
|
15
|
+
46: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span><span class="ruby-operator">==</span><span class="ruby-keyword kw">nil</span>
|
16
|
+
47: <span class="ruby-node">"@ARTICLE{#{ref_name},
|
17
|
+
48: Author = {#{fmt(and_separated_authors)}},
|
18
|
+
49: Title = {#{fmt('TI')}},
|
19
|
+
50: Journal = {#{ji2journal}},
|
20
|
+
51: JournalFull= {#{@hash['SO']}},
|
21
|
+
52: Year = {#{@hash['PY']}},
|
22
|
+
53: Month = {#{month}},
|
23
|
+
54: Volume = {#{@hash['VL']}},
|
24
|
+
55: Number = {#{@hash['IS']}},
|
25
|
+
56: Pages = {#{pages}},
|
26
|
+
57: Keywords = {#{fmt('DE')}},
|
27
|
+
58: NewKeywords= {#{fmt('ID')}},
|
28
|
+
59: Abstract = {#{fmt('AB')}},
|
29
|
+
60: ReprintURL = {#{fmt('UR')}},
|
30
|
+
61: MyComment = {},
|
31
|
+
62: WhereIFiledIt= {}}\n\n"</span>
|
32
|
+
63: <span class="ruby-keyword kw">end</span></pre>
|
33
33
|
</body>
|
34
34
|
</html>
|
data/html/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Tue, 21 Aug 2007 17:57:31 -0400
|
data/html/files/README.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Tue Aug 21 16:57:52 -0400 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -72,14 +72,14 @@
|
|
72
72
|
<h1>isi</h1>
|
73
73
|
<h2>What is isi?</h2>
|
74
74
|
<p>
|
75
|
-
isi
|
76
|
-
can use isi as a library.
|
75
|
+
isi is an ISI Export Format to BibTeX Format converter written in Ruby
|
76
|
+
script language. You can use isi as a library, too.
|
77
77
|
</p>
|
78
78
|
<p>
|
79
79
|
ISI Web of Science, <a
|
80
80
|
href="http://portal.isiknowledge.com">portal.isiknowledge.com</a>, provides
|
81
81
|
their bibliographic information in ISI Export Format. You can get the
|
82
|
-
tagged Marked List in Web of Science by
|
82
|
+
tagged Marked List in Web of Science by clicking the [SAVE TO FILE] button.
|
83
83
|
</p>
|
84
84
|
<h2>Where is the homepage of isi?</h2>
|
85
85
|
<p>
|
@@ -93,38 +93,44 @@ href="http://rubyforge.org/projects/isi-rb">rubyforge.org/projects/isi-rb</a>
|
|
93
93
|
</p>
|
94
94
|
<h2>How can I install isi?</h2>
|
95
95
|
<p>
|
96
|
-
There are three different ways to install isi.
|
96
|
+
There are three different ways to install isi.
|
97
97
|
</p>
|
98
98
|
<h3>I. Conservative way; use setup.rb</h3>
|
99
99
|
<p>
|
100
100
|
isi-X.Y.Z.tgz package can be installed as:
|
101
101
|
</p>
|
102
102
|
<pre>
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
$ tar zxf isi-X.Y.Z.tgz
|
104
|
+
$ cd isi-X.Y.Z
|
105
|
+
$ su
|
106
|
+
# ruby setup.rb
|
107
107
|
</pre>
|
108
108
|
<h3>II. RubyGems users can take an easy way</h3>
|
109
109
|
<p>
|
110
|
-
There is an
|
110
|
+
There is an easy way, if you are a RubyGems user:
|
111
111
|
</p>
|
112
112
|
<pre>
|
113
|
-
|
113
|
+
$ gem install isi
|
114
114
|
</pre>
|
115
115
|
<h3>III. Simple way; just copy isi.rb</h3>
|
116
116
|
<p>
|
117
|
-
Just copy isi.rb into your working directory which
|
118
|
-
"Marked List", e.g. savedrecs.txt.
|
117
|
+
Just copy lib/isi.rb (isi-X.Y.Z.rb) into your working directory which
|
118
|
+
contains your saved "Marked List", e.g. savedrecs.txt.
|
119
119
|
</p>
|
120
120
|
<pre>
|
121
|
-
|
122
|
-
$
|
123
|
-
|
124
|
-
|
121
|
+
$ cp lib/isi.rb ~/your/working/directory/
|
122
|
+
($ cp isi-X.Y.Z.rb ~/your/working/directory/isi.rb)
|
123
|
+
$ cd ~/your/working/directory/
|
124
|
+
$ ruby isi.rb savedrecs1.txt savedrecs2.txt
|
125
|
+
$ ruby isi.rb < savedrecs.txt > savedrecs.bib
|
125
126
|
</pre>
|
126
127
|
<p>
|
127
|
-
|
128
|
+
Last two lines are examples of usage for this installation way.
|
129
|
+
</p>
|
130
|
+
<p>
|
131
|
+
Note that Text::Format (<a
|
132
|
+
href="http://rubyforge.org/projects/text-format">rubyforge.org/projects/text-format</a>)
|
133
|
+
is required.
|
128
134
|
</p>
|
129
135
|
<h2>How can I use it?</h2>
|
130
136
|
<h3>Save the marked records to an output file in ISI Web of Science</h3>
|
@@ -137,14 +143,30 @@ abbreviation" as the fields to include in the output file.
|
|
137
143
|
</p>
|
138
144
|
<h3>Here are some examples</h3>
|
139
145
|
<pre>
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
146
|
+
$ isi2bibtex savedrecs.txt
|
147
|
+
$ isi2bibtex savedrecs1.txt savedrecs2.txt > savedrecs.bib
|
148
|
+
$ isi2bibtex < savedrecs.txt > savedrecs.bib
|
149
|
+
$ cat savedrecs.txt | isi2bibtex > savedrecs.bib
|
144
150
|
</pre>
|
145
151
|
<h3>You can use isi as a library.</h3>
|
152
|
+
<p>
|
153
|
+
Here is an example:
|
154
|
+
</p>
|
146
155
|
<pre>
|
147
|
-
|
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
|
148
170
|
</pre>
|
149
171
|
<h2>Copying</h2>
|
150
172
|
<p>
|
@@ -153,7 +175,7 @@ WARRANTY. You can copy, modify and redistribute isi, but only under the
|
|
153
175
|
conditions described in the GNU General Public License (the
|
154
176
|
"GPL").
|
155
177
|
</p>
|
156
|
-
<h2>Thanks to
|
178
|
+
<h2>Thanks to contributor(s)!</h2>
|
157
179
|
<ul>
|
158
180
|
<li>Marcin Dulak
|
159
181
|
|
@@ -177,8 +199,16 @@ href="http://www.ctan.org/tex-archive/biblio/bibtex/utils/isi2bibtex">www.ctan.o
|
|
177
199
|
<h2>I do not like the output format of isi2bibtex, neither!</h2>
|
178
200
|
<p>
|
179
201
|
The output format is defined in the source code WYSIWYGly. So you can
|
180
|
-
change by yourself
|
202
|
+
easily change the output format by yourself.
|
181
203
|
</p>
|
204
|
+
<h2>How can I get the latest source tree of isi?</h2>
|
205
|
+
<p>
|
206
|
+
You can checkout the latest source tree of isi anonymously from RubyForge
|
207
|
+
with svn(1) command:
|
208
|
+
</p>
|
209
|
+
<pre>
|
210
|
+
$ svn checkout svn://rubyforge.org/var/svn/isi-rb/isi
|
211
|
+
</pre>
|
182
212
|
<h2>Meanings of tags in ISI Export Format:</h2>
|
183
213
|
<p>
|
184
214
|
See <a
|
data/html/files/lib/isi_rb.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Tue Aug 21 16:41:08 -0400 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -70,7 +70,10 @@
|
|
70
70
|
|
71
71
|
<div id="description">
|
72
72
|
<p>
|
73
|
-
Time-stamp: <2007-
|
73
|
+
Time-stamp: <2007-08-16 16:48:15 t-nissie> Author: Takeshi Nishimatsu
|
74
|
+
Project homepage: <a
|
75
|
+
href="http://isi-rb.rubyforge.org">isi-rb.rubyforge.org</a>/ Usage: ruby
|
76
|
+
isi.rb savedrecs.txt > savedrecs.bib
|
74
77
|
</p>
|
75
78
|
|
76
79
|
</div>
|
@@ -102,10 +105,13 @@ Time-stamp: <2007-04-28 22:07:29 t-nissie> Author: Takeshi Nishimatsu
|
|
102
105
|
<tr class="top-aligned-row context-row">
|
103
106
|
<td class="context-item-name">ISI_RB_VERSION</td>
|
104
107
|
<td>=</td>
|
105
|
-
<td class="context-item-value"
|
108
|
+
<td class="context-item-value">'1.1.3'</td>
|
106
109
|
<td width="3em"> </td>
|
107
110
|
<td class="context-item-desc">
|
108
|
-
Time-stamp: <2007-
|
111
|
+
Time-stamp: <2007-08-16 16:48:15 t-nissie> Author: Takeshi Nishimatsu
|
112
|
+
Project homepage: <a
|
113
|
+
href="http://isi-rb.rubyforge.org">isi-rb.rubyforge.org</a>/ Usage: ruby
|
114
|
+
isi.rb savedrecs.txt > savedrecs.bib
|
109
115
|
|
110
116
|
</td>
|
111
117
|
</tr>
|
data/isi.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# isi.gemspec -*-ruby-*-
|
2
|
-
# Time-stamp: <2007-
|
2
|
+
# Time-stamp: <2007-08-21 17:53:25 takeshi>
|
3
3
|
##
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.autorequire = 'lib/isi.rb'
|
@@ -9,10 +9,11 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.executables = ['isi2bibtex']
|
10
10
|
s.default_executable= 'isi2bibtex'
|
11
11
|
|
12
|
-
s.summary = '
|
13
|
-
s.files = Dir.glob("{
|
12
|
+
s.summary = 'ISI Export Format to BibTeX Format converter. (Formerly named isi.rb or isi2bibtex.rb.)'
|
13
|
+
s.files = Dir.glob("{html}/**/*") << 'lib/isi.rb' <<
|
14
|
+
'tests/isi_test.rb' << 'tests/example.isi' <<
|
14
15
|
'bin/isi2bibtex' << 'ChangeLog' << 'README' <<
|
15
|
-
'Rakefile' << 'isi.gemspec' << 'setup.rb'
|
16
|
+
'Rakefile' << 'isi.gemspec' << 'setup.rb' << 'NewsForRubyforge.txt'
|
16
17
|
s.author = 'Takeshi Nishimatsu'
|
17
18
|
s.email = 't-nissie@imr.tohoku.ac.jp'
|
18
19
|
s.rubyforge_project = 'isi-rb'
|
@@ -25,8 +26,8 @@ Gem::Specification.new do |s|
|
|
25
26
|
s.add_dependency('text-format', '>=1.0.0')
|
26
27
|
|
27
28
|
s.description = <<-EOF
|
28
|
-
|
29
|
-
This is a Ruby script. You can use this script as a library.
|
29
|
+
ISI Export Format to BibTeX Format converter.
|
30
|
+
This is a Ruby script. You can use this script as a library, too.
|
30
31
|
|
31
32
|
You can get the tagged Marked List in Web of Science by pushing the
|
32
33
|
[SAVE TO FILE] button.
|
data/lib/isi.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Time-stamp: <2007-
|
2
|
+
# Time-stamp: <2007-08-16 16:48:15 t-nissie>
|
3
3
|
# Author: Takeshi Nishimatsu
|
4
|
+
# Project homepage: http://isi-rb.rubyforge.org/
|
5
|
+
# Usage: ruby isi.rb savedrecs.txt > savedrecs.bib
|
4
6
|
##
|
5
|
-
ISI_RB_VERSION =
|
6
|
-
require 'text/format'
|
7
|
+
ISI_RB_VERSION = '1.1.3'
|
8
|
+
require 'text/format' # http://rubyforge.org/projects/text-format/
|
7
9
|
class ISI_record
|
8
10
|
public
|
9
11
|
@@order = 0
|
@@ -85,8 +87,10 @@ private
|
|
85
87
|
return @hash['EP'] # in the case of "BP art. no., EP 125111"
|
86
88
|
elsif @hash['EP'] =~ /^\w?\d+/
|
87
89
|
return @hash['BP'] + '-' + @hash['EP'] # in the cases of "EP 1234" or "EP L567"
|
88
|
-
|
90
|
+
elsif @hash['BP']
|
89
91
|
return @hash['BP']
|
92
|
+
else
|
93
|
+
return "00000"
|
90
94
|
end
|
91
95
|
end
|
92
96
|
|
@@ -131,7 +135,7 @@ private
|
|
131
135
|
|
132
136
|
def ref_name
|
133
137
|
rn = ''
|
134
|
-
@hash['AU'].each_with_index do |name,i|
|
138
|
+
@hash['AU'].each_with_index do |name,i|
|
135
139
|
if i==0
|
136
140
|
if name =~ /, /
|
137
141
|
rn << $` << ':' # Take the component before /, /
|
@@ -168,9 +172,9 @@ def ARGF.read_an_ISI_record
|
|
168
172
|
end
|
169
173
|
#===== Normal tags
|
170
174
|
case line
|
171
|
-
when /^(AU|AF) /
|
175
|
+
when /^(AU|AF|CR) /
|
172
176
|
tag = $1
|
173
|
-
authors = [line.chomp.sub(/^(AU|AF) /,'')]
|
177
|
+
authors = [line.chomp.sub(/^(AU|AF|CR) /,'')]
|
174
178
|
while (line = gets) =~ /^ /
|
175
179
|
authors.push(line.chomp.sub(/^ /,''))
|
176
180
|
end
|
@@ -178,7 +182,7 @@ def ARGF.read_an_ISI_record
|
|
178
182
|
redo
|
179
183
|
when /^(NR|PG|PY|TC) (.*)$/
|
180
184
|
hash[$1] = $2.to_i
|
181
|
-
when /^(TI|AB|DE|ID|SO|PT|JI|BP|EP|AR|PD|VL|IS|GA|PI|PU|PN|PA|J9|UT|DT|C1|RP|SI|SE|SN|SU|LA|DI) (.*)$/
|
185
|
+
when /^(TI|AB|DE|ID|SO|PT|JI|BP|EP|AR|PD|VL|IS|GA|PI|PU|PN|PA|J9|UT|DT|C1|RP|SI|SE|SN|SU|LA|DI|SC) (.*)$/
|
182
186
|
tag = $1
|
183
187
|
str = $2
|
184
188
|
while (line = gets) =~ /^ /
|
@@ -194,7 +198,6 @@ def ARGF.read_an_ISI_record
|
|
194
198
|
end
|
195
199
|
|
196
200
|
if $0 == __FILE__
|
197
|
-
# MAIN LOOP
|
198
201
|
while rec = ARGF.read_an_ISI_record
|
199
202
|
print rec.to_bibtex
|
200
203
|
end
|
data/tests/example.isi
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
FN ISI Export Format
|
2
|
+
VR 1.0
|
3
|
+
PT J
|
4
|
+
AU Oda, N
|
5
|
+
Nishimatsu, T
|
6
|
+
Ooyama-Umeda, H
|
7
|
+
AF Oda, Norio
|
8
|
+
Nishimatsu, Takeshi
|
9
|
+
Ooyama-Umeda, Tsuyoshi
|
10
|
+
TI ab initio study for diamond
|
11
|
+
SO JAPANESE JOURNAL OF APPLIED PHYSICS PART 1-REGULAR PAPERS BRIEF
|
12
|
+
COMMUNICATIONS & REVIEW PAPERS
|
13
|
+
DT Article
|
14
|
+
DE diamond; impurity; phosphorus;
|
15
|
+
ID N-TYPE DIAMOND; SEMICONDUCTOR; DONOR
|
16
|
+
AB Previously, we performed local density approximation (LDA) based ab
|
17
|
+
initio calculations for uranium-doped diamond.
|
18
|
+
C1 ZAIST, Tsukuba, Ibaraki 3058568, Japan.
|
19
|
+
Mohoku Univ, JMR, Sendai, Miyagi 9808577, Japan.
|
20
|
+
Noborizaka Univ, JSJR, Ibaraki, Osaka 5670047, Japan.
|
21
|
+
RP Oda, N, JAIST, Tsukuba, Ibaraki 3058568, Japan.
|
22
|
+
EM takeshi@example.com
|
23
|
+
CR AAABERNASCONI M, 3990, J PHYS CHEM SOLIDS, V5, P5010
|
24
|
+
BBBCHAN CT, 3990, PHYS REV B, V4, P47710
|
25
|
+
DDDDALCORSO A, 39940, PHYS REV B, V51, P43270
|
26
|
+
NR 3
|
27
|
+
TC 0
|
28
|
+
PU INST PURE APPLIED PHYSICS
|
29
|
+
PI TOKYO
|
30
|
+
PA 5F YUSHIMA BLDG, 2-31-22 YUSHIMA, BUNKYO-KU, TOKYO, 113-0034, JAPAN
|
31
|
+
SN 0021-4922
|
32
|
+
J9 JPN J APPL PHYS PT 1
|
33
|
+
JI Jpn. J. Appl. Phys. Part 1 - Regul. Pap. Brief Commun. Rev. Pap.
|
34
|
+
PD JAN
|
35
|
+
PY 2007
|
36
|
+
VL 46
|
37
|
+
IS 1
|
38
|
+
BP 1111315
|
39
|
+
EP 1111317
|
40
|
+
PG 3
|
41
|
+
SC Physics, Applied
|
42
|
+
GA 131HB
|
43
|
+
UT ISI:000243858500066
|
44
|
+
ER
|
45
|
+
|
46
|
+
PT J
|
47
|
+
AU Nishimatsu, T
|
48
|
+
JI Phys. Rev. B
|
49
|
+
VL 146
|
50
|
+
AR 007
|
51
|
+
ER
|
52
|
+
|
53
|
+
EF
|
data/tests/isi_test.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: isi
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2007-
|
8
|
-
summary:
|
6
|
+
version: 1.1.3
|
7
|
+
date: 2007-08-21 00:00:00 -04:00
|
8
|
+
summary: ISI Export Format to BibTeX Format converter. (Formerly named isi.rb or isi2bibtex.rb.)
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: t-nissie@imr.tohoku.ac.jp
|
12
12
|
homepage: http://isi-rb.rubyforge.org/
|
13
13
|
rubyforge_project: isi-rb
|
14
|
-
description:
|
14
|
+
description: ISI Export Format to BibTeX Format converter. This is a Ruby script. You can use this script as a library, too. You can get the tagged Marked List in Web of Science by pushing the [SAVE TO FILE] button.
|
15
15
|
autorequire: lib/isi.rb
|
16
16
|
default_executable: isi2bibtex
|
17
17
|
bindir: bin
|
@@ -29,33 +29,35 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- Takeshi Nishimatsu
|
31
31
|
files:
|
32
|
-
-
|
33
|
-
- tests/isi_test.rb
|
34
|
-
- html/rdoc-style.css
|
35
|
-
- html/files
|
36
|
-
- html/files/README.html
|
37
|
-
- html/files/lib
|
38
|
-
- html/files/lib/isi_rb.html
|
32
|
+
- html/created.rid
|
39
33
|
- html/classes
|
40
34
|
- html/classes/ISI_record.src
|
35
|
+
- html/classes/ISI_record.src/M000003.html
|
41
36
|
- html/classes/ISI_record.src/M000001.html
|
42
37
|
- html/classes/ISI_record.src/M000002.html
|
43
|
-
- html/classes/
|
38
|
+
- html/classes/ARGF.html
|
39
|
+
- html/classes/ISI_record.html
|
44
40
|
- html/classes/ARGF.src
|
45
41
|
- html/classes/ARGF.src/M000004.html
|
46
|
-
- html/classes/ISI_record.html
|
47
|
-
- html/classes/ARGF.html
|
48
42
|
- html/fr_file_index.html
|
49
|
-
- html/fr_class_index.html
|
50
43
|
- html/fr_method_index.html
|
44
|
+
- html/fr_class_index.html
|
45
|
+
- html/rdoc-style.css
|
51
46
|
- html/index.html
|
52
|
-
- html/
|
47
|
+
- html/files
|
48
|
+
- html/files/README.html
|
49
|
+
- html/files/lib
|
50
|
+
- html/files/lib/isi_rb.html
|
51
|
+
- lib/isi.rb
|
52
|
+
- tests/isi_test.rb
|
53
|
+
- tests/example.isi
|
53
54
|
- bin/isi2bibtex
|
54
55
|
- ChangeLog
|
55
56
|
- README
|
56
57
|
- Rakefile
|
57
58
|
- isi.gemspec
|
58
59
|
- setup.rb
|
60
|
+
- NewsForRubyforge.txt
|
59
61
|
test_files:
|
60
62
|
- tests/isi_test.rb
|
61
63
|
rdoc_options:
|