sifttter-redux 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile +2 -0
- data/HISTORY.md +7 -2
- data/README.md +24 -37
- data/bin/srd +6 -14
- data/lib/Sifttter-Redux/constants.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzRhYjM4NDAwNmYyZTdjMmFjMTI1ZGM3ZGYzYWJjYmM3YmE3YTBiNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDFjNmRlZmQzZDE4MjJlNWQzNDY1MjIxZmVjMmI4NGUzNzMzYjY5MQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDY2Zjc5YjA3NWNlZDNlYzBlMzJkYzQxMmZkOTU4NzU2ZWU1NmU0ZWYyYjI3
|
10
|
+
ZjQzYTQyZjA0YTIyYWZhMTExYmZlZDY0MTkzODllNDA5MTJmODY1MTdlODNl
|
11
|
+
YmViM2Y5NzVmMmE5YTA2OWQ1ZTE4MWZmODA5MjgwYjIyYjZhNTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjVmOTQwYjFjMThlZmFlYmFjYTU3MmZkMTdiMGFjMjljOWY2ZjM3YjJkMzJi
|
14
|
+
YWYzZDg5NjM0ZDNlMzU0MmExMWQ4ODY5Mjk4NjVjZDQyOGYxNDM4ZGVmODg4
|
15
|
+
MjQyMzU0NzYwODllY2ViODAzZGI0YjE4NDM3NDIwNDQzNjIzMWE=
|
data/Gemfile
ADDED
data/HISTORY.md
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
+
# 0.2.1
|
2
|
+
|
3
|
+
* Fixed a bug where the config manager would fail on certain platforms.
|
4
|
+
* Fixed a bug where the path to Dropbox Uploader became malformed.
|
5
|
+
|
1
6
|
# 0.2.0
|
2
7
|
|
3
|
-
*
|
8
|
+
* Implemented catch-up mode.
|
4
9
|
|
5
10
|
# 0.1.0
|
6
11
|
|
7
|
-
* Initial release
|
12
|
+
* Initial release of Sifttter Redux.
|
data/README.md
CHANGED
@@ -25,36 +25,18 @@ $ sudo apt-get install uuid
|
|
25
25
|
|
26
26
|
## Installation
|
27
27
|
|
28
|
-
First, clone this repository via git:
|
29
|
-
|
30
|
-
```
|
31
|
-
$ git clone https://github.com/bachya/Sifttter-Redux.git
|
32
|
-
```
|
33
|
-
|
34
|
-
Next, cd into the Sifttter Redux directory and install the necessary gems:
|
35
|
-
|
36
28
|
```
|
37
|
-
|
38
|
-
$ bundle install
|
39
|
-
```
|
40
|
-
|
41
|
-
*(note that you may want to run `bundle install --global` for the sake of `cron` -- [see below](#cron-job))*
|
42
|
-
|
43
|
-
Finally, make sure the script is executable and initialize it:
|
44
|
-
|
45
|
-
```
|
46
|
-
$ chmod +x srd
|
47
|
-
$ ./srd init
|
29
|
+
gem install sifttter-redux
|
48
30
|
```
|
49
31
|
|
50
32
|
## Usage
|
51
33
|
|
52
|
-
Syntax and usage can be accessed by running
|
34
|
+
Syntax and usage can be accessed by running `srd help`:
|
53
35
|
|
54
36
|
```
|
55
|
-
$
|
37
|
+
$ srd help
|
56
38
|
NAME
|
57
|
-
srd - Sifttter Redux
|
39
|
+
srd - Sifttter Redux
|
58
40
|
|
59
41
|
A modification of Craig Eley's Sifttter that allows for smart
|
60
42
|
installation on a standalone *NIX device (such as a Raspberry Pi).
|
@@ -62,8 +44,12 @@ NAME
|
|
62
44
|
SYNOPSIS
|
63
45
|
srd [global options] command [command options] [arguments...]
|
64
46
|
|
47
|
+
VERSION
|
48
|
+
0.2.1
|
49
|
+
|
65
50
|
GLOBAL OPTIONS
|
66
|
-
--help
|
51
|
+
--help - Show this message
|
52
|
+
--version - Display the program version
|
67
53
|
|
68
54
|
COMMANDS
|
69
55
|
exec - Execute the script
|
@@ -74,7 +60,7 @@ COMMANDS
|
|
74
60
|
### Initialization
|
75
61
|
|
76
62
|
```
|
77
|
-
$
|
63
|
+
$ srd init
|
78
64
|
```
|
79
65
|
|
80
66
|
Initialization will perform the following steps:
|
@@ -90,7 +76,7 @@ Initialization will perform the following steps:
|
|
90
76
|
|
91
77
|
```
|
92
78
|
# Creates an entry for today
|
93
|
-
$
|
79
|
+
$ srd exec
|
94
80
|
```
|
95
81
|
|
96
82
|
### "Catch-up" Mode
|
@@ -105,14 +91,14 @@ To create entries for the past 7 days (not inclusive of the current day):
|
|
105
91
|
|
106
92
|
```
|
107
93
|
# Creates an entry for each day from from 7 days ago to yesterday
|
108
|
-
$
|
94
|
+
$ srd exec -c
|
109
95
|
```
|
110
96
|
|
111
97
|
To include the current day:
|
112
98
|
|
113
99
|
```
|
114
100
|
# Creates an entry for each day from 7 days ago to today
|
115
|
-
$
|
101
|
+
$ srd exec -c -i
|
116
102
|
```
|
117
103
|
|
118
104
|
#### Yesterday Catch-up
|
@@ -121,7 +107,7 @@ To create an entry for yesterday:
|
|
121
107
|
|
122
108
|
```
|
123
109
|
# Creates an entry for yesterday
|
124
|
-
$
|
110
|
+
$ srd exec -y
|
125
111
|
```
|
126
112
|
|
127
113
|
#### Date Range Catch-up
|
@@ -130,21 +116,21 @@ To create entries for a range of dates:
|
|
130
116
|
|
131
117
|
```
|
132
118
|
# Creates an entry for each day from 2/1/2014 to 2/12/2014
|
133
|
-
$
|
119
|
+
$ srd exec -f 2014-02-01 -t 2014-02-12
|
134
120
|
```
|
135
121
|
|
136
122
|
Even more simply, to create entries from a specific point until yesterday ("yesterday" because you might not be ready to have today's entries scanned):
|
137
123
|
|
138
124
|
```
|
139
125
|
# Creates an entry for each day from 2/1/2014 to yesterday's date
|
140
|
-
$
|
126
|
+
$ srd exec -f 2014-02-01
|
141
127
|
```
|
142
128
|
|
143
129
|
Of course, if you want to include today's date, you can always use the trusty `-i` switch:
|
144
130
|
|
145
131
|
```
|
146
132
|
# Creates an entry for each day from 2/1/2014 to today's date
|
147
|
-
$
|
133
|
+
$ srd exec -f 2014-02-01 -i
|
148
134
|
```
|
149
135
|
|
150
136
|
Two notes to be aware of:
|
@@ -156,7 +142,7 @@ Sifttter Redux makes use of the excellent [Chronic gem](https://github.com/mojom
|
|
156
142
|
|
157
143
|
```
|
158
144
|
# Natural language parsing is great! Thanks, Chronic!
|
159
|
-
$
|
145
|
+
$ srd exec -f "last Thursday" -t "yesterday"
|
160
146
|
```
|
161
147
|
|
162
148
|
See [Chronic's Examples section](https://github.com/mojombo/chronic#examples "Chronic Examples") for more examples.
|
@@ -172,7 +158,7 @@ One issue that arises is the loading of the bundled gems; because `cron` runs in
|
|
172
158
|
If your Raspberry Pi uses RVM, this `crontab` entry will do:
|
173
159
|
|
174
160
|
```
|
175
|
-
55 23 * * * /bin/bash -l -c 'source "$HOME/.rvm/scripts/rvm" &&
|
161
|
+
55 23 * * * /bin/bash -l -c 'source "$HOME/.rvm/scripts/rvm" && srd exec'
|
176
162
|
```
|
177
163
|
|
178
164
|
### Globally Installing Bundled Gems
|
@@ -194,7 +180,7 @@ Some functionality I would like to tackle for future releases:
|
|
194
180
|
|
195
181
|
* Interactive cron job installer
|
196
182
|
* Verbose mode that more explicity tells the user what's currently going on
|
197
|
-
*
|
183
|
+
* Smarter checking of the config file to see if an old version is being used
|
198
184
|
|
199
185
|
## Bugs and Feature Requests
|
200
186
|
|
@@ -222,6 +208,7 @@ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
222
208
|
|
223
209
|
## Credits
|
224
210
|
|
225
|
-
* Craig Eley for Sifttter and for giving me the idea for Sifttter Redux
|
226
|
-
*
|
227
|
-
*
|
211
|
+
* Craig Eley for [Sifttter](http://craigeley.com/post/72565974459/sifttter-an-ifttt-to-day-one-logger "Sifttter") and for giving me the idea for Sifttter Redux
|
212
|
+
* Dave Copeland for [GLI](https://github.com/davetron5000/gli "GLI")
|
213
|
+
* Andrea Fabrizi for [Dropbox Uploader](https://github.com/andreafabrizi/Dropbox-Uploader "Dropbox Uploader")
|
214
|
+
* Tom Preston-Werner and Lee Jarvis for [Chronic](https://github.com/mojombo/chronic "Chronic")
|
data/bin/srd
CHANGED
@@ -35,17 +35,12 @@
|
|
35
35
|
require 'colored'
|
36
36
|
require 'fileutils'
|
37
37
|
require 'gli'
|
38
|
+
require 'sifttter-redux'
|
38
39
|
require 'time'
|
39
40
|
require 'yaml'
|
40
41
|
|
41
|
-
require 'Sifttter-Redux'
|
42
|
-
|
43
42
|
include GLI::App
|
44
43
|
|
45
|
-
$config = ConfigManager.instance
|
46
|
-
$date_range_maker = DateRangeMaker.new
|
47
|
-
$db_uploader = File.join($config.db_uploader["local_filepath"], "dropbox_uploader.sh")
|
48
|
-
|
49
44
|
program_desc "Sifttter Redux
|
50
45
|
|
51
46
|
A modification of Craig Eley's Sifttter that allows for smart
|
@@ -53,23 +48,20 @@ program_desc "Sifttter Redux
|
|
53
48
|
|
54
49
|
version SifttterRedux::VERSION
|
55
50
|
|
56
|
-
# desc 'Describe some switch here'
|
57
|
-
# switch [:s,:switch]
|
58
|
-
#
|
59
|
-
# desc 'Describe some flag here'
|
60
|
-
# default_value 'the default'
|
61
|
-
# arg_name 'The name of the argument'
|
62
|
-
# flag [:f,:flagname]
|
63
|
-
|
64
51
|
#| ======================================================
|
65
52
|
#| Pre, Post, and Error
|
66
53
|
#| ======================================================
|
67
54
|
|
68
55
|
pre do |global,command,options,args|
|
56
|
+
$config = ConfigManager.instance
|
57
|
+
$date_range_maker = DateRangeMaker.new
|
58
|
+
|
69
59
|
if !File.exists?(SifttterRedux::SRD_CONFIG_FILEPATH)
|
70
60
|
CliMessage.info("It doesn't look like you've initlized Sifttter Redux yet. Doing that now...")
|
71
61
|
initialize_procedures
|
72
62
|
end
|
63
|
+
|
64
|
+
$db_uploader = File.join($config.db_uploader["local_filepath"], "dropbox_uploader.sh")
|
73
65
|
true
|
74
66
|
end
|
75
67
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sifttter-redux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Bach
|
@@ -78,6 +78,7 @@ extra_rdoc_files:
|
|
78
78
|
- LICENSE
|
79
79
|
files:
|
80
80
|
- .gitignore
|
81
|
+
- Gemfile
|
81
82
|
- HISTORY.md
|
82
83
|
- LICENSE
|
83
84
|
- README.md
|