isi 1.1.5 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +22 -13
- data/Rakefile +1 -2
- data/bin/isi2bibtex +0 -0
- data/bin/isi2html +81 -0
- data/bin/isi2kakenhi +2 -2
- data/bin/isi2tohoku +0 -0
- data/html/classes/ARGF.html +37 -25
- data/html/classes/ARGF.src/M000005.html +44 -47
- data/html/classes/ISI_record.html +70 -40
- data/html/classes/ISI_record.src/M000002.html +11 -37
- data/html/classes/ISI_record.src/M000003.html +35 -30
- data/html/classes/ISI_record.src/M000004.html +32 -0
- data/html/classes/String.html +48 -32
- data/html/classes/String.src/{M000004.html → M000001.html} +5 -8
- data/html/created.rid +1 -1
- data/html/files/README.html +49 -48
- data/html/files/lib/isi_rb.html +28 -31
- data/html/files/lib/journaltitleabbreviation_rb.html +15 -25
- data/html/fr_class_index.html +12 -12
- data/html/fr_file_index.html +12 -12
- data/html/fr_method_index.html +18 -16
- data/html/index.html +5 -8
- data/html/rdoc-style.css +210 -119
- data/isi.gemspec +3 -3
- data/lib/isi.rb +17 -9
- data/publication.css +36 -0
- data/tests/isi_test.rb +3 -3
- metadata +68 -59
- data/bin/isi2timescited +0 -40
- data/html/classes/ISI_record.src/M000001.html +0 -19
data/isi.gemspec
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
# isi.gemspec -*-ruby-*-
|
2
|
-
# Time-stamp: <
|
2
|
+
# Time-stamp: <2009-04-21 20:57:43 takeshi>
|
3
3
|
##
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.autorequire = 'lib/isi.rb'
|
6
6
|
s.name = 'isi'
|
7
7
|
|
8
8
|
s.bindir = 'bin'
|
9
|
-
s.executables = ['isi2bibtex', '
|
9
|
+
s.executables = ['isi2bibtex', 'isi2html', 'isi2kakenhi', 'isi2tohoku']
|
10
10
|
s.default_executable= 'isi2bibtex'
|
11
11
|
|
12
12
|
s.summary = 'ISI Export Format to BibTeX Format converter. (Formerly named isi.rb or isi2bibtex.rb.)'
|
13
13
|
s.files = Dir.glob("{html}/**/*") << 'lib/isi.rb' << 'lib/journaltitleabbreviation.rb' <<
|
14
14
|
'tests/isi_test.rb' << 'tests/example.isi' <<
|
15
|
-
'bin/isi2bibtex' << 'ChangeLog' << 'README' <<
|
15
|
+
'bin/isi2bibtex' << 'ChangeLog' << 'README' << 'publication.css' <<
|
16
16
|
'Rakefile' << 'isi.gemspec' << 'setup.rb' << 'NewsForRubyforge.txt'
|
17
17
|
s.author = 'Takeshi Nishimatsu'
|
18
18
|
s.email = 't-nissie@imr.tohoku.ac.jp'
|
data/lib/isi.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Time-stamp: <
|
2
|
+
# Time-stamp: <2009-04-21 20:07:14 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.
|
7
|
+
ISI_RB_VERSION = '1.2.0'
|
8
8
|
require 'text/format' # http://rubyforge.org/projects/text-format/
|
9
|
-
require 'journaltitleabbreviation'
|
10
9
|
class ISI_record
|
11
10
|
public
|
12
11
|
@@order = 0
|
@@ -38,9 +37,10 @@ public
|
|
38
37
|
"#{and_separated_authors.gsub(" and ",", ")}\t" +
|
39
38
|
"#{and_separated_authors.gsub(" and ",", ")}\t" +
|
40
39
|
"#{@hash['UR']}\t" + # V URL of online journal
|
41
|
-
"\t"
|
42
|
-
"#{@hash['PY']-2000}#{sprintf("%.2d",@@order)}\t" +
|
43
|
-
"
|
40
|
+
"#{@hash['DI']}\t" + # W DOI
|
41
|
+
"#{@hash['PY']-2000}#{sprintf("%.2d",@@order)}\t" + # X Bikou
|
42
|
+
"\t" + # Y Order
|
43
|
+
"1\n" # Z Status
|
44
44
|
end
|
45
45
|
|
46
46
|
def to_bibtex
|
@@ -59,7 +59,7 @@ public
|
|
59
59
|
NewKeywords= {#{fmt('ID')}},
|
60
60
|
Abstract = {#{fmt('AB')}},
|
61
61
|
ReprintURL = {#{fmt('UR')}},
|
62
|
-
DOI = {},
|
62
|
+
DOI = {#{@hash['DI']}},
|
63
63
|
MyComment = {},
|
64
64
|
WhereIFiledIt= {}}\n\n"
|
65
65
|
end
|
@@ -80,7 +80,7 @@ private
|
|
80
80
|
elsif @hash['JI']
|
81
81
|
return @hash['JI'].to_s
|
82
82
|
else
|
83
|
-
@hash['SO']
|
83
|
+
@hash['SO'] or ""
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
@@ -108,6 +108,14 @@ private
|
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
111
|
+
def doi_html_link
|
112
|
+
if @hash['DI']
|
113
|
+
"<a href=\"http://dx.doi.org/#{@hash['DI']}\">doi:#{@hash['DI']}</a>"
|
114
|
+
else
|
115
|
+
nil
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
111
119
|
def month_in_number
|
112
120
|
if @hash['PD']
|
113
121
|
mon = @hash['PD'][0..2].upcase
|
@@ -221,7 +229,7 @@ def ARGF.read_an_ISI_record
|
|
221
229
|
redo
|
222
230
|
when /^(NR|PG|PY|TC) (.*)$/
|
223
231
|
hash[$1] = $2.to_i
|
224
|
-
when /^(
|
232
|
+
when /^(AB|AP|AR|BN|BP|C1|CA|CL|CT|CY|DE|DI|DT|ED|EM|EP|FN|FU|FX|GA|ID|IS|J9|JI|LA|PA|PD|PI|PN|PT|PU|RP|SC|SE|SI|SN|SO|SP|SU|TI|UT|VL) (.*)$/
|
225
233
|
tag = $1
|
226
234
|
str = $2
|
227
235
|
while (line = gets) =~ /^ /
|
data/publication.css
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
/* -*-CSS-*-
|
2
|
+
* publication.css
|
3
|
+
* Time-stamp: <2008-09-19 10:19:06 takeshi>
|
4
|
+
* Author: Takeshi NISHIMATSU
|
5
|
+
*/
|
6
|
+
body
|
7
|
+
{
|
8
|
+
color: black;
|
9
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
10
|
+
}
|
11
|
+
|
12
|
+
h1, h2, h3, h4, h6
|
13
|
+
{
|
14
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
15
|
+
}
|
16
|
+
|
17
|
+
h1
|
18
|
+
{
|
19
|
+
color: darkblue;
|
20
|
+
}
|
21
|
+
|
22
|
+
h2
|
23
|
+
{
|
24
|
+
color: darkblue;
|
25
|
+
}
|
26
|
+
|
27
|
+
li
|
28
|
+
{
|
29
|
+
margin-bottom: 10px;
|
30
|
+
}
|
31
|
+
|
32
|
+
a
|
33
|
+
{
|
34
|
+
text-decoration: none;
|
35
|
+
color: darkblue;
|
36
|
+
}
|
data/tests/isi_test.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
# isi_test.rb -*-ruby-*-
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <2009-04-22 08:21:06 takeshi>
|
4
4
|
# Author: Takeshi NISHIMATSU
|
5
5
|
##
|
6
6
|
require 'rubygems'
|
7
|
-
require '
|
7
|
+
require 'test/unit'
|
8
8
|
require 'isi'
|
9
9
|
|
10
|
-
class TestISI <
|
10
|
+
class TestISI < Test::Unit::TestCase
|
11
11
|
def test_exist_ISI_record
|
12
12
|
assert_instance_of(Class, ISI_record)
|
13
13
|
end
|
metadata
CHANGED
@@ -1,57 +1,62 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: isi
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date: 2008-02-20 00:00:00 -05:00
|
8
|
-
summary: ISI Export Format to BibTeX Format converter. (Formerly named isi.rb or isi2bibtex.rb.)
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: t-nissie@imr.tohoku.ac.jp
|
12
|
-
homepage: http://isi-rb.rubyforge.org/
|
13
|
-
rubyforge_project: isi-rb
|
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
|
-
autorequire: lib/isi.rb
|
16
|
-
default_executable: isi2bibtex
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 1.2.0
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Takeshi Nishimatsu
|
8
|
+
autorequire: lib/isi.rb
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-04-22 00:00:00 +09:00
|
13
|
+
default_executable: isi2bibtex
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: text-format
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.0.0
|
24
|
+
version:
|
25
|
+
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.
|
26
|
+
email: t-nissie@imr.tohoku.ac.jp
|
27
|
+
executables:
|
28
|
+
- isi2bibtex
|
29
|
+
- isi2html
|
30
|
+
- isi2kakenhi
|
31
|
+
- isi2tohoku
|
32
|
+
extensions: []
|
33
|
+
|
34
|
+
extra_rdoc_files:
|
35
|
+
- README
|
31
36
|
files:
|
32
|
-
- html/
|
37
|
+
- html/files
|
38
|
+
- html/files/README.html
|
39
|
+
- html/files/lib
|
40
|
+
- html/files/lib/journaltitleabbreviation_rb.html
|
41
|
+
- html/files/lib/isi_rb.html
|
42
|
+
- html/rdoc-style.css
|
33
43
|
- html/classes
|
34
|
-
- html/classes/String.src
|
35
|
-
- html/classes/String.src/M000004.html
|
36
44
|
- html/classes/ISI_record.src
|
45
|
+
- html/classes/ISI_record.src/M000004.html
|
37
46
|
- html/classes/ISI_record.src/M000003.html
|
38
|
-
- html/classes/ISI_record.src/M000001.html
|
39
47
|
- html/classes/ISI_record.src/M000002.html
|
40
48
|
- html/classes/ARGF.html
|
41
|
-
- html/classes/ISI_record.html
|
42
49
|
- html/classes/String.html
|
50
|
+
- html/classes/ISI_record.html
|
43
51
|
- html/classes/ARGF.src
|
44
52
|
- html/classes/ARGF.src/M000005.html
|
45
|
-
- html/
|
46
|
-
- html/
|
47
|
-
- html/
|
48
|
-
- html/rdoc-style.css
|
53
|
+
- html/classes/String.src
|
54
|
+
- html/classes/String.src/M000001.html
|
55
|
+
- html/created.rid
|
49
56
|
- html/index.html
|
50
|
-
- html/
|
51
|
-
- html/
|
52
|
-
- html/
|
53
|
-
- html/files/lib/isi_rb.html
|
54
|
-
- html/files/lib/journaltitleabbreviation_rb.html
|
57
|
+
- html/fr_class_index.html
|
58
|
+
- html/fr_method_index.html
|
59
|
+
- html/fr_file_index.html
|
55
60
|
- lib/isi.rb
|
56
61
|
- lib/journaltitleabbreviation.rb
|
57
62
|
- tests/isi_test.rb
|
@@ -59,36 +64,40 @@ files:
|
|
59
64
|
- bin/isi2bibtex
|
60
65
|
- ChangeLog
|
61
66
|
- README
|
67
|
+
- publication.css
|
62
68
|
- Rakefile
|
63
69
|
- isi.gemspec
|
64
70
|
- setup.rb
|
65
71
|
- NewsForRubyforge.txt
|
66
|
-
|
67
|
-
-
|
72
|
+
has_rdoc: true
|
73
|
+
homepage: http://isi-rb.rubyforge.org/
|
74
|
+
post_install_message:
|
68
75
|
rdoc_options:
|
69
76
|
- --title
|
70
77
|
- isi
|
71
78
|
- --main
|
72
79
|
- README
|
73
80
|
- --line-numbers
|
74
|
-
|
75
|
-
-
|
76
|
-
|
77
|
-
|
78
|
-
-
|
79
|
-
-
|
80
|
-
|
81
|
-
|
82
|
-
|
81
|
+
require_paths:
|
82
|
+
- lib
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: "0"
|
88
|
+
version:
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: "0"
|
94
|
+
version:
|
83
95
|
requirements: []
|
84
96
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: 1.0.0
|
94
|
-
version:
|
97
|
+
rubyforge_project: isi-rb
|
98
|
+
rubygems_version: 1.3.1
|
99
|
+
signing_key:
|
100
|
+
specification_version: 2
|
101
|
+
summary: ISI Export Format to BibTeX Format converter. (Formerly named isi.rb or isi2bibtex.rb.)
|
102
|
+
test_files:
|
103
|
+
- tests/isi_test.rb
|
data/bin/isi2timescited
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# isi2timescited -*-Ruby-*-
|
3
|
-
# Time-stamp: <2007-10-31 18:32:00 takeshi>
|
4
|
-
# Author: Takeshi Nishimatsu
|
5
|
-
# Usage: isi2timescited MyAllPapers.isi
|
6
|
-
##
|
7
|
-
require "isi"
|
8
|
-
require "date"
|
9
|
-
|
10
|
-
class ISI_record
|
11
|
-
public
|
12
|
-
def citation_profile(times_cited_per_year)
|
13
|
-
times_cited_per_year[@hash['PY']] += @hash['TC']
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
tcpy = Array.new(2100,0)
|
18
|
-
|
19
|
-
while rec = ARGF.read_an_ISI_record
|
20
|
-
rec.citation_profile(tcpy)
|
21
|
-
end
|
22
|
-
|
23
|
-
flag=false
|
24
|
-
total=0
|
25
|
-
(1950..Date.today.year).each do |y|
|
26
|
-
if flag or tcpy[y]>0
|
27
|
-
flag=true
|
28
|
-
printf("%4i %5i\n", y, tcpy[y])
|
29
|
-
total += tcpy[y]
|
30
|
-
end
|
31
|
-
end
|
32
|
-
printf("total%5i\n", total)
|
33
|
-
|
34
|
-
STDERR << "WARNING: " << __FILE__ <<
|
35
|
-
" is OBSOLETE. Try the [CITATION REPORT] button in the right column of ISI Web of Science.\n"
|
36
|
-
|
37
|
-
|
38
|
-
#Local variables:
|
39
|
-
# compile-command: "ruby -r 'rubygems' isi2timescited /home/takeshi/references/isi/TakeshiNishimatsuAll.isi"
|
40
|
-
#End:
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (ISI_record)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/isi.rb, line 13</span>
|
14
|
-
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hash</span>)
|
15
|
-
14: <span class="ruby-ivar">@hash</span> = <span class="ruby-identifier">hash</span>
|
16
|
-
15: <span class="ruby-ivar">@@order</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
17
|
-
16: <span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|