pdf_colored_pages 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9bd4bfd2159aeb9a948b4930ad36bee05a7a02ce
4
- data.tar.gz: 6d6b97947edb27ca25782b68e504cff11c765023
3
+ metadata.gz: b85a37828d6f5a88fb271ff64175b0c0433afcf1
4
+ data.tar.gz: fb6bf352f281b49c121933a7f531e48cadfdae79
5
5
  SHA512:
6
- metadata.gz: 6ea64b656203e7e36f738ddbfc6a9212997d57bbac48702395eafdaea9fa0b468cf32f40664a7b557f3e4b021fe798c21d9690cb39e7be9e9de9d01f67116ce5
7
- data.tar.gz: 36cc1a9f36669aac355bf1adc0ed82550a1adb069534ef18138f6663737804e6dc65c8e233d6a9204220c4c5dcc4c11f2638e787e856ff78b459571525034f45
6
+ metadata.gz: 721ec9598821a2b26c2c59c723d8a54764d18d725ab52331c988f6a8f63862772fa755541d001f5d25c2c62088fdf15dad26245f0cfc2450ad826ef1cccbdabe
7
+ data.tar.gz: c71167e7454a9e0f731f69ec1ce7d6ad63a013bf4f4f05476bb01cc16fe432f2da57318dca2e3ffbca1f67be09694f61cf2632dd3ca39e2f3d0ce10e83cf2676
data/README.md CHANGED
@@ -34,6 +34,11 @@ PdfColoredPages.as_range_string(/path/to/pdf.pdf)
34
34
  # returns: 1,3-4
35
35
  ```
36
36
 
37
+ Shell:
38
+
39
+ $ pdf_colored_pages /Users/mojomacssd/rails/gems/pdf_colored_pages/test/combined.pdf
40
+
41
+
37
42
  Just Check:
38
43
  ```ruby
39
44
  PdfColoredPages.colored_pages?(/path/to/pdf.pdf)
@@ -44,6 +49,7 @@ Test:
44
49
 
45
50
  $ rake test
46
51
 
52
+
47
53
  ## Contributing
48
54
 
49
55
  1. Fork it ( https://github.com/RedRoosterMobile/pdf-colored-pages/fork )
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'shellwords'
4
+ require 'pdf_colored_pages'
5
+
6
+
7
+ # Exit cleanly from an early interrupt
8
+ Signal.trap('INT') { exit 1 }
9
+
10
+
11
+ $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib")
12
+
13
+ if ARGV.length==0
14
+ puts "[USAGE]: #{__FILE__} PATH_TO_PDF"
15
+ exit
16
+ end
17
+
18
+
19
+ file = Shellwords.shellescape(ARGV.first)
20
+
21
+ unless File.exist? file
22
+ puts "[ERROR]: file does not exist\n #{file}"
23
+ exit
24
+ end
25
+
26
+ puts PdfColoredPages.as_range_string(file)
@@ -1,3 +1,3 @@
1
1
  module PdfColoredPages
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdf_colored_pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Ranker
@@ -41,7 +41,8 @@ dependencies:
41
41
  description: Gets the colored pages of a PDF by parsing Ghostscript (>9.05) output
42
42
  email:
43
43
  - info@redroostermobile.com
44
- executables: []
44
+ executables:
45
+ - pdf_colored_pages
45
46
  extensions: []
46
47
  extra_rdoc_files: []
47
48
  files:
@@ -56,6 +57,7 @@ files:
56
57
  - README.md
57
58
  - README.rdoc
58
59
  - Rakefile
60
+ - bin/pdf_colored_pages
59
61
  - lib/pdf_colored_pages.rb
60
62
  - lib/pdf_colored_pages/version.rb
61
63
  - pdf_colored_pages.gemspec