pdfmd 2.1.5 → 2.1.6

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: 95d7f0080e7a24588e5881e62a467912d247e733
4
- data.tar.gz: 8e092a66c880c71ea567c15a02238bd014092957
3
+ metadata.gz: 5e2ba1b3dab8288ed43b930c7e27b1754fc436f5
4
+ data.tar.gz: b2a0cfb407738c31d9b465bc2711b7c2b04ff650
5
5
  SHA512:
6
- metadata.gz: f301a21313482520487efe4a88453564b2978aac685c5db15f2f47797ab6e5533c14f453438bdde0c15e84ae4bc1142972e4e43068f60e97494679f2799e8674
7
- data.tar.gz: 47306852eb0d5f1f46620f0f704eedfaa6f97cb7fe6bdf34adf7667d0675ef60ccabc2245678f3a6abc98ed2042c16deee68621d0b7bfb7075c1a864cd4d85db
6
+ metadata.gz: d02be348bfe4301f09e3ca7e093c4d4585968f8229e56b759903ae2822b4a072f6030de75976f261a1c0ccccfe605988d01b71b22e49cb17bf645e20e0a60beb
7
+ data.tar.gz: 31051acfda07bd823eede7653917b74404e4d55948fd9b057156a4d082bda8697c56125777924034dfc5e4a84d7797d797c66711694fa42d4c83711866551954
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # Version 2.1.6
2
+ - Modified command `sort` to also support shell file extension.
3
+
1
4
  # Version 2.1.5
2
5
  - Bugfix: #3, Kommata in Subject field showing up in the filename, Removing double underscore
3
6
 
data/README.md CHANGED
@@ -6,6 +6,15 @@ Hidden deep in the directory structure of my disks I can quickly find the
6
6
  documents I need with a quick `find /document/path -type f -iname
7
7
  '*<keyword>*'` which matches some string in the filename.
8
8
 
9
+ ## Workflow
10
+ ![Workflow](./img/workflow_500.png) My workflow is as follow:
11
+ A) Scan the document. I use a small script for this to scan in color, black-white or grayscale. Generally all scans are black-white/300dpi. Documents with handwriting on them end up in grayscale and rarely i use color scans.
12
+ Documents end up as two-sided if there's a two sided print on it, otherwise not.
13
+ B) The scanned document is saved as pdf document, no caring about the naming.
14
+ C) That is where `pdfmd` comes in. Using `pdfmd` metadata is asked from me to provide. While going through the interactive menu, the document is opened, so it's easier for me to see which document I am working on.
15
+ D) The pdf document is updated with the metadata and automatically renamed according to a general naming scheme. That way the document gets uniq and is easy to find on the filesystem level.
16
+ E) The document gets automatically sorted away into a folder structure somewhere else on the system.
17
+
9
18
  # Requirements
10
19
 
11
20
  Although the requirements are listed in the script itself as well (header documentation!), here they are again:
@@ -154,3 +163,5 @@ $ hiera pdfmd::config
154
163
 
155
164
  If you have improvements and suggestions -> let me know.
156
165
  If you can help me writing tests for this, please let me know as well.
166
+
167
+ Icons and symbols from [www.opensymbols.org](http://www.opensymbols.org).
data/bin/pdfmd CHANGED
@@ -7,7 +7,7 @@ require "fileutils"
7
7
  require "i18n"
8
8
  require 'pathname'
9
9
 
10
- VERSION = '2.1.5'
10
+ VERSION = '2.1.6'
11
11
  NAME = 'pdfmd'
12
12
 
13
13
  #
@@ -207,30 +207,35 @@ method_option :copy, :aliases => '-c', :required => false, :type => :boolean, :d
207
207
  method_option :interactive, :aliases => '-i', :required => false, :type => :boolean, :desc => 'Enable/Disable interactive sorting'
208
208
  method_option :overwrite, :alises => '-o', :required => false, :type => :boolean, :desc => 'Enable/Disable file overwrite.', :lazy_default => true
209
209
  method_option :dryrun, :aliases => '-n', :required => false, :type => :boolean, :desc => 'Run without changing something'
210
- def sort(input)
210
+ def sort(*input)
211
211
 
212
- if File.file?(input)
213
- pdfdoc = Pdfmdsort.new input
214
- pdfdoc.copy = pdfdoc.determineValidSetting(options[:copy], 'sort:copy')
215
- pdfdoc.interactive = pdfdoc.determineValidSetting(options[:interactive], 'sort:interactive')
216
- pdfdoc.destination = pdfdoc.determineValidSetting(options[:destination], 'sort:destination')
217
- pdfdoc.overwrite = pdfdoc.determineValidSetting(options[:overwrite], 'sort:overwrite')
218
- pdfdoc.dryrun = pdfdoc.determineValidSetting(options[:dryrun], 'sort:dryrun')
219
- pdfdoc.sort
220
- else
221
-
222
- # Run the actions for all files
223
- Dir.glob(input.chomp + '/*.pdf').each do |filename|
224
- pdfdoc = Pdfmdsort.new filename
212
+ input.each do |file|
213
+
214
+ if File.file?(file)
215
+ pdfdoc = Pdfmdsort.new file
225
216
  pdfdoc.copy = pdfdoc.determineValidSetting(options[:copy], 'sort:copy')
226
217
  pdfdoc.interactive = pdfdoc.determineValidSetting(options[:interactive], 'sort:interactive')
227
218
  pdfdoc.destination = pdfdoc.determineValidSetting(options[:destination], 'sort:destination')
228
219
  pdfdoc.overwrite = pdfdoc.determineValidSetting(options[:overwrite], 'sort:overwrite')
229
220
  pdfdoc.dryrun = pdfdoc.determineValidSetting(options[:dryrun], 'sort:dryrun')
230
221
  pdfdoc.sort
222
+
223
+ else
224
+
225
+ # Run the actions for all files
226
+ Dir.glob(input.chomp + '/*.pdf').each do |filename|
227
+ pdfdoc = Pdfmdsort.new filename
228
+ pdfdoc.copy = pdfdoc.determineValidSetting(options[:copy], 'sort:copy')
229
+ pdfdoc.interactive = pdfdoc.determineValidSetting(options[:interactive], 'sort:interactive')
230
+ pdfdoc.destination = pdfdoc.determineValidSetting(options[:destination], 'sort:destination')
231
+ pdfdoc.overwrite = pdfdoc.determineValidSetting(options[:overwrite], 'sort:overwrite')
232
+ pdfdoc.dryrun = pdfdoc.determineValidSetting(options[:dryrun], 'sort:dryrun')
233
+ pdfdoc.sort
234
+ end
235
+
231
236
  end
232
237
 
233
- end
238
+ end # End of input array loop
234
239
 
235
240
  end
236
241
 
data/img/workflow.png ADDED
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Roos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-07 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -107,6 +107,9 @@ files:
107
107
  - Rakefile
108
108
  - TODO.mkd
109
109
  - bin/pdfmd
110
+ - img/workflow.png
111
+ - img/workflow_200.png
112
+ - img/workflow_500.png
110
113
  - lib/pdfmd.rb
111
114
  - lib/pdfmd/.pdfmd.log
112
115
  - lib/pdfmd/explain.author.md
@@ -147,8 +150,8 @@ homepage: https://github.com/Micronarrativ/ruby-pmd
147
150
  licenses:
148
151
  - MIT
149
152
  metadata:
150
- created: '2015-09-07 07:46:28'
151
- revision: '20150907074628'
153
+ created: '2015-09-21 21:06:09'
154
+ revision: '20150921210609'
152
155
  post_install_message: ". Run `pdfmd` to see the command help."
153
156
  rdoc_options: []
154
157
  require_paths: