DOLOG Script for Alfred.app
What it does
It takes an input string and creates an entry in the
log journal of Day One with the content of the entry formated as
completed task: plus the input string.
The idea is to be able to quickly log the tasks that you complete during the day with as little friction as possible. Many things can be logged automatically with IFTTT, but some things fall outside of the automation capabilities. This is for those tasks you complete.
You need a few things to make use of this script:
What you need
- you need the latest version of Day One 2
- you must have installed the Day One Command Line Interface with
/Applications/Day\ One.app/Contents/Resources/install_cli.shor following instructions from Day One CLI
- you need to have Alfred installed, with a PowerPack license (required to use workflows)
- download and unzip the
- double-click the
.alfredworkflowfile to install the workflow in Alfred.
- open the workflow and double-click the
- click the
open workflow folder in finderbutton to the left of the
- copy the
DayOneLoggerPlusfile from the
dologpackage to the workflow folder.
- you can close the workflow folder and Alfred's preferences window.
- you're good to go!
Invoke Alfred (for me this is
dolog (although I can usually just type
return to select the workflow, then type the text you want to log, and press
The input string can include tags for the Day One entry. The format to use is the following:
-t tag1 tag_2 tag3 @ <completed task text>
To include tags, the input string must start with
-t , followed by one or more space-separated tags, then the
end of tags special character:
@, then the text of the completed task.
To include spaces in tags, use the underscore
_ character where the space should be and the script will convert those while processing the tags. For example, the following:
-t day_one @ something
Will create an entry with a tag
All entries will have the
completed tasks and the
dolog tags added by default.
This script is made for Swift 4.0.
Modifying the script
You can modify for example the default journal to log into, the default tags, etc. by modifying the script in the included
DayOneLoggerPlus.swift file. You must then compile the script and make it executable and put it in the workflow folder.
How to contribute
I'm always happy to improve my code and learn, so if you find things to improve please submit a pull request.
Here are some ways you can contribute:
- by reporting bugs
- by writing or editing documentation
- by writing code ( no patch is too small : fix typos, add comments, clean up * inconsistent whitespace )
- by refactoring code
- by closing issues
- by reviewing patches
- Submitting an Issue
I use the GitHub issue tracker to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn't already been submitted.
Submitting a Pull Request
- Fork the repository.
- Create a topic branch.
- Implement your feature or bug fix.
- Add, commit, and push your changes.
- Submit a pull request.
Dolog is Copyright © 2017 Denis Ricard. It is free software, and may be redistributed under the terms specified in the LICENSE file.