jocasta 0.0.1 → 0.1.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/bin/jocasta +4 -5
- 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: bd483e1dc5fd3b7bffa48cc43a16635e50e4f60ca435de4490fea3210884ffe5
|
|
4
|
+
data.tar.gz: db01ecf68e3198cdf4d65904e316d1abdf205893f5984a3f56a444ed2568a3e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78ff9eba9b090fae61642f45f4f8173f8595604561f9de2e8e5b03f80a50ed15151bfccc351eaba1dec33b8a5f37c99d0677aea7e705001f6d5a760d3ac07681
|
|
7
|
+
data.tar.gz: 126ec33700c738cb421278759c18f75aace04753c7e6e75f433e35170a640978759117aeab44f4db8730f3a1324f19e998069853bcdf6c2ddb9213bef0858eb8
|
data/bin/jocasta
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
require 'json'
|
|
5
5
|
|
|
6
|
-
# This script is based on a script by ReSwift that can be found at
|
|
7
|
-
# https://github.com/ReSwift/ReSwift/blob/master/.scripts/doc-preprocessor
|
|
8
|
-
|
|
9
6
|
def parse_options(paired_args)
|
|
10
7
|
options = { args: [] }
|
|
11
8
|
index = 0
|
|
@@ -56,7 +53,8 @@ def get_section(content, level, section)
|
|
|
56
53
|
end
|
|
57
54
|
|
|
58
55
|
paired_args = {
|
|
59
|
-
'--title' => :title
|
|
56
|
+
'--title' => :title,
|
|
57
|
+
'--out_level' => :out_level
|
|
60
58
|
}
|
|
61
59
|
options = parse_options paired_args
|
|
62
60
|
|
|
@@ -77,7 +75,8 @@ unless result
|
|
|
77
75
|
end
|
|
78
76
|
|
|
79
77
|
level_hash = ''
|
|
80
|
-
|
|
78
|
+
out_level = options[:out_level].to_i || level
|
|
79
|
+
(1..out_level).each do
|
|
81
80
|
level_hash += '#'
|
|
82
81
|
end
|
|
83
82
|
result = if options[:title]
|