pdf_meta 0.1.0 → 0.1.1
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 +39 -6
- data/lib/pdf_meta.rb +0 -1
- data/lib/pdf_meta/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3cbf21ab026b7c9a45ed4112ae80b2e402c67b6
|
4
|
+
data.tar.gz: e194b8b6fa94f42f96c75e78eeb07f933ec20f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2610988d5759b91f55fcee037b21369d5ed553d88bc1cca7fa6438c7c89a2e0e9c42c5cc53f6ed3d11e7b636137ebbf160de5c48bf35481e95fcca41087ae68c
|
7
|
+
data.tar.gz: 67221bee8827e3d136ff5d2415898c1a8d6484c83bc0ecef2b5ae371dfacd8327206cddc30598cd5147d8c48e87b17b07e4c36dafbec0411e123b9842d01b1b5
|
data/README.md
CHANGED
@@ -1,11 +1,19 @@
|
|
1
|
-
#
|
1
|
+
# PDFMeta
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
PDFMeta is a gem designed to resiliantly return metadata from a PDF, using poppler/xpdf command line tools
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
7
|
+
Install the poppler command line tools:
|
8
|
+
|
9
|
+
###OSX
|
10
|
+
|
11
|
+
`brew install poppler`
|
12
|
+
|
13
|
+
###Debian Based
|
14
|
+
|
15
|
+
`apt-get install poppler-utils`
|
16
|
+
|
9
17
|
Add this line to your application's Gemfile:
|
10
18
|
|
11
19
|
```ruby
|
@@ -20,9 +28,34 @@ Or install it yourself as:
|
|
20
28
|
|
21
29
|
$ gem install pdf_meta
|
22
30
|
|
31
|
+
## Configuration
|
32
|
+
|
33
|
+
You shouldn't need to configure the gem, however if you've installed pdfinfo in a custom location then pass it here
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
PDFMeta.configure do |config|
|
37
|
+
config[:command_path] = '/path/to/pdfinfo' #=> Default is just 'pdfinfo' in path
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
23
41
|
## Usage
|
24
42
|
|
25
|
-
|
43
|
+
There's only one call to the API, it takes either a string path to a file, or an open file handle
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
PDFMeta.read('path/to/file')
|
47
|
+
|
48
|
+
PDFMeta.read(File.open('path/to/file'))
|
49
|
+
```
|
50
|
+
|
51
|
+
It will return either a `PDFMeta::Results` or raise one of the following errors:
|
52
|
+
- `PopplerMissingError`
|
53
|
+
- `UnknownError`
|
54
|
+
- `UnableToReadFileError`
|
55
|
+
- `UnableOpenOutputFileError`
|
56
|
+
- `PDFPermissionError`
|
57
|
+
- `UnknownPopplerError`
|
58
|
+
|
26
59
|
|
27
60
|
## Development
|
28
61
|
|
@@ -32,7 +65,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
65
|
|
33
66
|
## Contributing
|
34
67
|
|
35
|
-
1. Fork it ( https://github.com/
|
68
|
+
1. Fork it ( https://github.com/boardiq/pdf_meta/fork )
|
36
69
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
70
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
71
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/pdf_meta.rb
CHANGED
data/lib/pdf_meta/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf_meta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Carlile
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|