Slogger is no longer actively supported. Some parts of it may still work, but there are no guarantees, and as a whole the apps and services it depends on have changed and without active maintenance, it's no longer viable. Thanks for all the love during its development, and please let me know if you know of viable alternatives.
If you are upgrading from a version prior to 2.0.12, please remove the RSSLogger section from slogger_config
and regenerate it by running slogger again. A new section will be added in addition to RSSLogger called Bloglogger. RSSLogger now logs all entries for the timespan as a single digest entry, whereas Bloglogger loads each item found as an individual "post."
Slogger indexes various public social services and creates Day One (http://dayoneapp.com/) journal entries or plain text Markdown files for them. It allows you to keep a personal journal that collects your online social life automatically, all in one place.
Download and unzip (or clone using git) the Slogger project. It can be stored in your home directory, a scripts folder or anywhere else on your drive.
Make sure you have the Xcode command line tools installed. (See Troubleshooting section below.)
From the command line, change to the Slogger folder and run the following commands:
sudo gem install bundler
bundle install
Default plugins are stored in /plugins/
, additional plugins are usually found in /plugins_disabled/
. Plugins are enabled and disabled by adding/removing them from the /plugins/
folder. Move any additional plugins you want to use into /plugins/
and disable any other plugins by moving them from /plugins/
to plugins_disabled
. (Plugins that are found in plugins
but not configured will not break anything, but you'll see warnings when run.)
From within the Slogger folder, run ./slogger --update-config
to create the initial configuration file. If this doesn't work, you may need to make the file executable: chmod a+x slogger
from within the Slogger folder. Note that any time you add new plugins or update existing ones, you'll want to run ./slogger --update-config
to ensure that your available options are up to date.
Edit the file slogger_config
that shows up in your Slogger folder
/Users/[username]/Library/Group Containers/5U8NS4GX82.dayoneapp2/Data/Auto Import/Default Journal.dayone/
/Users/username/Dropbox/Apps/Day One/Journal.dayone
)Edit additional configuration options for any plugins defined. The config file is formatted as YAML, and your options need to conform to that syntax. For the most part, you can just maintain the formatting (quotes, dashes, brackets, etc.) of the default settings when updating.
Next time you run ./slogger
, it will execute the enabled and configured plugins and generate your journal entries.
./slogger
to run the data
capture for the plugins you have in you /plugins/
directory./plugins/
folder (if you don't need them).launchd
scheduling app, or..../install.rb
to automatically install a launchd task that will run at 11:50pm every night. It's the same as Lingon would create, but all free and stuff.
rm ~/Library/LaunchAgents/com.brettterpstra.slogger.plist
and then log out and back in.$ ./slogger -h
Usage: slogger [-dq] [-r X] [/path/to/image.jpg]
--update-config Create or update a slogger_config file. No plugins will be run.
-c, --config FILE Specify alternate configuration file
-d, --develop Develop mode
-h, --help Display this screen
-o, --onlyrun NAME[,NAME2...] Only run plugins matching items in comma-delimited string (partial names ok)
-q, --quiet Run quietly (no notifications/messages)
-r, --retries COUNT Maximum number of retries per plugin (int)
-s, --since-last Set the timespan to the last run date
-t, --timespan DAYS Days of history to collect
-u, --undo COUNT Undo the last COUNT runs
-v, --version Display the version number
Note: You can use the
-s
option to only log since the last run date, handy if you want to run Slogger more or less than once per day or are testing plugins.You can also use
-o
to run only a certain plugin in the standard plugin directory: just provide it with enough of the name to be unique, e.g.slogger -o gist
.The
-u X
option will undo the last X runs. This works by checking the timestamp of the run and deleting any entries created after that timestamp. It should not be used if you have manually created entries since the last Slogger run. It also does not remove the run timestamps from the list, so running./slogger -u 4
will remove the entries created by the last four runs, and then running./slogger -u 5
will undo one more run in history.
Slogger is currently actively maintained, meaning new fixes and features are regularly available. To update your Slogger installation, download the zip file for the latest version (the link on this page is always current) into a new folder. Copy the new files over existing files to update them. If you've enabled plugins that are disabled by default, you'll need to copy them from the new folder's "plugins_disabled" folder to your current "plugins" folder.
As long as you don't move or delete your slogger_config
file, all of your settings will be preserved after the update.
More documentation coming. See plugin_template.rb
to get started.
If you want to edit an existing plugin to change parameters or output, move the original to plugins_disabled
and make a copy with a new name in plugins
. It will make it easier to update in the future without losing your changes.
When developing plugins you can create a directory called 'plugins_develop' in the same folder as 'plugins' and work on new plugins in there. When you run slogger, use ./slogger -d
to only run plugins in the develop folder while testing.
@log
is a global logger object. use @log.info("Message")
(or warn
/error
/fatal
) to generate log messages using the default formatter.
@config
is the global configuration object. Your plugin settings will be stored under @config[PluginClassName]
. If you return the config object at the end of your do_log function, any modifications will be stored (e.g. for saving oAuth tokens).
$options
contains options parsed from the command line. Use $options[:optionname]
to read the setting.
:develop
whether Slogger was run in develop mode:timespan
the timespan passed from the command line as number of days (int):quiet
suppresses log messages. This affects the log formatter and shouldn't generally be needed. Just create log messages using @log
and if :quiet is true, they'll be suppressed.:retries
is the number of retries to attempt on any given operation. Create loops in network calls and parsing routines to allow for retry on failure, and use $options[:retries]
to determine how many times to iterate.@timespan
is available to all plugins and contains a date object based on the timespan setting. This defaults to 24 hours prior to the run.
@date_format
, @time_format
and @datetime_format
(this is just the conjunction of the first two) are available to all plugins and should be used wherever you output a date or time to DayOne files, e.g. Time.now.strftime(@date_format)
.
Slogger depends on Apple’s system Ruby version to run. You can check the Ruby version by typing ruby -v
in your terminal, it should return something like ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
.
As of the release of Mavericks Apple are providing Ruby version 2.0. Slogger is transitioning to full 2.0 support so meanwhile your mileage may vary.
If you are using RVM or RBENV to manage your Ruby installation, you can set an alternative Ruby version as the default.
For RVM check here: https://rvm.io/rubies/default
For RBENV check here: https://github.com/sstephenson/rbenv#choosing-the-ruby-version
In order for Slogger to run you must have an up-to-date version of Xcode's Command Line Tools installed.
Download Xcode from the OSX App Store. When it has downloaded launch it, open "Preferences", and under "Downloads" click on the arrow to the right of "Command Line Tools".
Alternatively you can download the command line tools from Apple here: https://developer.apple.com/downloads/index.action
Apple updated the clang compiler to version 5.1 with the latest Xcode update, which breaks building gems with native extensions. They fail with this error: clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
You can check your version of clang with clang -v
on the terminal.
While that bug is being worked on, here is a temporary workaound:
First we need to install bundler.
sudo env ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install bundler
And after that, use bundler to install other gems:
sudo env ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future bundle install
If Slogger is running, but returning an error message, it may be an issue with a plugin configuration.
It may help to move all plugins to the Disabled Plugins directory, and then add them back into the Plugins directory one by one, running ./slogger
each time to ensure it is not returning any errors. That way, you can identify if there is an issue with a particular Plugin.
Common issues with Plugins:
Feeds entered incorrectly. Multiple RSS feeds should be entered like
feeds: [http://feed1.com/feed1.rss, http://feed2.com/feed2.rss, http://feed3.com/feed3.rss]
Attempting to fetch an invalid feed. Feeds can be validated here: http://validator.w3.org/feed/
It's not uncommon to have some sync issues using iCloud. The developers of the Day One app explicitly favour using Dropbox to sync your journal between your Mac and iPhone or iPad. So maybe use Dropbox.
If you are using Dropbox, a common location for your Day One Journal, which will need to be entered in the Slogger Config file under "Storage" is /Users/YOURUSERNAME/Dropbox/Apps/Day One/Journal.dayone
. Please note that if you have moved your Dropbox, to your Desktop for instance, that would change the path required to /Users/YOURUSERNAME/Desktop/Dropbox/Apps/Day One/Journal.dayone
By default Slogger sets the Date format to ISO 8601 (Y/m/d) "%F"
and the Time format to H:M (24-hour clock) "%R"
. These settings can be changed to anything from the strftime
specification, viewable here: http://linux.die.net/man/3/strftime.
The European Date format dd/mm/yy is not supported. The closest option is probably to set date to "%x"
which is "The preferred date representation for the current locale without the time."
__ _
/ _\| | ___ __ _ __ _ ___ _ __
\ \ | |/ _ \ / _` |/ _` |/ _ \ '__|
_\ \| | (_) | (_| | (_| | __/ |
\__/|_|\___/ \__, |\__, |\___|_|
|___/ |___/
Copyright 2013, Brett Terpstra
http://brettterpstra.com
--------------------
Slogger by Brett Terpstra is licensed under the MIT License.
The MIT License (MIT) Copyright (c) 2016 Brett Terpstra
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.