podpisy 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 +4 -4
- data/lib/podpisy/cli.rb +9 -0
- data/lib/podpisy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22199c08586f0ff00fe3f13781bf50a1a7841cc6
|
4
|
+
data.tar.gz: 38ab44c988a6c804a9ddd3de6e1088ad15874782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 270ca0731da5b2ba150d9014eb743173d34cc051ea866ba649880afc079df6f0f520c064cefd7928b06118ff32843754f1ab2a9b266e3891e5408b33af933463
|
7
|
+
data.tar.gz: 83ee9f8ae471713e0494b00cc83b66eec7a9efcff1bc01ce2585fff13730079e17fb6cb875227c4cdb460c05793150269ff1741851a19bf9c74e5de456de28df
|
data/lib/podpisy/cli.rb
CHANGED
@@ -1,13 +1,22 @@
|
|
1
1
|
require 'clamp'
|
2
|
+
require 'fileutils'
|
2
3
|
|
3
4
|
module Podpisy
|
4
5
|
class CLI < Clamp::Command
|
6
|
+
option ['-g', '--generate'], :flag, 'generate new signatures directory'
|
5
7
|
option ['-a', '--areas'], :flag, 'convert postcode to aree in CSV'
|
6
8
|
option ['-c', '--csv'], 'CSV', 'output to CSV file'
|
7
9
|
option ['-t', '--tex'], 'TEX', 'output to TEX file'
|
8
10
|
parameter 'file', 'csv file with signatures', attribute_name: :file
|
9
11
|
|
10
12
|
def execute
|
13
|
+
if generate?
|
14
|
+
src = File.expand_path("../../../share/szablon", __FILE__)
|
15
|
+
FileUtils.copy_entry src, file
|
16
|
+
return
|
17
|
+
end
|
18
|
+
|
19
|
+
|
11
20
|
sigs = Signatures.new(file, areas: areas?)
|
12
21
|
if csv
|
13
22
|
open(csv, 'wb') do |out|
|
data/lib/podpisy/version.rb
CHANGED