bibkeys 0.0.1 → 0.0.2
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.
- checksums.yaml +7 -0
- data/Gemfile +3 -3
- data/Gemfile.lock +8 -8
- data/Manifest +8 -6
- data/README.md +26 -6
- data/Rakefile +5 -7
- data/bibkeys.gemspec +6 -2
- data/bin/bibkeys +5 -0
- data/lib/bibkeys.rb +1 -0
- data/lib/bibkeys/version.rb +3 -0
- metadata +14 -20
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 397340529138fbead98dff8fda0a4287db17f320
|
4
|
+
data.tar.gz: c6934a5b02ba8f3ca7afea8cb17b1ea1f45d5df0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 34dcdfe9963c6f770c7cd729628776fbf6c13303ea2ac00fe6a29a4bacc9cc77ae25038f5e7006e2126b9b170217c86e682fcc6bb6124fab41f4d867598b7566
|
7
|
+
data.tar.gz: 42bbaec2d8c15c655f249b2751e99dc003d3c52e2deb9a762cea77f18b3282c1c51be4757e99f31931ea42be2c5b29e6caa8fd2bb22d8078e5e570263eaad53c
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
gem "bundler"
|
3
|
-
gem "rake"
|
4
|
-
gem "bibtex-ruby", "~> 2.
|
3
|
+
gem "rake", "~> 10.0.4"
|
4
|
+
gem "bibtex-ruby", "~> 2.3"
|
data/Gemfile.lock
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
GEM
|
2
|
-
remote:
|
2
|
+
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
bibtex-ruby (2.1
|
4
|
+
bibtex-ruby (2.3.1)
|
5
5
|
latex-decode (>= 0.0.6)
|
6
6
|
multi_json (~> 1.3)
|
7
|
-
latex-decode (0.0
|
7
|
+
latex-decode (0.1.0)
|
8
8
|
unicode (~> 0.4)
|
9
|
-
multi_json (1.
|
10
|
-
rake (0.
|
11
|
-
unicode (0.4.
|
9
|
+
multi_json (1.7.2)
|
10
|
+
rake (10.0.4)
|
11
|
+
unicode (0.4.4)
|
12
12
|
|
13
13
|
PLATFORMS
|
14
14
|
ruby
|
15
15
|
|
16
16
|
DEPENDENCIES
|
17
|
-
bibtex-ruby (~> 2.
|
17
|
+
bibtex-ruby (~> 2.3)
|
18
18
|
bundler
|
19
|
-
rake
|
19
|
+
rake (~> 10.0.4)
|
data/Manifest
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
+
Gemfile
|
2
|
+
Gemfile.lock
|
3
|
+
Manifest
|
4
|
+
README.md
|
5
|
+
Rakefile
|
1
6
|
bibkeys.gemspec
|
2
7
|
bin
|
3
8
|
bin/bibkeys
|
4
|
-
Gemfile
|
5
|
-
Gemfile.lock
|
6
9
|
lib
|
10
|
+
lib/bibkeys
|
7
11
|
lib/bibkeys.rb
|
8
|
-
|
9
|
-
|
10
|
-
Rakefile
|
11
|
-
README.md
|
12
|
+
lib/bibkeys/version.rb
|
13
|
+
license.txt
|
data/README.md
CHANGED
@@ -6,12 +6,13 @@ Lincoln A. Mullen | lincoln@lincolnmullen.com | http://lincolnmullen.com
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
You can install bibkeys from [RubyGems]
|
9
|
+
You can install bibkeys from [RubyGems][]:
|
10
10
|
|
11
11
|
gem install bibkeys
|
12
12
|
|
13
|
-
If you don't have it installed already, you'll need to install
|
14
|
-
[bibtex-ruby], which does most of the heavy lifting.
|
13
|
+
If you don't have it installed already, you'll need to install
|
14
|
+
[bibtex-ruby][], which does most of the heavy lifting. Using gem
|
15
|
+
to install bibkeys should install that dependency for you.
|
15
16
|
|
16
17
|
## Usage
|
17
18
|
|
@@ -21,19 +22,38 @@ To list all the keys in a BibTeX file:
|
|
21
22
|
|
22
23
|
To sort the list of keys:
|
23
24
|
|
24
|
-
bibkeys -s
|
25
|
+
bibkeys -s bibliography.bib
|
25
26
|
|
26
27
|
To list all the keys in multiple files:
|
27
28
|
|
28
29
|
bibkeys bib1.bib bib2.bib etc.bib
|
29
30
|
|
30
|
-
This program functions as
|
31
|
+
This program functions as \*nix-style utility. Accordingly, it can read
|
31
32
|
from stdin:
|
32
33
|
|
33
34
|
cat bibliography.bib | bibkeys -
|
34
35
|
|
35
36
|
To save the keys to a file:
|
36
37
|
|
37
|
-
bibkeys
|
38
|
+
bibkeys bibliography.bib > keys.txt
|
38
39
|
|
40
|
+
## Using Bibkeys with Vim
|
41
|
+
|
42
|
+
Bibkeys may be useful to you if you use BibTeX citation keys in your
|
43
|
+
writing. I generate a file with citation keys automatically whenever I
|
44
|
+
edit my [BibTeX database][]. In my `.vimrc`, I've added the following
|
45
|
+
lines:
|
46
|
+
|
47
|
+
set dictionary=$HOME/bib/citekeys.txt
|
48
|
+
set complete+=k
|
49
|
+
|
50
|
+
When writing a citation in a LaTeX or Pandoc document, typing the
|
51
|
+
beginning of a citation and pressing `Ctrl-X Ctrl-K` or `Ctrl-X Ctrl-N`
|
52
|
+
autocompletes the citation. (N.B. This only works if your citation keys
|
53
|
+
do not contain characters like `:` or `-`. If you keys do have those
|
54
|
+
characters, you'll need to user-completion or omni-completion, both of
|
55
|
+
which are a pain.)
|
56
|
+
|
57
|
+
[RubyGems]: https://rubygems.org/
|
39
58
|
[bibtex-ruby]: https://github.com/inukshuk/bibtex-ruby
|
59
|
+
[BibTeX database]: https://github.com/lmullen/historybib
|
data/Rakefile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'bundler'
|
4
|
+
require "bundler/gem_tasks"
|
5
|
+
|
4
6
|
begin
|
5
7
|
Bundler.setup
|
6
8
|
rescue Bundler::BundlerError => e
|
@@ -12,17 +14,13 @@ end
|
|
12
14
|
require 'rake/clean'
|
13
15
|
CLEAN.include('*.gem')
|
14
16
|
|
15
|
-
|
16
|
-
task :build => ['manifest'] do
|
17
|
-
system 'gem build bibkeys.gemspec'
|
18
|
-
end
|
19
|
-
|
17
|
+
task :build => ['manifest']
|
20
18
|
|
21
19
|
desc 'Updates the Manifest file'
|
22
|
-
task :manifest
|
20
|
+
task :manifest do
|
23
21
|
m = File.open('Manifest', 'w')
|
24
22
|
m.print FileList['**/*'].reject{ |f|
|
25
|
-
f.start_with?('
|
23
|
+
f.start_with?('pkg') || f.end_with?('.bib')
|
26
24
|
}.join("\n")
|
27
25
|
m.close
|
28
26
|
end
|
data/bibkeys.gemspec
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'bibkeys/version'
|
4
|
+
|
1
5
|
Gem::Specification.new do |s|
|
2
6
|
s.name = 'bibkeys'
|
3
|
-
s.version =
|
7
|
+
s.version = Bibkeys::VERSION
|
4
8
|
s.date = '2012-11-02'
|
5
9
|
s.summary = 'List all the keys in BibTeX file'
|
6
10
|
s.description = 'A Ruby utility to list all the citation keys in a BibTeX file'
|
@@ -11,5 +15,5 @@ Gem::Specification.new do |s|
|
|
11
15
|
s.bindir = 'bin'
|
12
16
|
s.executables << 'bibkeys'
|
13
17
|
s.license = 'MIT'
|
14
|
-
s.add_runtime_dependency('bibtex-ruby', ['~>2.
|
18
|
+
s.add_runtime_dependency('bibtex-ruby', ['~>2.3'])
|
15
19
|
end
|
data/bin/bibkeys
CHANGED
@@ -30,6 +30,11 @@ opts = OptionParser.new do|opts|
|
|
30
30
|
options[:sort] = true
|
31
31
|
end
|
32
32
|
|
33
|
+
opts.on('--version', 'Show version number') do
|
34
|
+
puts "bibkeys, version " + Bibkeys::VERSION
|
35
|
+
exit
|
36
|
+
end
|
37
|
+
|
33
38
|
end
|
34
39
|
opts.parse! # strips all non-filename arguments from ARGV
|
35
40
|
|
data/lib/bibkeys.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibkeys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Lincoln A. Mullen
|
@@ -14,19 +13,17 @@ dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bibtex-ruby
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 2.
|
19
|
+
version: '2.3'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 2.
|
26
|
+
version: '2.3'
|
30
27
|
description: A Ruby utility to list all the citation keys in a BibTeX file
|
31
28
|
email: lincoln@lincolnmullen.com
|
32
29
|
executables:
|
@@ -34,41 +31,38 @@ executables:
|
|
34
31
|
extensions: []
|
35
32
|
extra_rdoc_files: []
|
36
33
|
files:
|
37
|
-
- bibkeys.gemspec
|
38
|
-
- bin/bibkeys
|
39
34
|
- Gemfile
|
40
35
|
- Gemfile.lock
|
41
|
-
- lib/bibkeys.rb
|
42
|
-
- license.txt
|
43
36
|
- Manifest
|
44
|
-
- Rakefile
|
45
37
|
- README.md
|
38
|
+
- Rakefile
|
39
|
+
- bibkeys.gemspec
|
40
|
+
- bin/bibkeys
|
41
|
+
- lib/bibkeys.rb
|
42
|
+
- lib/bibkeys/version.rb
|
43
|
+
- license.txt
|
46
44
|
homepage: http://github.com/lmullen/bibkeys
|
47
45
|
licenses:
|
48
46
|
- MIT
|
47
|
+
metadata: {}
|
49
48
|
post_install_message:
|
50
49
|
rdoc_options: []
|
51
50
|
require_paths:
|
52
51
|
- lib
|
53
52
|
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
53
|
requirements:
|
56
|
-
- -
|
54
|
+
- - '>='
|
57
55
|
- !ruby/object:Gem::Version
|
58
56
|
version: '0'
|
59
|
-
segments:
|
60
|
-
- 0
|
61
|
-
hash: -4548692308244964840
|
62
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
58
|
requirements:
|
65
|
-
- -
|
59
|
+
- - '>='
|
66
60
|
- !ruby/object:Gem::Version
|
67
61
|
version: '0'
|
68
62
|
requirements: []
|
69
63
|
rubyforge_project:
|
70
|
-
rubygems_version:
|
64
|
+
rubygems_version: 2.0.0
|
71
65
|
signing_key:
|
72
|
-
specification_version:
|
66
|
+
specification_version: 4
|
73
67
|
summary: List all the keys in BibTeX file
|
74
68
|
test_files: []
|