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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b324912bdc2b9d7db489110bdc56623c26de285
4
- data.tar.gz: cda8ba5718f0420da7593340f67213570672c18c
3
+ metadata.gz: a631cc3aa66ab964ad5814906ee0d749fe3d31d6
4
+ data.tar.gz: 02e5d25c8b0caf2a294002c57900f6828ce6e4fb
5
5
  SHA512:
6
- metadata.gz: f96829690a7ff140f4fafdf7545944fff09fc9459c41119b13f3c965491a2d7dab6a39b9dba64acce475596b498e7c4957e31b4349aa59a80081ee197404a425
7
- data.tar.gz: 161880115ce5a27df36dfa390e0fd08a0597ea0efd72d1ce4ad26008a3463058d2adcb6141059e0a30ae22dac5ec02d2b372d67eb6db46d8e6a4c7f3425947f0
6
+ metadata.gz: c06bc312584d71d258347e0fcd7cd57d8ce86d524457da4ea2ead10e273e89e55200e6f7828128287af8fe0a50fe98e018dbe939fde26bf2952357aa1538b357
7
+ data.tar.gz: ffe349994074cfe42dffd4d33a833ef3006252ebc8a38f9e416eca61d181fa83dc1dc18a0cd6ab06842ba7669d6cb3b0f579dec967d19e23eeeb5800b41637d1
data/lib/work_md/cli.rb CHANGED
@@ -10,7 +10,8 @@ module WorkMd
10
10
  'ty' => 'tyesterday',
11
11
  'y' => 'yesterday',
12
12
  'c' => 'config',
13
- 'p' => 'parse'
13
+ 'p' => 'parse',
14
+ 'a' => 'annotations'
14
15
  }.freeze
15
16
 
16
17
  def self.execute(argv)
@@ -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
@@ -29,7 +29,6 @@ module WorkMd
29
29
  per_day: 'per day',
30
30
  total: 'all',
31
31
  days_bars: 'Summary'
32
-
33
32
  },
34
33
  'es' =>
35
34
  {
@@ -43,7 +42,6 @@ module WorkMd
43
42
  total: 'total',
44
43
  days_bars: 'Abstracto'
45
44
  }
46
-
47
45
  }.freeze
48
46
 
49
47
  def self.title
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WorkMd
4
- VERSION = '0.3.3'
4
+ VERSION = '0.3.4'
5
5
  end
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.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-01 00:00:00.000000000 Z
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