howzit 1.2.16 → 1.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/CHANGELOG.md +9 -0
- data/bin/howzit +8 -8
- data/lib/howzit/buildnote.rb +2 -2
- data/lib/howzit/prompt.rb +1 -1
- data/lib/howzit/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: f1d8a45dca4630f76f10fd6f410c63fd4e1685844ca895231d9910717ca97d9b
|
4
|
+
data.tar.gz: 27476b1f987f6f1555e81f14270e923867d75519f5c25d3241a104ec861ddbe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3105ab63cc58b59f488f10a9717b457892b83b10760a303364bd9d790d7bb3630d30663ad6232979ce8dbab361c4ba67ee837009cc2f53c12c6bbb2035b8eca
|
7
|
+
data.tar.gz: 661c54c86f55cbe939001b30848c3c35e7779571bb9a5797af96c107db761322cd37f11c2bf4d0e2b61d65173c9855735296fe46f029283845fd5a1c19f61103
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/bin/howzit
CHANGED
@@ -126,7 +126,7 @@ OptionParser.new do |opts|
|
|
126
126
|
Process.exit 0
|
127
127
|
end
|
128
128
|
|
129
|
-
opts.on('--edit-config',
|
129
|
+
opts.on('--edit-config', 'Edit configuration file using default $EDITOR') do
|
130
130
|
Howzit.config.editor
|
131
131
|
Process.exit 0
|
132
132
|
end
|
@@ -141,20 +141,20 @@ OptionParser.new do |opts|
|
|
141
141
|
Dir.glob('*.md').each do |file|
|
142
142
|
template = File.basename(file, '.md')
|
143
143
|
puts Howzit::Color.template("{Mk}template:{Yk}#{template}{x}")
|
144
|
-
puts Howzit::Color.template(
|
144
|
+
puts Howzit::Color.template('{bk}[{bl}tasks{bk}]──────────────────────────────────────┐{x}')
|
145
145
|
metadata = file.extract_metadata
|
146
146
|
topics = Howzit.buildnote.read_file(file)
|
147
147
|
topics.each do |topic|
|
148
148
|
puts Howzit::Color.template(" {bk}│{bw}-{x} {bcK}#{template}:#{topic.title.sub(/^.*?:/, '')}{x}")
|
149
149
|
end
|
150
|
-
|
150
|
+
unless metadata.empty?
|
151
151
|
meta = []
|
152
|
-
meta << metadata['required'].split(/\s*,\s*/).map {|m| "*{bw}#{m}{xw}" } if metadata.key?('required')
|
153
|
-
meta << metadata['optional'].split(/\s*,\s*/).map
|
154
|
-
puts Howzit::Color.template(
|
155
|
-
puts Howzit::Color.template(" {bk}│ {xw}#{meta.join(
|
152
|
+
meta << metadata['required'].split(/\s*,\s*/).map { |m| "*{bw}#{m}{xw}" } if metadata.key?('required')
|
153
|
+
meta << metadata['optional'].split(/\s*,\s*/).map(&:to_s) if metadata.key?('optional')
|
154
|
+
puts Howzit::Color.template('{bk}[{bl}meta{bk}]───────────────────────────────────────┤{x}')
|
155
|
+
puts Howzit::Color.template(" {bk}│ {xw}#{meta.join(', ')}{x}")
|
156
156
|
end
|
157
|
-
puts Howzit::Color.template(
|
157
|
+
puts Howzit::Color.template(' {bk}└───────────────────────────────────────────┘{x}')
|
158
158
|
end
|
159
159
|
Process.exit 0
|
160
160
|
end
|
data/lib/howzit/buildnote.rb
CHANGED
@@ -9,7 +9,7 @@ module Howzit
|
|
9
9
|
|
10
10
|
def initialize(file: nil, args: [])
|
11
11
|
@topics = []
|
12
|
-
@metadata =
|
12
|
+
@metadata = IO.read(note_file).split(/^#/)[0].strip.get_metadata
|
13
13
|
|
14
14
|
read_help(file)
|
15
15
|
end
|
@@ -274,7 +274,6 @@ module Howzit
|
|
274
274
|
|
275
275
|
if leader.length > 0
|
276
276
|
data = leader.get_metadata
|
277
|
-
@metadata = @metadata.merge(data)
|
278
277
|
|
279
278
|
if data.key?('template')
|
280
279
|
templates = data['template'].strip.split(/\s*,\s*/)
|
@@ -380,6 +379,7 @@ module Howzit
|
|
380
379
|
title = "#{short_path}:#{title}"
|
381
380
|
end
|
382
381
|
topic = Topic.new(title, prefix + lines.join("\n").strip.render_template(@metadata))
|
382
|
+
|
383
383
|
topics.push(topic)
|
384
384
|
end
|
385
385
|
|
data/lib/howzit/prompt.rb
CHANGED
data/lib/howzit/version.rb
CHANGED