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 +51 -2
- data/lib/routinized/version.rb +1 -1
- data/lib/templates/master.rb.template +1 -1
- metadata +1 -1
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
|
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
|
data/lib/routinized/version.rb
CHANGED