-
Notifications
You must be signed in to change notification settings - Fork 1
/
get_pubinfo.rb
executable file
·55 lines (42 loc) · 987 Bytes
/
get_pubinfo.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
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
52
53
#!/usr/bin/ruby
require 'rubygems'
require 'rbosa'
require 'render-bibliography'
key = ARGV[0]
puts "looking for publication with key: #{key}"
bd = OSA.app('BibDesk')
p = bd.search(bd.documents[0],key)[0]
pubtype = p.type2
puts "publication is of type #{pubtype}"
case pubtype
when "article"
puts render_article(p)
when "book"
puts render_book(p)
when "booklet"
puts render_booklet(p)
when "conference"
puts render_conference(p)
when "inbook"
puts render_inbook(p)
when "inproceedings"
puts render_inproceedings(p)
when "manual"
puts render_manual(p)
when "mastersthesis"
puts render_mastersthesis(p)
when "misc"
puts render_misc(p)
when "phdthesis"
puts render_phdthesis(p)
when "proceedings"
puts render_proceedings(p)
when "techreport"
puts render_techreport(p)
when "unpublished"
puts render_unpublished(p)
else
raise "not implemented"
end
#puts p.bibtex_string
#puts bd.documents[0].templated_text(:using => bd.template_names[0], :for => p)