pdfmd 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/pdfmd/rename.rb +8 -2
- data/pdfmd.gemspec +15 -18
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 553f3eff11cc2292beaccc52470f9cc22f7a2a6c
|
4
|
+
data.tar.gz: fc0a114519fc15e859c3f5eaa1321fa198f0afdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d44d0d86b428268f2fb1c9f46d0423715fa31b8caa47aa1db2a26665f8b641aae468c06251efe05cdb5499643e2cef210b89157c95fac3d9ea8b5ab44eb12d
|
7
|
+
data.tar.gz: 344df1960429d50f417495fe51a7831056d2bdc11307e045bc988889ebe72d0cb200fae0ed0a7f86cad987f477d99ac4d908ac876e3fbaf33334877405c53e93
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# Version 1.4.3
|
2
|
+
- Bugfix: Commata in author field showed up in the filename after renaming.
|
3
|
+
|
4
|
+
# Version 1.4.2
|
5
|
+
- Only changed the Date of the Gem
|
6
|
+
|
1
7
|
# Version 1.4.1
|
2
8
|
- Bugfix: When in interactive sorting, choosing the default and 'y' did not have the same effect.
|
3
9
|
- Renamed paramter '--:all-keywords' to '--allkeywords' (rename method).
|
data/lib/pdfmd/rename.rb
CHANGED
@@ -24,14 +24,14 @@ metadata = readMetadata(filename).each do |key,value|
|
|
24
24
|
end
|
25
25
|
|
26
26
|
date = metadata['createdate'].gsub(/\ \d{2}\:\d{2}\:\d{2}.*$/,'').gsub(/\:/,'')
|
27
|
-
author = metadata['author'].gsub(/\./,'_').gsub(/\-/,'').gsub(/\s/,'_')
|
27
|
+
author = metadata['author'].gsub(/\./,'_').gsub(/\-/,'').gsub(/\s/,'_').gsub(/\,/,'_').gsub(/\_\_/,'_')
|
28
28
|
I18n.enforce_available_locales = false
|
29
29
|
author = I18n.transliterate(author) # Normalising
|
30
30
|
|
31
31
|
keywords_preface = ''
|
32
32
|
# This statement can probably be optimised
|
33
33
|
case metadata['title']
|
34
|
-
when /(Tilbudt|Angebot)/i
|
34
|
+
when /(Tilbudt|Angebot|Offer)/i
|
35
35
|
doktype = 'til'
|
36
36
|
keywords_preface = setKeywordsPreface(metadata,doktype.gsub(/\-/,''))
|
37
37
|
when /Orderbekrefelse/i
|
@@ -40,6 +40,12 @@ when /Orderbekrefelse/i
|
|
40
40
|
when /faktura/i
|
41
41
|
doktype = 'fak'
|
42
42
|
keywords_preface = setKeywordsPreface(metadata,doktype.gsub(/\-/,''))
|
43
|
+
when /invoice/i
|
44
|
+
doktype = 'inv'
|
45
|
+
keywords_preface = setKeywordsPreface(metadata,doktype.gsub(/\-/,''))
|
46
|
+
when /rechnung/i
|
47
|
+
doktype = 'rec'
|
48
|
+
keywords_preface = setKeywordsPreface(metadata,doktype.gsub(/\-/,''))
|
43
49
|
when /order/i
|
44
50
|
doktype = 'ord'
|
45
51
|
keywords_preface = setKeywordsPreface(metadata,doktype.gsub(/\-/,''))
|
data/pdfmd.gemspec
CHANGED
@@ -1,25 +1,22 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
|
-
s.name
|
3
|
-
s.version
|
4
|
-
s.date
|
5
|
-
s.summary
|
6
|
-
s.description
|
2
|
+
s.name = 'pdfmd'
|
3
|
+
s.version = '1.4.3'
|
4
|
+
s.date = Time.now.strftime("%Y-%m-%d").to_s
|
5
|
+
s.summary = "pdfmd - pdf-meta-data management"
|
6
|
+
s.description = <<-EOF
|
7
7
|
Managing the common pdf metadata values and renaming the pdf file accordingly.
|
8
8
|
Sets common tags like 'author', 'createdate', 'title', 'subject' and 'keywords'
|
9
|
-
and re-uses them for renaming the file with to
|
9
|
+
and re-uses them for renaming the file with to a human-readable identifier.
|
10
10
|
EOF
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
s.
|
19
|
-
|
20
|
-
s.homepage =
|
21
|
-
'https://github.com/Micronarrativ/ruby-pmd'
|
22
|
-
s.license = 'MIT'
|
11
|
+
s.post_install_message = 'Run `pdfmd` to see the command help.'
|
12
|
+
s.authors = ['Daniel Roos']
|
13
|
+
s.email = 'pdfmd@micronarrativ.org'
|
14
|
+
s.require_paths = ['lib']
|
15
|
+
s.requirements << '[exiftools](http://www.sno.phy.queensu.ca/~phil/exiftool/)'
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.executable = 'pdfmd'
|
18
|
+
s.homepage = 'https://github.com/Micronarrativ/ruby-pmd'
|
19
|
+
s.license = 'MIT'
|
23
20
|
s.add_dependency "thor", '0.19.1'
|
24
21
|
s.add_dependency 'highline', '1.7.1'
|
25
22
|
s.add_dependency 'fileutils', '0.7'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdfmd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Roos
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
description: |2
|
70
70
|
Managing the common pdf metadata values and renaming the pdf file accordingly.
|
71
71
|
Sets common tags like 'author', 'createdate', 'title', 'subject' and 'keywords'
|
72
|
-
and re-uses them for renaming the file with to
|
72
|
+
and re-uses them for renaming the file with to a human-readable identifier.
|
73
73
|
email: pdfmd@micronarrativ.org
|
74
74
|
executables:
|
75
75
|
- pdfmd
|
@@ -100,7 +100,7 @@ homepage: https://github.com/Micronarrativ/ruby-pmd
|
|
100
100
|
licenses:
|
101
101
|
- MIT
|
102
102
|
metadata: {}
|
103
|
-
post_install_message:
|
103
|
+
post_install_message: Run `pdfmd` to see the command help.
|
104
104
|
rdoc_options: []
|
105
105
|
require_paths:
|
106
106
|
- lib
|
@@ -114,9 +114,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
|
-
requirements:
|
117
|
+
requirements:
|
118
|
+
- "[exiftools](http://www.sno.phy.queensu.ca/~phil/exiftool/)"
|
118
119
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.0.6
|
120
121
|
signing_key:
|
121
122
|
specification_version: 4
|
122
123
|
summary: pdfmd - pdf-meta-data management
|