There are many solutions for OS X Yosemite (open source, free or paid apps) to stay up to date with the latest BTC/USD exchange rate (the list to the Github repos can be found below). I wanted a simple solution that I can hack in a few minutes on a lazy Sunday night. The solution is a simple Today widget. To get the result in the shot below, continue reading.
All you need is Today-Scripts (a simple OS X app that allows you to run shell scripts in your Today bar) and a small Python script and you’re set. Follow these instructions get the desired result:
Download the latest build of Today-Scripts (latest build) or if you prefer, compile your own version from source code (Github Repo)
Create a new python script (anywhere) from the following gist (get_data.py). The scripts calls the Coinbase REST api to get the latest price.
Using Today-Scripts select the ksh shell and specify the python interpreter to use followed by the script’s absolute path (if you find a more elegant solution for this, drop a line in the comments section below)
One of the most annoying things about using Mac OS X is the difficulty in swiftly copying a file or folder’s absolute path. Yes, you can open the ‘Get Info’ popup and copy the directory, but for the lazy (like me) that’s too much work for something so simple. The alternative? Automator + Keyboard Shortcuts. For the below, I’m using OS X 10.9.3.
Step 1 – Open Automator (Spotlight -> Automator) and select ‘Service’ as per the screenshot below.
Step 2 – Search for ‘copy’ in the ‘actions’ list and drag ‘Copy to Clipboard’ to the right panel.
Step 3 – Change the ‘Service receives selected’ to ‘files and folders’ and in to ‘Finder’.
Step 4 – Save the service (File -> Save) and name it ‘Copy path to clipboard’ or something else you deem relevant.
Now we need to create a keyboard shortcut for this newly created service.
Step 5– Go to ‘Keyboard’ in the ‘Settings’ menu and select the ‘Shortcuts’ tab.
Step 6 – Select ‘Services’ from the left list and look for the newly created service in the list on the right. Once you find it, I named mine ‘Copy Paths as Text’ assign a keyboard shortcut to it.
Now you can select any folder/file, press the keyboard shortcut combination and paste the absolute paths anywhere needed. Mind you, with this service you can select multiple folders/files and get all their paths.