pdfmd 2.3.1 → 2.3.2

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: e948a9ca9e518fe87c5e1f9125710e66b7d33209
4
- data.tar.gz: 21ba2f5f0a12d8946ab842c31cafa72aa3c1322b
3
+ metadata.gz: a3c9d16341db6087343df79328c91ddfb757ffe0
4
+ data.tar.gz: a6e47f3412ee4a345a2b300008ca9881b2c3df73
5
5
  SHA512:
6
- metadata.gz: f774d40abdfbc4ae0cf5428026a1183f8578c2dfeefa12353a6d651f4f65fb37f18de0d84d7eb9637c5d98080513a6d1c8027461f0e9bbb5367442e1e6a65677
7
- data.tar.gz: 8d5bc461ecca0b1ecf227ea74d67dadb3ccfc29d88f7b1bd662243d4477854aded0a798f71e9e257e630328a01d7b1088c5e41df414a6169421850b2b5d28ec6
6
+ metadata.gz: be404ede11ed6d4546b09722f60a4c9366204eb2cebbd600d12e518d7443dcb86ec7b69e7723e18ef49a508656553107125d725e29d318a7cfce9e4413e143c3
7
+ data.tar.gz: d456c28bf731c8df878c5ba8811cf9567cf0a50e4a6abf1df8548de9760d3c5aa86027c44c64d432e41fd49e61b1e593f525d026d48185f08255a552f163e2b2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # Version 2.3.2
2
+ - Fixing automatic close of the pdf viewer.
3
+
1
4
  # Version 2.3.1
2
5
  - Fixing log typos.
3
6
  - Fixing Issue #4, 'Input files with spaces in filename'.
data/README.md CHANGED
@@ -159,6 +159,45 @@ Test your hiera configuration with
159
159
  $ hiera pdfmd::config
160
160
  ```
161
161
 
162
+ # Errors
163
+
164
+ ## Cc1plus: Execvp:
165
+
166
+ On Debian systems occasionally this wild error appears when sorting:
167
+
168
+ ```
169
+ gcc: error trying to exec 'cc1plus': execvp: No such file or directory
170
+ error: command 'gcc' failed with exit status 1
171
+ ```
172
+
173
+ **Solution:** Check if the package *g++* is installed:
174
+
175
+ ```
176
+ $ sudo aptitude install g++
177
+ ```
178
+
179
+ # Example
180
+
181
+ This example renames the a document `example.pdf` after fetching the metadata
182
+ required to build up the uniq filename.
183
+ The renaming option is set in *hiera* and automatically applied.
184
+
185
+ ```
186
+ $ pdfmd edit -t all example.pdf
187
+ Changing Createdate, current value: 2015:11:11 06:49:24+01:00
188
+ New date value: 20150101120000
189
+ Changing Author, current value:
190
+ New value: Daniel Roos
191
+ Changing Title, current value:
192
+ New value: Document
193
+ Changing Subject, current value:
194
+ New value: Example
195
+ Changing Keywords, current value:
196
+ New value: Test file
197
+ $ ls *.pdf
198
+ 20150101-daniel_roos-doc-document_example-test_file.pdf
199
+ ```
200
+
162
201
  # Contact
163
202
 
164
203
  If you have improvements and suggestions -> let me know.
data/bin/pdfmd CHANGED
@@ -7,7 +7,7 @@ require "fileutils"
7
7
  require "i18n"
8
8
  require 'pathname'
9
9
 
10
- VERSION = '2.3.1'
10
+ VERSION = '2.3.2'
11
11
  NAME = 'pdfmd'
12
12
 
13
13
  #
@@ -23,15 +23,15 @@ def readLongDesc(filename)
23
23
 
24
24
  longDescContent = ''
25
25
  paths.each do |value|
26
- if File.exists?(value + '/' + filename)
27
26
 
27
+ if File.exists?(value + '/' + filename)
28
28
  File.open(value + '/' + filename, 'r') do |infile|
29
29
  while (line = infile.gets)
30
30
  longDescContent = longDescContent + line
31
31
  end
32
32
  end
33
-
34
33
  end
34
+
35
35
  end
36
36
 
37
37
  longDescContent
@@ -104,14 +104,14 @@ class Pdfmdedit < Pdfmd
104
104
  @@edit_tags.each do |key,value|
105
105
  if value.empty?
106
106
 
107
- # At this poing:
108
- # 1. If @opendoc
109
- # 2. viewerPID.empty? (no viewer stated)
110
- # => Start the viewer
111
- if @opendoc and viewerPID.to_s.empty?
112
- viewerPID = start_viewer(@filename, @pdfviewer)
113
- self.log('debug', "Started external viewer '#{@pdfviewer}' with file '#{@filename}' and PID: #{viewerPID}")
114
- end
107
+ # At this poing:
108
+ # 1. If @opendoc
109
+ # 2. viewerPID.empty? (no viewer stated)
110
+ # => Start the viewer
111
+ if @opendoc and viewerPID.to_s.empty?
112
+ viewerPID = start_viewer(@filename, @pdfviewer)
113
+ self.log('debug', "Started external viewer '#{@pdfviewer}' with file '#{@filename}' and PID: #{viewerPID}")
114
+ end
115
115
 
116
116
  puts 'Changing ' + key.capitalize + ', current value: ' + @@metadata[key].to_s
117
117
 
@@ -140,7 +140,7 @@ class Pdfmdedit < Pdfmd
140
140
  @@metadata[key] = validatedDate
141
141
  end
142
142
 
143
- # Input of all other values
143
+ # Input of all other values
144
144
  else
145
145
 
146
146
  @@metadata[key] = readUserInput('New value: ')
@@ -158,6 +158,7 @@ class Pdfmdedit < Pdfmd
158
158
  # Close the external PDF viewer if a PID has been set.
159
159
  if !viewerPID.to_s.empty?
160
160
  `kill #{viewerPID}`
161
+ `pkill -f "#{@pdfviewer} #{@filename}"` # Double kill
161
162
  self.log('debug', "Viewer process with PID #{viewerPID} killed.")
162
163
  end
163
164
 
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.3.1
4
+ version: 2.3.2
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-11-05 00:00:00.000000000 Z
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -171,8 +171,8 @@ homepage: https://github.com/Micronarrativ/ruby-pmd
171
171
  licenses:
172
172
  - MIT
173
173
  metadata:
174
- created: '2015-11-05 09:26:59'
175
- revision: '20151105092659'
174
+ created: '2016-01-26 18:59:48'
175
+ revision: '20160126185948'
176
176
  post_install_message: ". Run `pdfmd` to see the command help."
177
177
  rdoc_options: []
178
178
  require_paths: