arxiv-references 0.1.6.3 → 0.1.6.4
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 +4 -4
- data/README.md +24 -3
- data/lib/arxiv/references/myUtil.rb +3 -3
- data/lib/arxiv/references/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f39df63d168c8f92be4034e0e2d7e67a20e701d
|
4
|
+
data.tar.gz: 7c457c050423bf19f0abd6b9669e723a47ae5ed7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7dc8619ad7f4830c2b41c8e34c5b6e21005afcf0fe1fa074269850d982d8b01b951ee8e097a433c6a9507e4dcfa6b0f4b0f2af32901de971fd98a8c642d43f8
|
7
|
+
data.tar.gz: 87254f5cf20ed7e64b2a67479ac37ce4b50c091b778b11dc933fd6bba884b7852a4f51506320f9ca8afb095b7c0c7447b50005c70518331dfb6c44d3c5c9bf7b
|
data/README.md
CHANGED
@@ -6,11 +6,20 @@
|
|
6
6
|
|
7
7
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/arxiv/references`. To experiment with that code, run `bin/console` for an interactive prompt.
|
8
8
|
|
9
|
-
|
9
|
+
## Dependencies
|
10
|
+
|
11
|
+
- k2pdfopt (http://www.willus.com/k2pdfopt/)
|
10
12
|
|
11
13
|
## Installation
|
12
14
|
|
13
|
-
|
15
|
+
### Install k2pdfopt
|
16
|
+
|
17
|
+
1. Access [this url](http://www.willus.com/k2pdfopt/download/)
|
18
|
+
2. Select version by OS and 32/64 bit and put CAPTHA
|
19
|
+
3. Move to `/usr/local/bin`
|
20
|
+
4. Confirm to use `k2pdfopt` command
|
21
|
+
|
22
|
+
### Install arxiv-references
|
14
23
|
|
15
24
|
```ruby
|
16
25
|
gem 'arxiv-references'
|
@@ -26,7 +35,19 @@ Or install it yourself as:
|
|
26
35
|
|
27
36
|
## Usage
|
28
37
|
|
29
|
-
|
38
|
+
### fetch paper information from arxiv url
|
39
|
+
`arxiv-ref url <arxivurl>`
|
40
|
+
|
41
|
+
### fetch paper information from arxiv ID
|
42
|
+
`arxiv-ref id <arxivid>`
|
43
|
+
|
44
|
+
### fetch paper citation list from PDF URL
|
45
|
+
`arxiv-ref pdfurl <pdfurl>`
|
46
|
+
|
47
|
+
### Options
|
48
|
+
--work_dir : [default: /tmp] working directory to convert multi column pdf to one column
|
49
|
+
--use_dir : [default: true] create working directory or not
|
50
|
+
|
30
51
|
|
31
52
|
## Development
|
32
53
|
|
@@ -39,7 +39,7 @@ module ArxivUtil
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
def removeFile(id, work_dir)
|
42
|
+
def self.removeFile(id, work_dir)
|
43
43
|
File.delete("#{work_dir}/#{id}-output.pdf")
|
44
44
|
File.delete("#{work_dir}/#{id}-output_k2opt.pdf")
|
45
45
|
end
|
@@ -133,9 +133,9 @@ module ArxivUtil
|
|
133
133
|
executed_pdf = convertSingleColPdf(job_id, work_dir, file_name, use_dir)
|
134
134
|
references = fetchReference(executed_pdf)
|
135
135
|
if use_dir
|
136
|
-
|
136
|
+
removeDir(job_id, work_dir)
|
137
137
|
else
|
138
|
-
|
138
|
+
removeFile(job_id, work_dir)
|
139
139
|
end
|
140
140
|
return references
|
141
141
|
end
|