work_md 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/work_md/cli.rb +2 -1
- data/lib/work_md/commands/annotations.rb +22 -0
- data/lib/work_md/config.rb +0 -2
- data/lib/work_md/version.rb +1 -1
- data/lib/work_md.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a631cc3aa66ab964ad5814906ee0d749fe3d31d6
|
4
|
+
data.tar.gz: 02e5d25c8b0caf2a294002c57900f6828ce6e4fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c06bc312584d71d258347e0fcd7cd57d8ce86d524457da4ea2ead10e273e89e55200e6f7828128287af8fe0a50fe98e018dbe939fde26bf2952357aa1538b357
|
7
|
+
data.tar.gz: ffe349994074cfe42dffd4d33a833ef3006252ebc8a38f9e416eca61d181fa83dc1dc18a0cd6ab06842ba7669d6cb3b0f579dec967d19e23eeeb5800b41637d1
|
data/lib/work_md/cli.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module WorkMd
|
4
|
+
module Commands
|
5
|
+
class Annotations
|
6
|
+
class << self
|
7
|
+
def execute(_argv = [])
|
8
|
+
file_name = "annotations.md"
|
9
|
+
work_dir = WorkMd::Config.work_dir
|
10
|
+
|
11
|
+
::FileUtils.mkdir_p("#{work_dir}")
|
12
|
+
|
13
|
+
unless ::File.exist?("#{work_dir}/#{file_name}")
|
14
|
+
::File.open("#{work_dir}/#{file_name}", 'w+') { |f| f.puts("# \n\n") }
|
15
|
+
end
|
16
|
+
|
17
|
+
WorkMd::File.open_in_editor(file_names: [file_name])
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/work_md/config.rb
CHANGED
data/lib/work_md/version.rb
CHANGED
data/lib/work_md.rb
CHANGED
@@ -7,6 +7,7 @@ require_relative 'work_md/commands/today'
|
|
7
7
|
require_relative 'work_md/commands/config'
|
8
8
|
require_relative 'work_md/commands/yesterday'
|
9
9
|
require_relative 'work_md/commands/tyesterday'
|
10
|
+
require_relative 'work_md/commands/annotations'
|
10
11
|
require_relative 'work_md/parser/engine'
|
11
12
|
require_relative 'work_md/commands/parse'
|
12
13
|
require_relative 'work_md/cli'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: work_md
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique Fernandez Teixeira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-box
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- bin/work_md
|
52
52
|
- lib/work_md.rb
|
53
53
|
- lib/work_md/cli.rb
|
54
|
+
- lib/work_md/commands/annotations.rb
|
54
55
|
- lib/work_md/commands/config.rb
|
55
56
|
- lib/work_md/commands/parse.rb
|
56
57
|
- lib/work_md/commands/today.rb
|