pcb-init 0.1.0 → 0.1.3
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/README.md +1 -2
- data/lib/pcb_init.rb +14 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c5ccae2f003fde78d33f81753995131253461eb6d80392ffc27f55e6ceae0ba2
|
|
4
|
+
data.tar.gz: 4e750f008c59a7b463566c9f3bb3aaad81717df09811e2445c761068e65ccd1e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c1fcab63d5e75d86e7095a5f8b62607b1983712e9d90238dbf1b24f794cf4de7b655cfb04164e6fd467583316f163b3df4be50e014f59e6de2012f94ed6b9016
|
|
7
|
+
data.tar.gz: 01472e392507d11f86578fcb42aed5c191667696ecdd9494f5dd6d10d9c95b14da7ca20d0c5677456889d4a463d074a7bfa91d5312e611e70b0319258c25c482
|
data/README.md
CHANGED
data/lib/pcb_init.rb
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
require 'fileutils'
|
|
2
2
|
|
|
3
3
|
class PcbInit
|
|
4
|
+
VERSION = '0.1.3'
|
|
5
|
+
|
|
4
6
|
def self.run(argv)
|
|
5
7
|
new.run(argv)
|
|
6
8
|
end
|
|
7
9
|
|
|
8
10
|
def run(argv)
|
|
11
|
+
if argv.include?('--version') || argv.include?('-v')
|
|
12
|
+
show_version
|
|
13
|
+
return
|
|
14
|
+
end
|
|
15
|
+
|
|
9
16
|
if argv.empty? || argv.include?('--help') || argv.include?('-h')
|
|
10
17
|
show_help
|
|
11
18
|
return
|
|
@@ -26,6 +33,10 @@ class PcbInit
|
|
|
26
33
|
|
|
27
34
|
private
|
|
28
35
|
|
|
36
|
+
def show_version
|
|
37
|
+
puts "pcb-init #{VERSION}"
|
|
38
|
+
end
|
|
39
|
+
|
|
29
40
|
def show_help
|
|
30
41
|
puts <<~HELP
|
|
31
42
|
pcb-init - Scaffold a best-practice KiCad PCB project structure
|
|
@@ -34,7 +45,8 @@ class PcbInit
|
|
|
34
45
|
pcb-init PROJECT_NAME
|
|
35
46
|
|
|
36
47
|
Options:
|
|
37
|
-
-h, --help
|
|
48
|
+
-h, --help Show this help message
|
|
49
|
+
-v, --version Show version number
|
|
38
50
|
|
|
39
51
|
Example:
|
|
40
52
|
pcb-init my-awesome-board
|
|
@@ -45,6 +57,7 @@ class PcbInit
|
|
|
45
57
|
directories = [
|
|
46
58
|
"#{project_name}/docs",
|
|
47
59
|
"#{project_name}/schematic",
|
|
60
|
+
"#{project_name}/kicad_project",
|
|
48
61
|
"#{project_name}/pcb",
|
|
49
62
|
"#{project_name}/libraries/symbols",
|
|
50
63
|
"#{project_name}/libraries/footprints",
|