README.md in sifttter-redux-0.2.5 vs README.md in sifttter-redux-0.3.0
- old
+ new
@@ -1,9 +1,9 @@
Sifttter Redux
==============
-Siftter Redux is a modification of Craig Eley's [Siftter](http://gist.github.com/craigeley/8301817 "Siftter"), a script to collect information from [IFTTT](http://www.ifttt.com "IFTTT") and place it in a [Day One](http://dayoneapp.com, "Day One") journal.
+Siftter Redux is a modification of Craig Eley's [Sifttter](http://craigeley.com/post/72565974459/sifttter-an-ifttt-to-day-one-logger "Sifttter"), a script to collect information from [IFTTT](http://www.ifttt.com "IFTTT") and place it in a [Day One](http://dayoneapp.com, "Day One") journal.
Siftter Redux's primary difference is in its execution method: it intended to run autonomously so that it does not need to be manually activated. This allows IFTTT data to be synchronized to Day One on a schedule.
The aim of this project was to use a Raspberry Pi; as such, the instructions below are specifically catered to that platform. That said, it should be possible to install and configure on any *NIX platform.
@@ -68,80 +68,289 @@
1. The location on your filesystem where Sifttter files will be temporarily stored
2. The location of your Sifttter files in Dropbox
3. The location on your filesystem where Day One files will be temporarily stored
4. The location of your Day One files in Dropbox
-### Basic Mode
+### Basic Execution
```
-# Creates an entry for today
$ srd exec
+#### EXECUTING...
+---> INFO: Creating entry for February 15, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 15, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
```
### "Catch-up" Mode
-Sometimes, events occur that prevent Sifttter Redux from running (power loss to your device, a bad Cron job, etc.). In this case, Sifttter Redux's "catch-up" mode can be used to collect any valid journal data before the current day.
+Sometimes, events occur that prevent Sifttter Redux from running (power loss to your device, a bad Cron job, etc.). In this case, Sifttter Redux's "catch-up" mode can be used to collect any valid journal on or before today's date.
-There are many ways to use this mode:
+There are many ways to use this mode (note that "today" in these examples is **February 15, 2014**):
-#### 7-Day Catch-up
+#### Yesterday Catch-up
-To create entries for the past 7 days (not inclusive of the current day):
+To create an entry for yesterday:
```
-# Creates an entry for each day from from 7 days ago to yesterday
-$ srd exec -c
+$ srd exec -y
+#### EXECUTING...
+---> INFO: Creating entry for February 14, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 14, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
```
-To include the current day:
+#### Last "N" Days Catch-up
+Sifttter Redux allows you to specify the number of days back it should look for new entries:
+
```
-# Creates an entry for each day from 7 days ago to today
-$ srd exec -c -i
+$ srd exec -n 3
+#### EXECUTING...
+---> INFO: Creating entries for dates from February 12, 2014 to February 14, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 12, 2014...
+---> SUCCESS: Entry logged for February 13, 2014...
+---> SUCCESS: Entry logged for February 14, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
+
+$ srd exec -n 12
+---> INFO: Creating entries for dates from February 03, 2014 to February 14, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: February 03, 2014...
+---> SUCCESS: February 04, 2014...
+---> SUCCESS: February 05, 2014...
+---> SUCCESS: February 06, 2014...
+---> SUCCESS: February 07, 2014...
+---> SUCCESS: February 08, 2014...
+---> SUCCESS: February 09, 2014...
+---> SUCCESS: February 10, 2014...
+---> SUCCESS: February 11, 2014...
+---> SUCCESS: February 12, 2014...
+---> SUCCESS: February 13, 2014...
+---> SUCCESS: February 14, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
```
-#### Yesterday Catch-up
+Note that this option goes until yesterday ("yesterday" because you might not be ready to have today's entries scanned). If you'd rather include today's date, you can always add the `-i` switch:
-To create an entry for yesterday:
+```
+$ srd exec -i -n 3
+#### EXECUTING...
+---> INFO: Creating entries for dates from February 12, 2014 to February 15, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 12, 2014...
+---> SUCCESS: Entry logged for February 13, 2014...
+---> SUCCESS: Entry logged for February 14, 2014...
+---> SUCCESS: Entry logged for February 15, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
+```
+#### Last "N" Weeks Catch-up
+
+Sifttter Redux also allows you to specify a number of weeks back that should be scanned for new entries:
+
```
-# Creates an entry for yesterday
-$ srd exec -y
+$ srd exec -w 1
+#### EXECUTING...
+---> INFO: Creating entries for dates from February 03, 2014 to February 14, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 03, 2014...
+---> SUCCESS: Entry logged for February 04, 2014...
+---> SUCCESS: Entry logged for February 05, 2014...
+---> SUCCESS: Entry logged for February 06, 2014...
+---> SUCCESS: Entry logged for February 07, 2014...
+---> SUCCESS: Entry logged for February 08, 2014...
+---> SUCCESS: Entry logged for February 09, 2014...
+---> SUCCESS: Entry logged for February 10, 2014...
+---> SUCCESS: Entry logged for February 11, 2014...
+---> SUCCESS: Entry logged for February 12, 2014...
+---> SUCCESS: Entry logged for February 13, 2014...
+---> SUCCESS: Entry logged for February 14, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
+
+$ srd exec -w 3
+#### EXECUTING...
+---> INFO: Creating entries for dates from January 20, 2014 to February 14, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for January 20, 2014...
+---> SUCCESS: Entry logged for January 21, 2014...
+---> SUCCESS: Entry logged for January 22, 2014...
+---> SUCCESS: Entry logged for January 23, 2014...
+---> SUCCESS: Entry logged for January 24, 2014...
+---> SUCCESS: Entry logged for January 25, 2014...
+---> SUCCESS: Entry logged for January 26, 2014...
+---> SUCCESS: Entry logged for January 27, 2014...
+---> SUCCESS: Entry logged for January 28, 2014...
+---> SUCCESS: Entry logged for January 29, 2014...
+---> SUCCESS: Entry logged for January 30, 2014...
+---> SUCCESS: Entry logged for January 31, 2014...
+---> SUCCESS: Entry logged for February 01, 2014...
+---> SUCCESS: Entry logged for February 02, 2014...
+---> SUCCESS: Entry logged for February 03, 2014...
+---> SUCCESS: Entry logged for February 04, 2014...
+---> SUCCESS: Entry logged for February 05, 2014...
+---> SUCCESS: Entry logged for February 06, 2014...
+---> SUCCESS: Entry logged for February 07, 2014...
+---> SUCCESS: Entry logged for February 08, 2014...
+---> SUCCESS: Entry logged for February 09, 2014...
+---> SUCCESS: Entry logged for February 10, 2014...
+---> SUCCESS: Entry logged for February 11, 2014...
+---> SUCCESS: Entry logged for February 12, 2014...
+---> SUCCESS: Entry logged for February 13, 2014...
+---> SUCCESS: Entry logged for February 14, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
```
+As you'd expect, you can always add the `-i` switch:
+
+```
+$ srd exec -i -w 1
+#### EXECUTING...
+---> INFO: Creating entries for dates from February 03, 2014 to February 15, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 03, 2014...
+---> SUCCESS: Entry logged for February 04, 2014...
+---> SUCCESS: Entry logged for February 05, 2014...
+---> SUCCESS: Entry logged for February 06, 2014...
+---> SUCCESS: Entry logged for February 07, 2014...
+---> SUCCESS: Entry logged for February 08, 2014...
+---> SUCCESS: Entry logged for February 09, 2014...
+---> SUCCESS: Entry logged for February 10, 2014...
+---> SUCCESS: Entry logged for February 11, 2014...
+---> SUCCESS: Entry logged for February 12, 2014...
+---> SUCCESS: Entry logged for February 13, 2014...
+---> SUCCESS: Entry logged for February 14, 2014...
+---> SUCCESS: Entry logged for February 15, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
+```
+
#### Date Range Catch-up
To create entries for a range of dates:
```
-# Creates an entry for each day from 2/1/2014 to 2/12/2014
$ srd exec -f 2014-02-01 -t 2014-02-12
+#### EXECUTING...
+---> INFO: Creating entries for dates from February 01, 2014 to February 12, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 01, 2014...
+---> SUCCESS: Entry logged for February 02, 2014...
+---> SUCCESS: Entry logged for February 03, 2014...
+---> SUCCESS: Entry logged for February 04, 2014...
+---> SUCCESS: Entry logged for February 05, 2014...
+---> SUCCESS: Entry logged for February 06, 2014...
+---> SUCCESS: Entry logged for February 07, 2014...
+---> SUCCESS: Entry logged for February 08, 2014...
+---> SUCCESS: Entry logged for February 09, 2014...
+---> SUCCESS: Entry logged for February 10, 2014...
+---> SUCCESS: Entry logged for February 11, 2014...
+---> SUCCESS: Entry logged for February 12, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
```
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):
```
-# Creates an entry for each day from 2/1/2014 to yesterday's date
$ srd exec -f 2014-02-01
+#### EXECUTING...
+---> INFO: Creating entries for dates from February 01, 2014 to February 12, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 01, 2014...
+---> SUCCESS: Entry logged for February 02, 2014...
+---> SUCCESS: Entry logged for February 03, 2014...
+---> SUCCESS: Entry logged for February 04, 2014...
+---> SUCCESS: Entry logged for February 05, 2014...
+---> SUCCESS: Entry logged for February 06, 2014...
+---> SUCCESS: Entry logged for February 07, 2014...
+---> SUCCESS: Entry logged for February 08, 2014...
+---> SUCCESS: Entry logged for February 09, 2014...
+---> SUCCESS: Entry logged for February 10, 2014...
+---> SUCCESS: Entry logged for February 11, 2014...
+---> SUCCESS: Entry logged for February 12, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
```
-Of course, if you want to include today's date, you can always use the trusty `-i` switch:
+In this case, once more, you can use the trusty `-i` switch if you want:
```
-# Creates an entry for each day from 2/1/2014 to today's date
-$ srd exec -f 2014-02-01 -i
+$ srd exec -i -f 2014-02-01
+#### EXECUTING...
+---> INFO: Creating entries for dates from February 01, 2014 to February 15, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 01, 2014...
+---> SUCCESS: Entry logged for February 02, 2014...
+---> SUCCESS: Entry logged for February 03, 2014...
+---> SUCCESS: Entry logged for February 04, 2014...
+---> SUCCESS: Entry logged for February 05, 2014...
+---> SUCCESS: Entry logged for February 06, 2014...
+---> SUCCESS: Entry logged for February 07, 2014...
+---> SUCCESS: Entry logged for February 08, 2014...
+---> SUCCESS: Entry logged for February 09, 2014...
+---> SUCCESS: Entry logged for February 10, 2014...
+---> SUCCESS: Entry logged for February 11, 2014...
+---> SUCCESS: Entry logged for February 12, 2014...
+---> SUCCESS: Entry logged for February 13, 2014...
+---> SUCCESS: Entry logged for February 14, 2014...
+---> SUCCESS: Entry logged for February 15, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
```
Two notes to be aware of:
* `-f` and `-t` are *inclusive* parameters, meaning that when specified, those dates will be included when searching for Siftter data.
* Although you can specify `-f` by itself, you cannot specify `-t` by itself.
Sifttter Redux makes use of the excellent [Chronic gem](https://github.com/mojombo/chronic "Chronic"), which provides natural language parsing for dates and times. This means that you can run commands with more "human" dates:
```
-# Natural language parsing is great! Thanks, Chronic!
-$ srd exec -f "last Thursday" -t "yesterday"
+$ srd exec -f "last monday" -t "yesterday"
+#### EXECUTING...
+---> INFO: Creating entries for dates from February 10, 2014 to February 14, 2014...
+---> INFO: Downloading Sifttter files...DONE.
+---> SUCCESS: Entry logged for February 10, 2014...
+---> SUCCESS: Entry logged for February 11, 2014...
+---> SUCCESS: Entry logged for February 12, 2014...
+---> SUCCESS: Entry logged for February 13, 2014...
+---> SUCCESS: Entry logged for February 14, 2014...
+---> INFO: Uploading Day One entries to Dropbox...DONE.
+---> INFO: Removing downloaded Day One files...DONE.
+---> INFO: Removing downloaded Sifttter files...DONE.
+#### EXECUTION COMPLETE!
```
See [Chronic's Examples section](https://github.com/mojombo/chronic#examples "Chronic Examples") for more examples.
## Cron Job
\ No newline at end of file