Sifttter Update: The Date Update26 Feb 2014
Sifttter has always been about “set it and forget it” use—running silently every single night with minimal fuss and zero user interaction. But by far the most common request I’ve gotten is to easily create entries for different dates. There are a ton of reasons you would want to do this, especially if your primary computer is a laptop that might be closed or off at the time the script is scheduled to run. I would kludge this by force-changing my computer’s date, in part because I wasn’t confident in my ability to code a more complex date range function.
Enter Paul Hayes, who Tweeted at me two weeks ago to show me how he had modified Sifttter to create straightforward Markdown files over user-specified date ranges. You can see his super useful script here. I added Paul’s elegant solution for command-line date ranges so that you can generate nice Day One entries for any old day that you choose. Here are the options:
-d, --date DATE, 'Date to generate - Any parseable date string'
-s, --start START, 'Start date - Use with end to generate a range of dates'
-e, --end END, 'End date - Use with start to generate a range of dates'
So a potential use would look like
ruby /path/to/sifttter.rb -s "2014-02-01" -e "2014-02-26"
I’ve used this occasion to bump Sifttter to version 1.5, which was a totally arbitrary choice. Honestly, this improves the use-cases for Sifttter so dramatically it feels like a 2.0. I’m glad I’m not an actual software developer who has to worry about that sort of thing.
See more posts tagged: sifttter logging comments powered by Disqus