pdfh 3.1.0 → 3.3.0
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 +4 -4
- data/.gitignore +0 -1
- data/.pre-commit-config.yaml +36 -0
- data/.rubocop.yml +4 -3
- data/.rubocop_todo.yml +15 -36
- data/Gemfile.lock +81 -61
- data/README.md +56 -18
- data/bin/run +3 -1
- data/exe/pdfh +2 -16
- data/lib/pdfh/concerns/password_decodable.rb +31 -0
- data/lib/pdfh/main.rb +66 -16
- data/lib/pdfh/models/document.rb +12 -16
- data/lib/pdfh/models/document_sub_type.rb +1 -1
- data/lib/pdfh/models/document_type.rb +46 -28
- data/lib/pdfh/models/settings.rb +28 -4
- data/lib/pdfh/models/zip_types.rb +17 -0
- data/lib/pdfh/utils/console.rb +8 -0
- data/lib/pdfh/utils/dependency_validator.rb +35 -0
- data/lib/pdfh/utils/opt_parser.rb +61 -46
- data/lib/pdfh/utils/pdf_file_handler.rb +2 -1
- data/lib/pdfh/utils/settings_builder.rb +8 -3
- data/lib/pdfh/version.rb +1 -1
- data/lib/pdfh.rb +9 -1
- data/mise.toml +2 -0
- metadata +8 -7
- data/.tool-versions +0 -1
data/lib/pdfh.rb
CHANGED
@@ -9,15 +9,20 @@ require "yaml"
|
|
9
9
|
|
10
10
|
require_relative "ext/string"
|
11
11
|
|
12
|
+
# Concerns
|
13
|
+
require_relative "pdfh/concerns/password_decodable"
|
14
|
+
|
12
15
|
# Models
|
13
16
|
require_relative "pdfh/models/document"
|
14
17
|
require_relative "pdfh/models/document_period"
|
15
18
|
require_relative "pdfh/models/document_sub_type"
|
16
19
|
require_relative "pdfh/models/document_type"
|
17
20
|
require_relative "pdfh/models/settings"
|
21
|
+
require_relative "pdfh/models/zip_types"
|
18
22
|
|
19
23
|
# Utils
|
20
24
|
require_relative "pdfh/utils/console"
|
25
|
+
require_relative "pdfh/utils/dependency_validator"
|
21
26
|
require_relative "pdfh/utils/month"
|
22
27
|
require_relative "pdfh/utils/opt_parser"
|
23
28
|
require_relative "pdfh/utils/options"
|
@@ -31,6 +36,8 @@ require_relative "pdfh/version"
|
|
31
36
|
|
32
37
|
# Gem entry point
|
33
38
|
module Pdfh
|
39
|
+
REQUIRED_CMDS = %i[qpdf pdftotext].freeze
|
40
|
+
|
34
41
|
# Settings not found
|
35
42
|
class SettingsIOError < StandardError; end
|
36
43
|
|
@@ -45,6 +52,7 @@ module Pdfh
|
|
45
52
|
class << self
|
46
53
|
extend Forwardable
|
47
54
|
def_delegators :@options, :verbose?, :dry?, :file_mode?
|
48
|
-
def_delegators :@console, :ident_print, :warn_print, :error_print, :headline, :debug, :info,
|
55
|
+
def_delegators :@console, :ident_print, :warn_print, :error_print, :backtrace_print, :headline, :debug, :info,
|
56
|
+
:print_options
|
49
57
|
end
|
50
58
|
end
|
data/mise.toml
ADDED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdfh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaias Piña
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: colorize
|
@@ -34,10 +33,10 @@ extensions: []
|
|
34
33
|
extra_rdoc_files: []
|
35
34
|
files:
|
36
35
|
- ".gitignore"
|
36
|
+
- ".pre-commit-config.yaml"
|
37
37
|
- ".rspec"
|
38
38
|
- ".rubocop.yml"
|
39
39
|
- ".rubocop_todo.yml"
|
40
|
-
- ".tool-versions"
|
41
40
|
- CHANGELOG.md
|
42
41
|
- CODE_OF_CONDUCT.md
|
43
42
|
- Gemfile
|
@@ -52,14 +51,17 @@ files:
|
|
52
51
|
- exe/pdfh
|
53
52
|
- lib/ext/string.rb
|
54
53
|
- lib/pdfh.rb
|
54
|
+
- lib/pdfh/concerns/password_decodable.rb
|
55
55
|
- lib/pdfh/main.rb
|
56
56
|
- lib/pdfh/models/document.rb
|
57
57
|
- lib/pdfh/models/document_period.rb
|
58
58
|
- lib/pdfh/models/document_sub_type.rb
|
59
59
|
- lib/pdfh/models/document_type.rb
|
60
60
|
- lib/pdfh/models/settings.rb
|
61
|
+
- lib/pdfh/models/zip_types.rb
|
61
62
|
- lib/pdfh/settings_template.rb
|
62
63
|
- lib/pdfh/utils/console.rb
|
64
|
+
- lib/pdfh/utils/dependency_validator.rb
|
63
65
|
- lib/pdfh/utils/month.rb
|
64
66
|
- lib/pdfh/utils/opt_parser.rb
|
65
67
|
- lib/pdfh/utils/options.rb
|
@@ -67,6 +69,7 @@ files:
|
|
67
69
|
- lib/pdfh/utils/rename_validator.rb
|
68
70
|
- lib/pdfh/utils/settings_builder.rb
|
69
71
|
- lib/pdfh/version.rb
|
72
|
+
- mise.toml
|
70
73
|
- pdfh.gemspec
|
71
74
|
homepage: https://github.com/iax7/pdfh
|
72
75
|
licenses:
|
@@ -77,7 +80,6 @@ metadata:
|
|
77
80
|
source_code_uri: https://github.com/iax7/pdfh
|
78
81
|
changelog_uri: https://github.com/blob/master/CHANGELOG.md
|
79
82
|
rubygems_mfa_required: 'true'
|
80
|
-
post_install_message:
|
81
83
|
rdoc_options: []
|
82
84
|
require_paths:
|
83
85
|
- lib
|
@@ -92,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
94
|
- !ruby/object:Gem::Version
|
93
95
|
version: '0'
|
94
96
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
96
|
-
signing_key:
|
97
|
+
rubygems_version: 3.6.8
|
97
98
|
specification_version: 4
|
98
99
|
summary: Organize PDF files
|
99
100
|
test_files: []
|
data/.tool-versions
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby 3.3.0
|