routinized 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -3,7 +3,8 @@
3
3
  Get a Routine!
4
4
 
5
5
  Routinized is just a convenient way to add some structure to your day. It
6
- turns a routine and a set of commands into a crontab. Easy.
6
+ turns a routine and a set of commands into a crontab. Easy. You can
7
+ customize everything.
7
8
 
8
9
  ## Why?
9
10
 
@@ -12,7 +13,12 @@ reminded to do some pushups, stretch every so often to prevent screen lock,
12
13
  and have it be flexible enough that I could extend it with additional verbs.
13
14
 
14
15
  Cron was a natural fit as I wanted to use as much operating system level
15
- things as I could, rather than run a scheduler and additional data storage.
16
+ things as I could, rather than run a scheduler. I also wanted it to be
17
+ customizable.
18
+
19
+ It's fun. Share. Make it more fun.
20
+
21
+ Think of it as sharing smart periodic scripts for local use.
16
22
 
17
23
  ## Installation
18
24
 
@@ -46,6 +52,49 @@ is as easy as:
46
52
 
47
53
  (depending on the command, you might need to customize config.json)
48
54
 
55
+ ## Routine
56
+
57
+ Since this is a layer on top of whenever, you can do things like:
58
+
59
+ ```ruby
60
+ # Morning Routine
61
+ #
62
+ # Go to WORK!
63
+ every :weekday, :at => '8:00am' do
64
+ command say 'Go to Work'
65
+ command itunes_play('Rush',"World",'Working Man')
66
+ end
67
+
68
+ every :weekday, :at => '8:45am' do
69
+ command say 'Read Hacker News'
70
+ command osx_notify('HN',"Grab a coffee and read Hacker News")
71
+ end
72
+
73
+ # Stretch Break every 30 minutes during the work week
74
+ every '*/30 9-16 * * 1-5' do
75
+ command sleep(5) + say('Time to stretch')
76
+ command osx_notify('Stretch',"Take a short break and stretch")
77
+ end
78
+
79
+ # Lunch!
80
+ every :weekday, :at => '12:00pm' do
81
+ command say 'Time for Lunch'
82
+ command osx_notify('Lunch','Time to eat some food')
83
+ end
84
+
85
+ # Stop Working
86
+ every :weekday, :at => '5:15pm' do
87
+ command say 'Good work Zack, go home'
88
+ command itunes_play('Rush','Rio','Spirit')
89
+ command osx_notify('Go Home','Time to stop working dear chap.')
90
+ end
91
+
92
+ ```
93
+
94
+ Currently it is brainless, in more than one way I'm sure, but in
95
+ this context I mean without persistent memory storage. That will
96
+ be added at some point.
97
+
49
98
  ## Acknowledgements
50
99
 
51
100
  This is really just a thin shim on top of the
@@ -1,3 +1,3 @@
1
1
  module Routinized
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -42,5 +42,5 @@ end
42
42
 
43
43
  # Clean out log file, good citizenship!
44
44
  every :day do
45
- command "/bin/cat /dev/null >! /Users/zhubert/.cron_whenever.log"
45
+ command "/bin/rm /Users/zhubert/.cron_whenever.log"
46
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: routinized
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: