Last active
December 18, 2015 05:29
-
-
Save ttscoff/5733480 to your computer and use it in GitHub Desktop.
Locate your Day One entries folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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