pdfdprint 0.1.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02732c9d3fcb3874766634528963c1e7a9e3b2ce3b880c20e5fc3f2be985168d
4
- data.tar.gz: bcb6dbb350d408bb20b3b8d2336040589f40fe0bcd4338193dcc7524c8545189
3
+ metadata.gz: 81549b18e48635f436ba4688f324e09944ab0f0672f403127e1352923a427a7f
4
+ data.tar.gz: b2843aaa18c174a1ccec846b2a3a4bab65716255280ca238ae6aaa9e0af202b4
5
5
  SHA512:
6
- metadata.gz: 6387bde2a26cf9a9f7c55fc1a7e9e9e5fa5e77264c44eef0e3449976a83a28496c0c7aa8c820ceda3eaaabac45cf05f97485e56c3afad1e89dad5fae645e3633
7
- data.tar.gz: 5500b9c9511e2e2b5a63a150590c21ca72d924c8348ad6cd577eac06db80b9ec825e55a7adbbee0cb841ab77239fa136d167072cfe8738469f9c907eaca146cf
6
+ metadata.gz: d80f5958c8b4e9b7218dde719da0c5cf452c0e09ab34557e01aaced292e46abb85fbe276deb5bc655848b5b0c83d7e3124140f68a161c94696861b6a22b8b264
7
+ data.tar.gz: 8b5da537a598b1aed588c9b97661498b3032d54a94f9e51b40a98cbca361d7315752dc9fa2420be2386bdb5a3b1a1aeb7dd5b45d44b25b2b449fe79b85a9339a
data/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ 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.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
+
8
18
  ## [0.1.3] - 2022-05-20
9
19
 
10
20
  ### Changed
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  require 'pdfdprint'
4
4
 
5
- puts "\n### PDF Direct Print Copyright (c) 2019-2022 towards GmbH - v#{PDFDirectPrint::VERSION} ###\n\n"
5
+ puts "\n### PDF Direct Print Copyright (c) 2019-#{Time.now.year} towards GmbH - v#{PDFDirectPrint::VERSION} ###\n\n"
6
6
 
7
7
  PDFDirectPrint.run
@@ -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 1
73
+ sleep options[:wait]
66
74
  end
67
75
  end
68
76
 
@@ -1,3 +1,3 @@
1
1
  module PDFDirectPrint
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
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.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-20 00:00:00.000000000 Z
11
+ date: 2024-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -90,14 +90,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
90
  requirements:
91
91
  - - ">="
92
92
  - !ruby/object:Gem::Version
93
- version: '2.6'
93
+ version: '3.1'
94
94
  required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.3.7
100
+ rubygems_version: 3.5.11
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Print PDF document directly to network-enabled printer