pdfmd 2.3.2 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/pdfmd +1 -1
- data/lib/pdfmd/pdfmdrename.rb +4 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52f0d97e7f979d8d87623345e50f3b308f8cc1ed
|
4
|
+
data.tar.gz: c57f1bdde7359cc8205f49235082936f8b664381
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5195654b5d8d8dada2b6c695d479e7138fdedc5a026f245b6b96c1e29ac5b176521f18528ca70001dc2499941e451a859c7f6a293671bc99728c00bebe25117d
|
7
|
+
data.tar.gz: 2e8183af3cee48bc6213801530266ef8841d9ef85ef53515eb87ff8f5f94b0baab45a9981e6d742a2efec54e6ed56f9f7cc2871504a20b7c45d619407218c6ae
|
data/bin/pdfmd
CHANGED
data/lib/pdfmd/pdfmdrename.rb
CHANGED
@@ -41,8 +41,8 @@ class Pdfmdrename < Pdfmd
|
|
41
41
|
newFilename[:date] = @@metadata['createdate'].gsub(/\ \d{2}\:\d{2}\:\d{2}.*$/,'').gsub(/\:/,'')
|
42
42
|
newFilename[:author] = get_author().gsub(/\'/,'').gsub(/\_$/, '')
|
43
43
|
newFilename[:doctype] = get_doctype()
|
44
|
-
newFilename[:title] = @@metadata['title'].downcase
|
45
|
-
newFilename[:subject] = @@metadata['subject'].downcase.gsub(/(\s|\-|\.|\&|\%|\,)/,'_').gsub(/\_+/, '_')
|
44
|
+
newFilename[:title] = @@metadata['title'].downcase.gsub(/(\s|\-|\.|\&|\%|\,)/, '_').gsub(/\_+/, '_')
|
45
|
+
newFilename[:subject] = @@metadata['subject'].downcase.gsub(/(\s|\-|\.|\&|\%|\,)/, '_').gsub(/\_+/, '_')
|
46
46
|
newFilename[:keywords] = get_keywords(get_keywordsPreface(newFilename))
|
47
47
|
newFilename[:extension] = @fileextension
|
48
48
|
newFilename[:outputdir] = get_outputdir(@outputdir)
|
@@ -55,6 +55,7 @@ class Pdfmdrename < Pdfmd
|
|
55
55
|
command = @copy ? 'cp' : 'mv'
|
56
56
|
|
57
57
|
filetarget = get_filename(newFilename)
|
58
|
+
puts filetarget
|
58
59
|
if @dryrun # Do nothing on dryrun
|
59
60
|
if @filename == filetarget
|
60
61
|
self.log('info', "Dryrun: File '#{@filename}' already has the correct name. Doing nothing.")
|
@@ -239,7 +240,7 @@ class Pdfmdrename < Pdfmd
|
|
239
240
|
# title and subject are being returned.
|
240
241
|
|
241
242
|
# Normalize special characters
|
242
|
-
title =
|
243
|
+
title = filedata[:title].downcase
|
243
244
|
subject = !filedata[:subject].empty? ? '_' + filedata[:subject].downcase : ''
|
244
245
|
subject = subject.gsub(/\s|\-|\&/, '_')
|
245
246
|
I18n.transliterate(title + subject)
|
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.
|
4
|
+
version: 2.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Roos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-02 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: '2016-
|
175
|
-
revision: '
|
174
|
+
created: '2016-03-02 21:24:30'
|
175
|
+
revision: '20160302212430'
|
176
176
|
post_install_message: ". Run `pdfmd` to see the command help."
|
177
177
|
rdoc_options: []
|
178
178
|
require_paths:
|