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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 798bed0d41462e97707960d925ec633109b5bb67
4
- data.tar.gz: f678724174da3a5a3b4baa98615efb5dde3395b8
3
+ metadata.gz: 553f3eff11cc2292beaccc52470f9cc22f7a2a6c
4
+ data.tar.gz: fc0a114519fc15e859c3f5eaa1321fa198f0afdf
5
5
  SHA512:
6
- metadata.gz: f4fde3094c09a5d5631b37beffbc16b4b3c731f16a58af86b3b1eeab992aa953dac3a74e71ab683dd1f6a3eb90bb0288ae6dd18798a7242a2263707b9640b769
7
- data.tar.gz: 3f30cd43417346980587346f5cde64537d45b9fe346c093568510e66414897221e57af7d936dadad41882c591910dc3ec4a2a4736de5e0931d6c1701e44bea8d
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 = 'pdfmd'
3
- s.version = '1.4.2'
4
- s.date = '2015-03-25'
5
- s.summary = "pdfmd - pdf-meta-data management"
6
- s.description = <<-EOF
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 an human-readable identifier.
9
+ and re-uses them for renaming the file with to a human-readable identifier.
10
10
  EOF
11
- s.authors = ['Daniel Roos']
12
- s.email = 'pdfmd@micronarrativ.org'
13
- s.require_paths = ['lib']
14
- s.files = `git ls-files`.split("\n")
15
- #s.files = ['lib/pdfmd.rb', 'lib/pdfmd/test.rb', 'lib/pdfmd/sort.rb']
16
- #s.files = Dir.glob("{bin,lib}/**/*") + %w(LICENSE README.md CHANGELOG.md)
17
- #s.executable = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
- s.executable = 'pdfmd'
19
- #s.platform = Gem::Platform.local
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.2
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 an human-readable identifier.
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.4.6
120
+ rubygems_version: 2.0.6
120
121
  signing_key:
121
122
  specification_version: 4
122
123
  summary: pdfmd - pdf-meta-data management