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 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.
@@ -0,0 +1,3 @@
1
+ New version of ISI Export Format to BibTeX Format converter is now ready.
2
+ isi is a Ruby script and it can be used as a library, too.
3
+ Visit its project homepage http://isi-rb.rubyforge.org/ .
data/README CHANGED
@@ -1,13 +1,13 @@
1
1
  = isi
2
2
 
3
3
  == What is isi?
4
- isi converts ISI Export Format to BibTeX Format.
5
- This is a Ruby script. You can use isi as a library.
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
- pushing the [SAVE TO FILE] button.
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.rb.
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
- $ tar zxf isi-X.Y.Z.tgz
23
- $ cd isi-X.Y.Z
24
- $ su
25
- # ruby setup.rb
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 easier way, if you are a RubyGems user:
28
- $ gem install isi
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
- $ cp lib/isi.rb ~/your/working/directory/
33
- $ cd ~/your/working/directory/
34
- $ ruby isi.rb savedrecs1.txt savedrecs2.txt
35
- $ ruby isi.rb < savedrecs.txt > savedrecs.bib
36
- Lsat two lines are examples of usage for this installation way.
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
- % isi2bibtex savedrecs.txt
46
- % isi2bibtex savedrecs1.txt savedrecs2.txt > savedrecs.bib
47
- % isi2bibtex < savedrecs.txt > savedrecs.bib
48
- % cat savedrecs.txt | isi2bibtex > savedrecs.bib
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
- T.B.A.
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 contributer(s)!
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 easily.
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-04-28 20:49:41 t-nissie>
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 => [ :package ] do
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 157</span>
14
- 157: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ARGF</span>.<span class="ruby-identifier">read_an_ISI_record</span>
15
- 158: <span class="ruby-comment cmt"># singleton method (instance method associated only with ARGF)</span>
16
- 159: <span class="ruby-identifier">hash</span> = {}
17
- 160: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">line</span> = <span class="ruby-identifier">gets</span>
18
- 161: <span class="ruby-comment cmt">#===== a few special cases</span>
19
- 162: <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
- 163: <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
- 164: <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
- 165: <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
- 166: <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 &quot;!&quot;</span>
24
- 167: <span class="ruby-identifier">line</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">gets</span>
25
- 168: <span class="ruby-keyword kw">end</span>
26
- 169: <span class="ruby-comment cmt">#===== Normal tags</span>
27
- 170: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">line</span>
28
- 171: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^(AU|AF) /</span>
29
- 172: <span class="ruby-identifier">tag</span> = <span class="ruby-identifier">$1</span>
30
- 173: <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) /</span>,<span class="ruby-value str">''</span>)]
31
- 174: <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
- 175: <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
- 176: <span class="ruby-keyword kw">end</span>
34
- 177: <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">tag</span>] = <span class="ruby-identifier">authors</span>
35
- 178: <span class="ruby-keyword kw">redo</span>
36
- 179: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^(NR|PG|PY|TC) (.*)$/</span>
37
- 180: <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
- 181: <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) (.*)$/</span>
39
- 182: <span class="ruby-identifier">tag</span> = <span class="ruby-identifier">$1</span>
40
- 183: <span class="ruby-identifier">str</span> = <span class="ruby-identifier">$2</span>
41
- 184: <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
- 185: <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</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
- 186: <span class="ruby-keyword kw">end</span>
44
- 187: <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">tag</span>] = <span class="ruby-identifier">str</span>
45
- 188: <span class="ruby-keyword kw">redo</span>
46
- 189: <span class="ruby-keyword kw">else</span>
47
- 190: <span class="ruby-constant">STDERR</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{$FILENAME}:#{file.lineno}: Unknown tag: #{line}&quot;</span>
48
- 191: <span class="ruby-keyword kw">end</span>
49
- 192: <span class="ruby-keyword kw">end</span>
50
- 193: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
51
- 194: <span class="ruby-keyword kw">end</span></pre>
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 &quot;!&quot;</span>
24
+ 171: <span class="ruby-identifier">line</span> <span class="ruby-operator">&lt;&lt;</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">&lt;&lt;</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">&lt;&lt;</span> <span class="ruby-node">&quot;#{$FILENAME}:#{file.lineno}: Unknown tag: #{line}&quot;</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 10</span>
14
- 10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hash</span>)
15
- 11: <span class="ruby-ivar">@hash</span> = <span class="ruby-identifier">hash</span>
16
- 12: <span class="ruby-ivar">@@order</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
17
- 13: <span class="ruby-keyword kw">end</span></pre>
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 15</span>
14
- 15: <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
- 16: <span class="ruby-node">&quot;#{id}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># A ID</span>
16
- 17: <span class="ruby-node">&quot;#{name}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># B Name</span>
17
- 18: <span class="ruby-node">&quot;#{@hash['TI']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># C Title</span>
18
- 19: <span class="ruby-node">&quot;#{@hash['TI']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># D Title in English</span>
19
- 20: <span class="ruby-value str">&quot;01\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># E Language</span>
20
- 21: <span class="ruby-value str">&quot;2\t&quot;</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
- 22: <span class="ruby-value str">&quot;1\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># G Kind - 1:regular paper</span>
22
- 23: <span class="ruby-value str">&quot;1\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># H Refereep - 0:nil 1:t</span>
23
- 24: <span class="ruby-value str">&quot;0\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># I Invitedp - 0:nil 1:t</span>
24
- 25: <span class="ruby-value str">&quot;Greatly\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># J Contribution</span>
25
- 26: <span class="ruby-node">&quot;#{@hash['JI']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># K Journal</span>
26
- 27: <span class="ruby-node">&quot;#{@hash['JI']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># L Journal in English</span>
27
- 28: <span class="ruby-node">&quot;#{@hash['VL']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># M Vol.</span>
28
- 29: <span class="ruby-node">&quot;#{@hash['IS']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># N No.</span>
29
- 30: <span class="ruby-node">&quot;#{@hash['AR'] or @hash['BP']}\t&quot;</span> <span class="ruby-operator">+</span>
30
- 31: <span class="ruby-value str">&quot;\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># P Page END</span>
31
- 32: <span class="ruby-node">&quot;#{@hash['PY']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># Q Year</span>
32
- 33: <span class="ruby-node">&quot;#{month_in_number}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># R Month</span>
33
- 34: <span class="ruby-value str">&quot;\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># S Date</span>
34
- 35: <span class="ruby-node">&quot;#{and_separated_authors.gsub(&quot; and &quot;,&quot;, &quot;)}\t&quot;</span> <span class="ruby-operator">+</span>
35
- 36: <span class="ruby-node">&quot;#{and_separated_authors.gsub(&quot; and &quot;,&quot;, &quot;)}\t&quot;</span> <span class="ruby-operator">+</span>
36
- 37: <span class="ruby-node">&quot;#{@hash['UR']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># V URL of online journal</span>
37
- 38: <span class="ruby-value str">&quot;\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># W Other</span>
38
- 39: <span class="ruby-node">&quot;#{@hash['PY']-2000}#{sprintf(&quot;%.2d&quot;,@@order)}\t&quot;</span> <span class="ruby-operator">+</span>
39
- 40: <span class="ruby-value str">&quot;1\n&quot;</span>
40
- 41: <span class="ruby-keyword kw">end</span></pre>
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">&quot;#{id}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># A ID</span>
16
+ 19: <span class="ruby-node">&quot;#{name}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># B Name</span>
17
+ 20: <span class="ruby-node">&quot;#{@hash['TI']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># C Title</span>
18
+ 21: <span class="ruby-node">&quot;#{@hash['TI']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># D Title in English</span>
19
+ 22: <span class="ruby-value str">&quot;01\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># E Language</span>
20
+ 23: <span class="ruby-value str">&quot;2\t&quot;</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">&quot;1\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># G Kind - 1:regular paper</span>
22
+ 25: <span class="ruby-value str">&quot;1\t&quot;</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">&quot;0\t&quot;</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">&quot;Greatly\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># J Contribution</span>
25
+ 28: <span class="ruby-node">&quot;#{@hash['JI']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># K Journal</span>
26
+ 29: <span class="ruby-node">&quot;#{@hash['JI']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># L Journal in English</span>
27
+ 30: <span class="ruby-node">&quot;#{@hash['VL']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># M Vol.</span>
28
+ 31: <span class="ruby-node">&quot;#{@hash['IS']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># N No.</span>
29
+ 32: <span class="ruby-node">&quot;#{@hash['AR'] or @hash['BP']}\t&quot;</span> <span class="ruby-operator">+</span>
30
+ 33: <span class="ruby-value str">&quot;\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># P Page END</span>
31
+ 34: <span class="ruby-node">&quot;#{@hash['PY']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># Q Year</span>
32
+ 35: <span class="ruby-node">&quot;#{month_in_number}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># R Month</span>
33
+ 36: <span class="ruby-value str">&quot;\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># S Date</span>
34
+ 37: <span class="ruby-node">&quot;#{and_separated_authors.gsub(&quot; and &quot;,&quot;, &quot;)}\t&quot;</span> <span class="ruby-operator">+</span>
35
+ 38: <span class="ruby-node">&quot;#{and_separated_authors.gsub(&quot; and &quot;,&quot;, &quot;)}\t&quot;</span> <span class="ruby-operator">+</span>
36
+ 39: <span class="ruby-node">&quot;#{@hash['UR']}\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># V URL of online journal</span>
37
+ 40: <span class="ruby-value str">&quot;\t&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-comment cmt"># W Other</span>
38
+ 41: <span class="ruby-node">&quot;#{@hash['PY']-2000}#{sprintf(&quot;%.2d&quot;,@@order)}\t&quot;</span> <span class="ruby-operator">+</span>
39
+ 42: <span class="ruby-value str">&quot;1\n&quot;</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 43</span>
14
- 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_bibtex</span>
15
- 44: <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
- 45: <span class="ruby-node">&quot;@ARTICLE{#{ref_name},
17
- 46: Author = {#{fmt(and_separated_authors)}},
18
- 47: Title = {#{fmt('TI')}},
19
- 48: Journal = {#{ji2journal}},
20
- 49: JournalFull= {#{@hash['SO']}},
21
- 50: Year = {#{@hash['PY']}},
22
- 51: Month = {#{month}},
23
- 52: Volume = {#{@hash['VL']}},
24
- 53: Number = {#{@hash['IS']}},
25
- 54: Pages = {#{pages}},
26
- 55: Keywords = {#{fmt('DE')}},
27
- 56: NewKeywords= {#{fmt('ID')}},
28
- 57: Abstract = {#{fmt('AB')}},
29
- 58: ReprintURL = {#{fmt('UR')}},
30
- 59: MyComment = {},
31
- 60: WhereIFiledIt= {}}\n\n&quot;</span>
32
- 61: <span class="ruby-keyword kw">end</span></pre>
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">&quot;@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&quot;</span>
32
+ 63: <span class="ruby-keyword kw">end</span></pre>
33
33
  </body>
34
34
  </html>
@@ -1 +1 @@
1
- Sat, 28 Apr 2007 22:33:46 -0400
1
+ Tue, 21 Aug 2007 17:57:31 -0400
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sat Apr 28 22:32:17 -0400 2007</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 converts ISI Export Format to BibTeX Format. This is a Ruby script. You
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 pushing the [SAVE TO FILE] button.
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.rb.
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
- $ tar zxf isi-X.Y.Z.tgz
104
- $ cd isi-X.Y.Z
105
- $ su
106
- # ruby setup.rb
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 easier way, if you are a RubyGems user:
110
+ There is an easy way, if you are a RubyGems user:
111
111
  </p>
112
112
  <pre>
113
- $ gem install isi
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 contains your saved
118
- &quot;Marked List&quot;, e.g. savedrecs.txt.
117
+ Just copy lib/isi.rb (isi-X.Y.Z.rb) into your working directory which
118
+ contains your saved &quot;Marked List&quot;, e.g. savedrecs.txt.
119
119
  </p>
120
120
  <pre>
121
- $ cp lib/isi.rb ~/your/working/directory/
122
- $ cd ~/your/working/directory/
123
- $ ruby isi.rb savedrecs1.txt savedrecs2.txt
124
- $ ruby isi.rb &lt; savedrecs.txt &gt; savedrecs.bib
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 &lt; savedrecs.txt &gt; savedrecs.bib
125
126
  </pre>
126
127
  <p>
127
- Lsat two lines are examples of usage for this installation way.
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&quot; as the fields to include in the output file.
137
143
  </p>
138
144
  <h3>Here are some examples</h3>
139
145
  <pre>
140
- % isi2bibtex savedrecs.txt
141
- % isi2bibtex savedrecs1.txt savedrecs2.txt &gt; savedrecs.bib
142
- % isi2bibtex &lt; savedrecs.txt &gt; savedrecs.bib
143
- % cat savedrecs.txt | isi2bibtex &gt; savedrecs.bib
146
+ $ isi2bibtex savedrecs.txt
147
+ $ isi2bibtex savedrecs1.txt savedrecs2.txt &gt; savedrecs.bib
148
+ $ isi2bibtex &lt; savedrecs.txt &gt; savedrecs.bib
149
+ $ cat savedrecs.txt | isi2bibtex &gt; 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
- T.B.A.
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
+ &quot;#{@hash['TI']} - #{and_separated_authors}\n&quot;
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
  &quot;GPL&quot;).
155
177
  </p>
156
- <h2>Thanks to contributer(s)!</h2>
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 easily.
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
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sat Apr 28 22:07:29 -0400 2007</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: &lt;2007-04-28 22:07:29 t-nissie&gt; Author: Takeshi Nishimatsu
73
+ Time-stamp: &lt;2007-08-16 16:48:15 t-nissie&gt; 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 &gt; savedrecs.bib
74
77
  </p>
75
78
 
76
79
  </div>
@@ -102,10 +105,13 @@ Time-stamp: &lt;2007-04-28 22:07:29 t-nissie&gt; 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">&quot;1.1.2&quot;</td>
108
+ <td class="context-item-value">'1.1.3'</td>
106
109
  <td width="3em">&nbsp;</td>
107
110
  <td class="context-item-desc">
108
- Time-stamp: &lt;2007-04-28 22:07:29 t-nissie&gt; Author: Takeshi Nishimatsu
111
+ Time-stamp: &lt;2007-08-16 16:48:15 t-nissie&gt; 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 &gt; savedrecs.bib
109
115
 
110
116
  </td>
111
117
  </tr>
@@ -1,5 +1,5 @@
1
1
  # isi.gemspec -*-ruby-*-
2
- # Time-stamp: <2007-04-28 22:11:36 t-nissie>
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 = 'isi converts ISI Export Format to BibTeX Format. (Formerly named isi2bibtex.rb.)'
13
- s.files = Dir.glob("{lib,tests}/**/*.rb") + Dir.glob("{html}/**/*") <<
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
- isi converts ISI Export Format to BibTeX Format.
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-04-28 22:07:29 t-nissie>
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 = "1.1.2"
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
- else
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
@@ -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
@@ -1,8 +1,9 @@
1
1
  #! /usr/bin/env ruby
2
2
  # isi_test.rb -*-ruby-*-
3
- # Time-stamp: <2007-04-28 16:14:18 t-nissie>
3
+ # Time-stamp: <2007-08-21 13:10:11 takeshi>
4
4
  # Author: Takeshi NISHIMATSU
5
5
  ##
6
+ require 'rubygems'
6
7
  require 'rubyunit'
7
8
  require 'isi'
8
9
 
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
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.2
7
- date: 2007-04-28 00:00:00 -04:00
8
- summary: isi converts ISI Export Format to BibTeX Format. (Formerly named isi2bibtex.rb.)
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: isi converts ISI Export Format to BibTeX Format. This is a Ruby script. You can use this script as a library. You can get the tagged Marked List in Web of Science by pushing the [SAVE TO FILE] button.
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
- - lib/isi.rb
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/ISI_record.src/M000003.html
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/created.rid
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: