Skip to content

Jim Christian

Thoughts on tech, tools, and life.

Menu
  • Home
  • About
  • Signal Over Noise Newsletter
  • Consulting
  • Notion Marketplace
Menu

File PDFs to Evernote Depending on Your Location

Posted on February 28, 2014 by Jim

This started out as a “proof-of-concept thought exercise”. A large amount of my Evernote stack consists of PDFs that are scanned or downloaded at home or at work. I wanted a quick way to drop those PDFs into Evernote and have them get filed and tagged appropriately, with minimal intervention on my part.

While the automatic sorting and tagging is relatively easy to do, I wanted to take it a step further and have the PDFs get sorted into the correct Evernote notebook depending on where I was currently working with my laptop: if I’m at work, sort those PDFs into my work stack. If I’m at home, put them in my personal stack. That saves me having to go back into Evernote and manually “drag and tag”.

In March of last year, David Sparks wrote about how he went paperless with Hazel and Evernote, and shared some really awesome Hazel rules that automate the renaming of his downloaded PDFs before passing them off to Evernote and into the right notebook with the correct tags. His examples are the base of what I’ve done here.

In January of this year, the Smile Software blog highlighted an app called Location Helper for AppleScript, which can be used in their snippets to get your lat/long coordinates. Using Location Helper is the glue that brings it all together.

All of this runs off of a watched folder in my Dropbox called PDF2EN and works on any file with a PDF extension that is dropped in there. Dropbox isn’t necessary, I just put all my stuff there.


The Embedded Script

tell application "Location Helper"set listCoords to get location coordinates
copy (item 1 of listCoords as text) to savedResult1
copy (item 2 of listCoords as text) to savedResult2
if (savedResult1 contains xxxx and savedResult2 contains yyyy) then
tell application "Evernote"
activate
create note from file theFile notebook {"work_notebook"} tags {"PDF", "sort", "work"}
end tell
else if (savedResult1 contains xxxx and savedResult2 contains yyyy) then
tell application "Evernote"
activate
create note from file theFile notebook {"jimchristian"} tags {"PDF", "sort", "personal"}
end tell
end if
end tell

Where xxxx and yyyy are the first four digits of your latitude and longitude, respectively.

After the script has run, it moves the PDF to the Trash.

In the screenshot below, you can see that I’ve commented out a couple of lines, which were used for testing. Rather than continually drop PDFs in the watch folder and see if they were moved to the correct notebook, in testing, the script will return “work” or “home” if successful.

image

 


Taking It Further

There’s probably a greater amount that could be done using Hazel and Location Helper, but as I mentioned, this was intended as a thought exercise.

While working on this, I wondered if it would be possible to tag Finder items depending on the location where they were created so that they could be filed away into specific folders – but exploring that will have to wait until another day.

Caveats

  • I’m not a programmer. The scripting could likely be simplified.
  • I’m not an expert on how latitude and longitude coordinates function either. I do know that this works for me.
  • I couldn’t get this to work when linking to a script elsewhere on my hard drive – it would only function when embedded into the Hazel rule.
  • I’m only using the first four digits that are returned with Location Helper, rather than the full set of coordinates. So, “fuzzy” GPS.
  • I got inconsistent location results when using OpenDNS and no results on a Thunderbolt Ethernet connection. YMMV.

Resources

  • Evernote
  • MacSparky: How I went paperless with Hazel and Evernote
  • Location Helper in the Mac App Store
  • Smile Software: Using TextExpander to Get Your Location
  • Hazel by Noodlesoft

Post navigation

← Exploding Head in Minecraft
3D Scanning LEGO R2D2 into Minecraft with an XBox 360 Kinect →

Looking for my Prompting Frameworks? They've moved!

February 2014
M T W T F S S
 12
3456789
10111213141516
17181920212223
2425262728  
« Jan   Mar »
  • Behind the Screens: Optimising My Newsletter With AI
  • Outdoor Summer Cinema
  • Cold Brew With Lemon and Dalgona at Home: Simple Summer Coffee Experiments
  • Perplexity does video generation now
  • Thoughts on Claude
  • August 2025
  • July 2025
  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • December 2024
  • June 2024
  • May 2018
  • March 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • July 2017
  • May 2017
  • March 2017
  • December 2015
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • April 2013
  • January 2013
  • June 2012
  • April 2012
  • March 2012
  • January 2012
  • December 2011
  • February 2011
  • November 2010
  • July 2009
  • January 2008

AI animation apple author tools automation bbc books camera gear Canon EOS M200 Claude coding content creation course creation education Elgato Prompter EOS Webcam Utility Pro Estonia Gaming garageband imovie Informatic AI ios iPad launch center pro lecture london mac mcedit minecraft newsletter os x personalization productivity raspberry pi Remote Resilience Hub restrictions scifi star wars tech technology textexpander URL schemes valencia video recording webcam software

  • Bluesky
  • Facebook
  • GitHub
  • Instagram
  • LinkedIn
  • Mail
  • Mastodon
  • Medium
  • YouTube
  • X
© 2025 Jim Christian | Powered by Minimalist Blog WordPress Theme