Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Last active December 18, 2015 05:29
Show Gist options
  • Save ttscoff/5733480 to your computer and use it in GitHub Desktop.
Save ttscoff/5733480 to your computer and use it in GitHub Desktop.
Locate your Day One entries folder
#!/usr/bin/ruby
require 'shellwords'
dayonedir = %x{ls ~/Library/Mobile\\ Documents/|grep dayoneapp}.strip
full_path = File.expand_path("~/Library/Mobile\ Documents/#{dayonedir}/Documents/Journal_dayone/entries")
if File.exists?(full_path)
system "echo \"#{Shellwords.escape(full_path)}\"|tr -d '\n'|pbcopy"
puts full_path
puts "Escaped version of your Day One entries path is in your clipboard."
puts "You don't need to use quotes with this format."
else
puts "Day One not found in your iCloud folder."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment