pdfmd 2.3.2 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/pdfmd +1 -1
  3. data/lib/pdfmd/pdfmdrename.rb +4 -3
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3c9d16341db6087343df79328c91ddfb757ffe0
4
- data.tar.gz: a6e47f3412ee4a345a2b300008ca9881b2c3df73
3
+ metadata.gz: 52f0d97e7f979d8d87623345e50f3b308f8cc1ed
4
+ data.tar.gz: c57f1bdde7359cc8205f49235082936f8b664381
5
5
  SHA512:
6
- metadata.gz: be404ede11ed6d4546b09722f60a4c9366204eb2cebbd600d12e518d7443dcb86ec7b69e7723e18ef49a508656553107125d725e29d318a7cfce9e4413e143c3
7
- data.tar.gz: d456c28bf731c8df878c5ba8811cf9567cf0a50e4a6abf1df8548de9760d3c5aa86027c44c64d432e41fd49e61b1e593f525d026d48185f08255a552f163e2b2
6
+ metadata.gz: 5195654b5d8d8dada2b6c695d479e7138fdedc5a026f245b6b96c1e29ac5b176521f18528ca70001dc2499941e451a859c7f6a293671bc99728c00bebe25117d
7
+ data.tar.gz: 2e8183af3cee48bc6213801530266ef8841d9ef85ef53515eb87ff8f5f94b0baab45a9981e6d742a2efec54e6ed56f9f7cc2871504a20b7c45d619407218c6ae
data/bin/pdfmd CHANGED
@@ -7,7 +7,7 @@ require "fileutils"
7
7
  require "i18n"
8
8
  require 'pathname'
9
9
 
10
- VERSION = '2.3.2'
10
+ VERSION = '2.3.3'
11
11
  NAME = 'pdfmd'
12
12
 
13
13
  #
@@ -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 = @@metadata['title'].downcase
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.2
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-01-26 00:00:00.000000000 Z
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-01-26 18:59:48'
175
- revision: '20160126185948'
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: