Skip to content

Instantly share code, notes, and snippets.

@muhh
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save muhh/2f1e70ea9b68d6911574 to your computer and use it in GitHub Desktop.

Select an option

Save muhh/2f1e70ea9b68d6911574 to your computer and use it in GitHub Desktop.
get dones from dayone created in the last 24 hours
require 'rb-dayone'
s = DayOne::Search.new do
creation_date.after Time.now - (24*60*60)
tag.include "done"
end
s.results.each do |entry|
entry.entry_text.slice! "#done"
puts entry.entry_text
puts "----\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment