evertils 0.2.9 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 949afe8d09c701e278050a9b01a70ba8126357c9
4
- data.tar.gz: 30756cf65ccd654a7dd3c742b685b6513d9b6d0d
3
+ metadata.gz: 40ea220d69b7b5db784276e1f73c8f4b1a20c1d8
4
+ data.tar.gz: a6f7643cbfa69044f127df963c824c7f6c01bdc5
5
5
  SHA512:
6
- metadata.gz: 18b2aa16bd5473de272b6ac10daac74db7662f35afa472c611612eee3cc38398727c17542475fb0455f488374ad7628ef0532ea08741fdbdec1c2a1b76d70067
7
- data.tar.gz: a3e665e1c366f52d82fb5ed7fc6fe14707b9ebb67ad1cf2bf8d0f11a551e16f4115d3e7043a16eabb1fe8527c5bbe00b5129a36966cd95d79ee7870aff4318ea
6
+ metadata.gz: f2b0e059335d2c8290c9ee63cf823758fc8b307b9b6faf4b1d7a4b66f3e3b7240af0b7bf564543ca4751c43f5450f854a17a007a34142048ceccd0ec2f1a1fc9
7
+ data.tar.gz: c58541d8ea0879d621556d8e84c25b2f88c7b26c7dc5fcaf45163c07c60a39286ca249159e4618ee749b69a233425e9555c84b6f9501812ad9ff803d08c88785
@@ -0,0 +1,15 @@
1
+ <div><span style="font-size: 18px;">Logs</span></div>
2
+ <ul>
3
+ <li>...</li>
4
+ </ul>
5
+ <br />
6
+ <div><span style="font-size: 18px;">Tasks completed</span></div>
7
+ <ul>
8
+ <li>...</li>
9
+ </ul>
10
+ <br />
11
+ <div><span style="font-size: 18px;">EOD</span></div>
12
+ <ul>
13
+ <li><en-todo checked="false"/>Weekly timecard is up to date</li>
14
+ <li><en-todo checked="false"/>Tasks are filled out</li>
15
+ </ul>
@@ -9,4 +9,6 @@
9
9
  </ul>
10
10
  <br />
11
11
  <div><span style="font-size: 18px;">EOD</span></div>
12
- <div><en-todo checked="false"/>Ensure timecard is up to date</div>
12
+ <ul>
13
+ <li><en-todo checked="false"/>Timecard is up to date</li>
14
+ </ul>
@@ -53,7 +53,11 @@ module Evertils
53
53
  end
54
54
  end
55
55
 
56
- @model.create_note(title, body, parent_notebook)
56
+ note = @model.create_note(title, body, parent_notebook)
57
+
58
+ tag_manager = Evertils::Common::Manager::Tag.new
59
+ week_tag = tag_manager.find("week-#{DateTime.now.cweek + 1}")
60
+ note.tag(week_tag.prop(:name))
57
61
  end
58
62
 
59
63
  # generate monthly notes
@@ -62,7 +66,11 @@ module Evertils
62
66
  body = @format.template_contents
63
67
  parent_notebook = NOTEBOOK_MONTHLY
64
68
 
65
- @model.create_note(title, body, parent_notebook)
69
+ note = @model.create_note(title, body, parent_notebook)
70
+
71
+ tag_manager = Evertils::Common::Manager::Tag.new
72
+ month_tag = tag_manager.find("month-#{DateTime.now.strftime('%-m')}")
73
+ note.tag(month_tag.prop(:name))
66
74
  end
67
75
 
68
76
  # generate monthly task summary templates
@@ -22,15 +22,31 @@ module Evertils
22
22
  end
23
23
  end
24
24
 
25
+ # Template file for note body
25
26
  def template_contents
26
- if Date.today.friday? && command == :Daily
27
- # Friday uses a slightly different template
28
- IO.readlines("#{Evertils::TEMPLATE_DIR}#{command.downcase}-friday.enml").join("").gsub!("\n", '')
29
- else
30
- IO.readlines("#{Evertils::TEMPLATE_DIR}#{command.downcase}.enml").join("").gsub!("\n", '')
27
+ tmpls = {
28
+ :monday => "#{Evertils::TEMPLATE_DIR}#{command.downcase}-monday.enml",
29
+ :tuesday => "#{Evertils::TEMPLATE_DIR}#{command.downcase}-tuesday.enml",
30
+ :wednesday => "#{Evertils::TEMPLATE_DIR}#{command.downcase}-wednesday.enml",
31
+ :thursday => "#{Evertils::TEMPLATE_DIR}#{command.downcase}-thursday.enml",
32
+ :friday => "#{Evertils::TEMPLATE_DIR}#{command.downcase}-friday.enml",
33
+ :default => "#{Evertils::TEMPLATE_DIR}#{command.downcase}.enml"
34
+ }
35
+
36
+ template = tmpls[:default]
37
+
38
+ if command == :Daily
39
+ if Date.today.friday? && File.exist?(tmpls[:friday])
40
+ template = tmpls[:friday]
41
+ elsif Date.today.thursday? && File.exist?(tmpls[:thursday])
42
+ template = tmpls[:thursday]
43
+ end
31
44
  end
45
+
46
+ IO.readlines(template, :encoding => 'UTF-8').join("").gsub!("\n", '')
32
47
  end
33
48
 
49
+ # Template string for note title
34
50
  def date_templates(arg_date = DateTime.now)
35
51
  dow = day_of_week(arg_date.strftime('%a'))
36
52
  end_of_week = arg_date + 4 # days
@@ -1,3 +1,3 @@
1
1
  module Evertils
2
- VERSION = '0.2.9'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evertils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Priebe
@@ -97,6 +97,7 @@ files:
97
97
  - lib/command.rb
98
98
  - lib/config.rb
99
99
  - lib/configs/templates/daily-friday.enml
100
+ - lib/configs/templates/daily-thursday.enml
100
101
  - lib/configs/templates/daily.enml
101
102
  - lib/configs/templates/monthly.enml
102
103
  - lib/configs/templates/mts.enml