one_pager 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.one-pager/config.json +2 -1
- data/Gemfile.lock +1 -1
- data/bin/one_pager +6 -3
- data/lib/one_pager/version.rb +1 -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: 8db36ce25c952e2fec9be88a3ba3dff907fbf78e57246a389c15a04a0cff957c
|
4
|
+
data.tar.gz: 1f1a1d139b7b48f0242db3b51664df6cf4fcbdf0228bb265fbe574deb20257bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3954991149ba21e94d0a46247c2a87dab9c7eb8d59ed1341274a088364e673ec16cdd22bee419f0635938852cc90bff4b7152e341ccc2c839bd19c825572c3b7
|
7
|
+
data.tar.gz: 8b59716c9a3bf35d673aa35888bbbebeb6788ab1c4e505f7b7c2c4f5b74794c8a4eb30c9efe4be893a579e451129fafd5b2be30c2dbcbfaa47802b1b01da38e9
|
data/.one-pager/config.json
CHANGED
data/Gemfile.lock
CHANGED
data/bin/one_pager
CHANGED
@@ -4,7 +4,8 @@ require 'one_pager'
|
|
4
4
|
|
5
5
|
DEFAULT_CONFIGURATION_TEMPLATE =<<-TEMPLATE
|
6
6
|
{
|
7
|
-
"template": "standard"
|
7
|
+
"template": "standard",
|
8
|
+
"timestamp_prefix": true
|
8
9
|
}
|
9
10
|
TEMPLATE
|
10
11
|
|
@@ -54,9 +55,11 @@ class App
|
|
54
55
|
c.flag [:op, :output_path]
|
55
56
|
|
56
57
|
c.action do |global_options,options,args|
|
57
|
-
|
58
|
+
configuration = JSON.parse(File.read(".one-pager/config.json"))
|
59
|
+
prefix = configuration["timestamp_prefix"] ? "#{Time.now.to_i}_" : ""
|
60
|
+
filename = "#{prefix}#{args[0].downcase.gsub(" ", "_")}.md"
|
58
61
|
template = if File.exists?(".one-pager/config.json")
|
59
|
-
|
62
|
+
configuration["template"]
|
60
63
|
elsif options[:template]
|
61
64
|
options[:template]
|
62
65
|
else
|
data/lib/one_pager/version.rb
CHANGED