pdf-page-count 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +18 -0
- data/LICENSE +12 -0
- data/README.md +48 -0
- data/lib/pdf-page-count/version.rb +3 -0
- data/pdf-page-count.gemspec +17 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8acef407b8038bb4baec63c5c034e57c6e4281c0
|
4
|
+
data.tar.gz: 4a963036a60a097b4a201992db6211eac9303294
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4d72a49296700da6028b8b6184203ac473019198dee2456c8175ef7cb2bdfb5a5935928214b617eacd3ebf81accb8ac69a52f43d86c775dd03266250db40506
|
7
|
+
data.tar.gz: 6c5a1cbec5fcdfebedd2483963451d168b6029c80e852b04ad429066fb24538539d968e8d032726ecd8038f9c267e63c8f77215dfc1e686713a010fe6dd40b7b
|
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Copyright (c) 2014, Leigh McCulloch
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
5
|
+
|
6
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
7
|
+
|
8
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
9
|
+
|
10
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
11
|
+
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# pdf-page-count
|
2
|
+
|
3
|
+
A command line application that will count the number of pages in multiple or individual PDFs. It can recursively traverse multiple directories and sum the total pages.
|
4
|
+
|
5
|
+
Enable verbose output to see each individual PDF's page count when doing so.
|
6
|
+
|
7
|
+
# Installation
|
8
|
+
|
9
|
+
The recommended installation method is via Rubygems.
|
10
|
+
|
11
|
+
gem install pdf-page-count
|
12
|
+
|
13
|
+
# Usage
|
14
|
+
|
15
|
+
Usage: pdf-page-count [options] [file/path] [file/path] ...
|
16
|
+
|
17
|
+
Options
|
18
|
+
-R, --recursive Recursively search for .pdf files
|
19
|
+
-T, --threads [N] Number of threads used to read pdf files
|
20
|
+
-v, --[no-]verbose Run verbosely
|
21
|
+
-h, --help help
|
22
|
+
|
23
|
+
# Examples
|
24
|
+
|
25
|
+
Count the pages in a single PDF.
|
26
|
+
|
27
|
+
Puter:~ user$ pdf-page-count 1.pdf
|
28
|
+
|
29
|
+
Count the pages in a multiple individual PDFs.
|
30
|
+
|
31
|
+
Puter:~ user$ pdf-page-count 1.pdf morefiles/2.pdf
|
32
|
+
|
33
|
+
Count the pages in PDFs contained in a directory.
|
34
|
+
|
35
|
+
Puter:~ user$ pdf-page-count morefiles
|
36
|
+
|
37
|
+
Count the pages in PDFs contained in a directory and it's subdirectories recursively.
|
38
|
+
|
39
|
+
Puter:~ user$ pdf-page-count -R morefiles
|
40
|
+
|
41
|
+
# Thanks
|
42
|
+
|
43
|
+
* [pdf-reader](http://github.com/yob/pdf-reader) for counting pages in a single PDF.
|
44
|
+
* [thread](https://github.com/meh/ruby-thread) for the thread pool.
|
45
|
+
|
46
|
+
# Licence
|
47
|
+
|
48
|
+
See [LICENCE](LICENSE)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
2
|
+
require "pdf-page-count/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "pdf-page-count"
|
6
|
+
s.version = PdfPageCount::VERSION
|
7
|
+
s.summary = "Counts the pages in single and multiple PDFs."
|
8
|
+
s.description = "Counts the pages in single and multiple PDFs. Capable of recursively finding PDFs in directories."
|
9
|
+
s.authors = [ "Leigh McCulloch" ]
|
10
|
+
s.email = "leigh@mcchouse.com"
|
11
|
+
s.files = `git ls-files -z`.split("\0")
|
12
|
+
s.homepage = "http://rubygems.org/gems/pdf-page-count"
|
13
|
+
s.license = "BSD-3-Clause"
|
14
|
+
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
15
|
+
s.add_runtime_dependency "thread", ["= 0.1.3"]
|
16
|
+
s.add_runtime_dependency "pdf-reader", ["= 1.3.3"]
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf-page-count
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leigh McCulloch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thread
|
@@ -46,11 +46,16 @@ executables:
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- LICENSE
|
51
|
+
- README.md
|
49
52
|
- bin/pdf-page-count
|
50
53
|
- lib/pdf-page-count.rb
|
51
54
|
- lib/pdf-page-count/file_util.rb
|
52
55
|
- lib/pdf-page-count/pdf_page_counter.rb
|
53
56
|
- lib/pdf-page-count/pdf_util.rb
|
57
|
+
- lib/pdf-page-count/version.rb
|
58
|
+
- pdf-page-count.gemspec
|
54
59
|
homepage: http://rubygems.org/gems/pdf-page-count
|
55
60
|
licenses:
|
56
61
|
- BSD-3-Clause
|