dblp 0.5.5 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/dblp +4 -0
  2. data/lib/dblp/grabber.rb +4 -1
  3. metadata +4 -4
data/bin/dblp CHANGED
@@ -41,6 +41,10 @@ BANNER
41
41
  opts.on("-c", "--[no-]crossref", "Generate full cross-references when fetching the data from DBLP") do |c|
42
42
  options.crossref = c
43
43
  end
44
+
45
+ opts.on("-s", "--[no-]short", "Make really compact version") do |c|
46
+ options.short = c
47
+ end
44
48
 
45
49
  opts.on("-b", "--[no-]bibtex", "Run Bibtex after fetching bib entries") do |b|
46
50
  options.bibtex = b
data/lib/dblp/grabber.rb CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  require 'open-uri'
2
3
 
3
4
 
@@ -49,7 +50,9 @@ module Dblp
49
50
  # If we find a booktitle, replace the book title with the
50
51
  # one from the crossref
51
52
  if booktitle
52
- result[0].gsub!(/^\s+booktitle\s+=\s+\{(.*?)\},/m, " booktitle = {{#{booktitle[1]}}},")
53
+ unless @options.short
54
+ result[0].gsub!(/^\s+booktitle\s+=\s+\{(.*?)\},/m, " booktitle = {{#{booktitle[1]}}},")
55
+ end
53
56
 
54
57
  publisher = pres[1][0].match(/^\s+publisher\s+=\s+\{(.*?)\},/m)
55
58
  publisher_data = publisher ? " publisher = {{#{publisher[1]}}}," : ""
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dblp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-28 00:00:00.000000000Z
12
+ date: 2012-11-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70139597190180 !ruby/object:Gem::Requirement
16
+ requirement: &70183755509060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 1.4.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70139597190180
24
+ version_requirements: *70183755509060
25
25
  description: Dynamically generate the bibtex file from your citations
26
26
  email: grundprinzip@gmail.com
27
27
  executables: