nikki 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nikki/version.rb +1 -1
  3. data/lib/nikki.rb +5 -35
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bad525c6509fa646d2ec49341ddd01243eed11ff
4
- data.tar.gz: 8e027f08280c4b92885f57c513a62cf63b5f5e53
3
+ metadata.gz: be96ac3900ca2c7145722bbde43c893c890736b3
4
+ data.tar.gz: f49a75e9e48485e95766d8790395f83452ba520b
5
5
  SHA512:
6
- metadata.gz: 9f2cc4f9a14519dfcec0290e8c51afde64c78910c38d6212ca7c3491d2baa321811240cee78bb8704198b8902b1a4b4d8c2d307c9e67420eb67b243f191234e2
7
- data.tar.gz: 92200e97291888ede9f6899bc5b29aad71325bcd35d17dffae08a2cac77a728aa91288ca3daf6b295e907a91539cc54ad9fd22be3d67d69358df970a8a4eae4b
6
+ metadata.gz: 4fea851bb3163d7c0a1fd12a1ffac6eebb1720fdd7b06ff15af7aceeefe8ace33e3b474f9665ecfad8338cb1d34e0f4ef0a0a16957f93d73ea4290a1e0a6187c
7
+ data.tar.gz: 81fa267ce8325e1f4647e63ca47a842c4cd4c15b368bac4136630bc9b4147007d083fe56b455bbda0f8c2961ad585ea91e7eb00b926c1cf892abb01b3c140767
data/lib/nikki/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Sets version for RubyGems
2
2
  module Nikki
3
3
  # Sets version for RubyGems
4
- VERSION = '0.5.4'
4
+ VERSION = '0.5.5'
5
5
  end
data/lib/nikki.rb CHANGED
@@ -28,13 +28,9 @@ class Generator < Thor
28
28
  # @return [Hash] Returns a Hash which is then saved in a YAML file.
29
29
  # @example
30
30
  # "nikki new 'This is a thing I learned today!'"
31
- # Will open your configured text editor on OS X if you didn't update the
32
- # journal the previous day. This will allow you to add missing entries in
33
- # bulk. It reads the settings in from the config YAML file and changes the
31
+ # Reads the settings in from the config YAML file and changes the
34
32
  # date updated. It does the same with the journal file, reading in the YAML
35
33
  # and merging the hash of entries, and then saves the YAML back again.
36
- # There's also a method to check off a corresponding task in OmniFocus at the
37
- # end.
38
34
  def new(entry, update=nil)
39
35
  settings = read_config
40
36
  if update
@@ -64,23 +60,15 @@ class Generator < Thor
64
60
  desc 'open', "Open current year's journal file in editor."
65
61
  # Open Nikki journal in configured text editor
66
62
  def open
67
- `open -a "#{editor}" #{file}`
63
+ system(ENV['EDITOR'], file.to_s)
68
64
  end
69
65
 
70
66
  desc 'ls', 'Displays latest Nikki entries.'
71
- # option :sticky,
72
- # aliases: :s,
73
- # type: :string,
74
- # banner: 'Notify if not updated today'
75
67
  # Display Nikki's latest entires
76
68
  # @return [String]
77
69
  # @option options :sticky [String]
78
- # Display Sticky Notification if Nikki hasn't been updated
79
70
  def ls
80
71
  puts latest
81
- # StickyNotifications::Note.new.create(
82
- # "Nikki hasn't been updated today!", 'Nikki'
83
- # )
84
72
  end
85
73
 
86
74
  desc 'config', "Change Nikki's settings."
@@ -105,15 +93,12 @@ class Generator < Thor
105
93
  puts latest if options[:latest]
106
94
  end
107
95
 
108
- desc 'publish YEAR', 'Save Nikki journal from YEAR as Markdown'
109
- # @param [String] year of journal entries you wish to pubish as Markdown This
110
- # method calls the `markdown` method and creates a MultiMarkdown document
111
- # with one big description list. This format is subject to change, but for
112
- # now, it seems good enough.
96
+ desc 'export YEAR', 'Export Nikki journal from YEAR as YAML'
97
+ # @param [String] year of journal entries you wish to export
113
98
  def export(year)
114
99
  export_path = "#{path}nikki_export_#{year}.yml"
115
100
  IO.write(export_path, yamlize(read_file, year.to_i))
116
- puts "Markdown saved to \"#{export_path}\"."
101
+ puts "YAML saved to \"#{export_path}\"."
117
102
  end
118
103
 
119
104
  no_commands do
@@ -215,20 +200,5 @@ class Generator < Thor
215
200
  end
216
201
  string
217
202
  end
218
-
219
- def add_to_omnifocus
220
- `osascript <<-APPLESCRIPT
221
- tell application "OmniFocus"
222
- tell default document
223
- set nikki_task to first remaining task of flattened context "Home" whose name is "Record what I learned today"
224
- set deferDate to defer date of nikki_task
225
- if weekday of (deferDate) is weekday of (current date) then
226
- set completed of nikki_task to true
227
- end if
228
- end tell
229
- synchronize
230
- end tell
231
- APPLESCRIPT`
232
- end
233
203
  end
234
204
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nikki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Pittman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.4.6
145
+ rubygems_version: 2.4.8
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: A simple one-line-a-day journaling app.