pdfdprint 0.1.2 → 0.1.4
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/CHANGELOG.md +20 -3
- data/README.md +1 -0
- data/exe/pdfdprint +1 -1
- data/lib/pdfdprint/command_line.rb +10 -2
- data/lib/pdfdprint/version.rb +1 -1
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81549b18e48635f436ba4688f324e09944ab0f0672f403127e1352923a427a7f
|
4
|
+
data.tar.gz: b2843aaa18c174a1ccec846b2a3a4bab65716255280ca238ae6aaa9e0af202b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d80f5958c8b4e9b7218dde719da0c5cf452c0e09ab34557e01aaced292e46abb85fbe276deb5bc655848b5b0c83d7e3124140f68a161c94696861b6a22b8b264
|
7
|
+
data.tar.gz: 8b5da537a598b1aed588c9b97661498b3032d54a94f9e51b40a98cbca361d7315752dc9fa2420be2386bdb5a3b1a1aeb7dd5b45d44b25b2b449fe79b85a9339a
|
data/CHANGELOG.md
CHANGED
@@ -5,14 +5,31 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
## 0.1.
|
8
|
+
## [0.1.4] - 2024-08-17
|
9
|
+
|
10
|
+
### Added
|
11
|
+
|
12
|
+
- Wait parameter to customise wait time in seconds between multiple files to be printed
|
13
|
+
|
14
|
+
### Changed
|
15
|
+
|
16
|
+
- Update all dependencies
|
17
|
+
|
18
|
+
## [0.1.3] - 2022-05-20
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
|
22
|
+
- Update all dependencies
|
23
|
+
- Adapt rubocop configuration
|
24
|
+
|
25
|
+
## [0.1.2] - 2020-03-06
|
9
26
|
|
10
27
|
### Changed
|
11
28
|
|
12
29
|
- Version dependency of rake and rubocop
|
13
30
|
- Rubocop configuration to enable new cops of major release
|
14
31
|
|
15
|
-
## 0.1.1 - 2019-09-08
|
32
|
+
## [0.1.1] - 2019-09-08
|
16
33
|
|
17
34
|
### Added
|
18
35
|
|
@@ -23,7 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
23
40
|
|
24
41
|
- Corrected minor typo in README
|
25
42
|
|
26
|
-
## 0.1.0 - 2019-09-07
|
43
|
+
## [0.1.0] - 2019-09-07
|
27
44
|
|
28
45
|
### Added
|
29
46
|
|
data/README.md
CHANGED
@@ -24,6 +24,7 @@ Usage: pdfprint [options] [filename|directory]
|
|
24
24
|
-p, --printer=PRINTER Printer hostname or IP address
|
25
25
|
-r, --resolution=RESOLUTION Print resolution in dpi (default: 300)
|
26
26
|
-t, --tray=TRAY Paper tray number (default: 0)
|
27
|
+
-w, --wait=TIME Wait time in seconds between files to be printed (default: 1)
|
27
28
|
```
|
28
29
|
|
29
30
|
## Examples
|
data/exe/pdfdprint
CHANGED
@@ -6,7 +6,7 @@ module PDFDirectPrint
|
|
6
6
|
attr_reader :options
|
7
7
|
|
8
8
|
def initialize
|
9
|
-
@options = { format: 'A4', port: 9100, resolution: 300, tray: 0 }
|
9
|
+
@options = { format: 'A4', port: 9100, resolution: 300, tray: 0, wait: 1 }
|
10
10
|
end
|
11
11
|
|
12
12
|
def parse_options
|
@@ -30,6 +30,9 @@ module PDFDirectPrint
|
|
30
30
|
opts.on('-t', '--tray=TRAY', 'Paper tray number (default: 0)') do |tray|
|
31
31
|
options[:tray] = tray
|
32
32
|
end
|
33
|
+
opts.on('-w', '--wait=TIME', 'Wait time in seconds between files to be printed (default: 1)', Integer) do |wait|
|
34
|
+
options[:wait] = wait
|
35
|
+
end
|
33
36
|
end.parse!
|
34
37
|
end
|
35
38
|
|
@@ -44,6 +47,11 @@ module PDFDirectPrint
|
|
44
47
|
puts 'Please specify a directory or PDF file'
|
45
48
|
exit 1
|
46
49
|
end
|
50
|
+
unless options[:wait].between?(1, 60)
|
51
|
+
puts 'Please specify a wait time between 1 and 60 seconds'
|
52
|
+
exit 1
|
53
|
+
end
|
54
|
+
|
47
55
|
return if File.exist?(ARGV[0])
|
48
56
|
|
49
57
|
puts "[ERROR]: File or directory #{ARGV[0]} does not exist"
|
@@ -62,7 +70,7 @@ module PDFDirectPrint
|
|
62
70
|
else
|
63
71
|
puts "[ERROR]: Failed to print due to #{raw_printer.error_message}"
|
64
72
|
end
|
65
|
-
sleep
|
73
|
+
sleep options[:wait]
|
66
74
|
end
|
67
75
|
end
|
68
76
|
|
data/lib/pdfdprint/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdfdprint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Marc
|
8
|
-
autorequire:
|
7
|
+
- Marc
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '1.29'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '1.29'
|
55
55
|
description: Use raw printing functionality of network-enabled printer to print PDF
|
56
56
|
files on port 9100/tcp.
|
57
57
|
email:
|
@@ -80,8 +80,9 @@ metadata:
|
|
80
80
|
changelog_uri: https://github.com/towards/pdfdprint/blob/master/CHANGELOG.md
|
81
81
|
documentation_uri: https://www.rubydoc.info/gems/pdfdprint
|
82
82
|
homepage_uri: https://towards.ch
|
83
|
+
rubygems_mfa_required: 'true'
|
83
84
|
source_code_uri: https://github.com/towards/pdfdprint
|
84
|
-
post_install_message:
|
85
|
+
post_install_message:
|
85
86
|
rdoc_options: []
|
86
87
|
require_paths:
|
87
88
|
- lib
|
@@ -89,15 +90,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
90
|
requirements:
|
90
91
|
- - ">="
|
91
92
|
- !ruby/object:Gem::Version
|
92
|
-
version: '
|
93
|
+
version: '3.1'
|
93
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
95
|
requirements:
|
95
96
|
- - ">="
|
96
97
|
- !ruby/object:Gem::Version
|
97
98
|
version: '0'
|
98
99
|
requirements: []
|
99
|
-
rubygems_version: 3.
|
100
|
-
signing_key:
|
100
|
+
rubygems_version: 3.5.11
|
101
|
+
signing_key:
|
101
102
|
specification_version: 4
|
102
103
|
summary: Print PDF document directly to network-enabled printer
|
103
104
|
test_files: []
|