Mark Steyn, in National Review Online on Chuck Hagel’s trainwreck of confirmation hearing this week:
So five minutes later the handlers discreetly swung into action to “contain” Hagel. “I was just handed a note that I misspoke,” he announced, “that I said I supported the president’s position on containment. If I said that, I meant to say that we don’t have a position on containment.” Hagel’s revised position is that there is no position on containment for him to have a position on.
If I were a Department of Defense employee, I would be a tad worried. Don’t think so? Well, there’s this:
“There are a lot of things I don’t know about,” said Hagel. “If confirmed, I intend to know a lot more than I do.”
He then denied that “I will be running anything.” Don’t let the fact that the secretary of defense presides over 40 percent of the entire planet’s military spending confuse you. He’s not really “running” a thing — or, as he was anxious to assure us, “I won’t be in a policy-making position.”
A List Apart has been redeisgned to version 5. The folks at Hacker News are not very impressed. The cut-off header, especially with the nav bar on some pages, is a bit disjointed.
However, their style guide has some good tips for better writing.
In a previous post about Pinboard, I mentioned how I use OpenMeta tags to tag all kinds of different files on my local machine and then search for them using an app like Tags or Leap. The one missing piece is a script that goes through all of local copies of my Octopress blog posts, reads the categories and assigns them as OpenMeta tags. Not anymore.
For a while I have been using Hazel to copy new posts from my Octopress source/_posts directory to an Archive folder in my Dropbox (that also holds my Pinboard archive, my Twitter archive 1, etc). The script lives in this Archive directory and applies the tags to the copies, not the originals. This script requires the OpenMeta command line utility to be installed 2. Here are the highlights and the full script is here.
# Set ARCHIVE to a correct directory (and extension)require'yaml'archive="#{ENV['HOME']}/Dropbox/Archive/OctopressPosts/*.markdown"Dir.glob(archive)do|post|readin=YAML.load_file(post)title=readin['title']tags=readin['categories'].join(', ')%x{/usr/local/bin/openmeta -a #{tags} -p #{post}}puts"#{title}: #{tags}"end
First off, a big thanks to Brett Terpstra for helping me out with this script. And this is the very first script I have ever written, so it is very likely there is a better way to do this. There are some additional caveats that I’ll get to below. The script does the following:
Goes through every Markdown file in my Archive directory and reads the YAML front matter using the Ruby YAML module
Creates a variable, tags that holds a string of all the post categories, comma-separated.
Calls the OpenMeta command line utility to assign these tags to each markdown file.
The last puts line writes the post title and the tags to the terminal, which is useful if you call this script from the command line.
But having to fire up the terminal and run this script every time I make a new post wouldn’t very nerd-like, would it? I have another Hazel rule that looks at the Archive folder and runs the script when a new markdown file appears.
In order for Hazel to be able to run the script, make it executable with the following command in the terminal:
chmod a+x /path/to/your/script.rb
Notes and Caveats:
(All due to my status as a complete Ruby noob and easily fixed with some more knowledge)
Categories need be formatted as follows in the YAML front matter, with brackets. Even for a single category.
categories: [foo, bar]
It currently only works with single word categories. I use a few multi-word categories on this site like categories: [test, 'web design'], but this script would write three OpenMeta tags: test, web, and design. This is not a problem for me since all the other tags on my machine are single word. Since I have a fair amount of webdesign-tagged files from Pinboard, I used BBEdit to find all instances of 'web design' and replace with webdesign. Another reason why I do all of this on copies of posts–I can keep the two-word categories on the website.
This script is useful if you have a large collection of posts3, but not very efficient when run with the Hazel rule as new posts are archived, as it will unnecessarily process every file again (although it won’t duplicate tags). My next step would be a modified version that just writes tags against new files.
Update (30 Jan 13): Regarding point 3, here is a modified script that runs only on a single file. Use Hazel to trigger it on newly archived posts.
So Why Do This?
Tagging files make finding stuff much easier than drilling down into folders. I have over 1500 OpenMeta-tagged files in various places on my hard drive. Most are in DropBox, but many specifically are not, and I use a variety of tools to find them.
I really like the Finder replacement, PathFinder. You can tag files from the app and OpenMeta tags can be displayed in any list view. Here is a screenshot of my Octopress archive folder:
I also use Leap to search for tagged files across my computer. Here is a screenshot of my ‘octopress’ tag, showing archived Pinboard links, blog posts, nvALT notes, and a Jekyll screencast:
Leap also has a nifty tray that slides out from the side of the screen when you drag any file. Drop the file on it and a tag window with a list of recently used tags appears:
Tags.app is my go-to tagging mechanism. Shift-Command-Space brings up a window similar to Leap whenever a file is selected. Both apps are smart and use tag completion in their windows. Tags also has a search shortcut, which replaces the Spotlight search window:
OpenMeta tags are awesome and while their future in OS X is a bit cloudy, they are still a key tool for me for keeping things organized and finding them later.
The OpenMeta CLI documentation is a bit sparse, but from messing around with it, it basically uses this syntax: openmeta -a tag1, tag2 -p /path/to/file. The -a attribute ‘adds’ tags. You could use -s to replace all existing tags. I’m sure there are other options and tags can be passed a number of ways, but once I got it working, I stopped digging.↩
It took about 90 seconds to write tags to just over 400 posts in my archive.↩
Dangerous dangerous precedent here. If George W. Bush were doing this sort of thing, we’d be marching in the streets about it. Why does Obama get a free pass?
Very good question, Jason. Let me know when you get an answer.
Anyone in the press want to ask the President about the legality & moral stickiness of drone strikes at his next press conference?
I have added a list of post categories to my sidebar. It took about 10 minutes following Dan Watson’s instructions. There is one minor change if you are running Octopress version 2.1, as Dan’s instructions are for 2.0. and mention putting the new category_list.html template in source/_includes/asides and updating your default_asides line in _config.yml.
In 2.1, it appears that the asides directory has been deprecated and _includes/sidebars is used instead. Place the category_list.html template in the _includes/sidebars/sections folder, and add the following line:
{% include sidebars/sections/category_list.html %}
to one or more of the following files, depending on what pages you want this category list to appear in the sidebar:
blog_index_default.html # For the main page
page_default.html # For individual post pages
post_default.html # For any archive page
The new releases of both Evernote 5 for Mac and updated iOS versions serve to remind me that I’ve had Evernote installed on my devices for years, been a premium subscriber for at least three, and I have never really used any of them. I need to either make use of Evernote, or get rid of it altogether.
I’m a big fan of using OpenMeta tags for my documents, and Evernote’s tags are not compatible. As I’ve written previously, if I search for a specific tag on my computer, I get a list of all my tagged files: archived Pinboard bookmarks, nvALT notes, PDFs, folders, anything with that tag. I would have to search Evernote separately.
Which then begs the question: should I make Evernote my ‘everything’ bucket? Let’s see 1:
General notes: I use nvALT for these. Each note is an individual text file (which I can tag). I can draft a blog post in nvALT and preview it in Marked, with live updating. nvALT also has some nifty built-in Markdown shortcuts. Evernote loses on these counts. Evernote keeps its notes inside an internal database, which alone is almost a deal-breaker.2
Storing links: Sorry, Pinboard wins here. Again, see my previous post.
PDFs: The vast majority of my PDFs are e-books, or scanned personal documents. If I want to read a PDF book, I sent it to a ‘books’ folder on Dropbox and read it with GoodReader on the iPad, or send it to my Kindle app. My scanned documents get Hazel-ed away into folders that are specifically not in my Dropbox. Why? For security reasons, and I have yet to need immediate mobile access to any of my bills/receipts/vital documents.
One area where I think Evernote may be valuable is collecting things of a more visual nature. As a web design hobbyist, I often come across a sites with an interesting design element such as a color combination, or typeface. Admittedly, Pinboard is not the best place to store something like these visual snippets and I previously used Little Snapper to accomplish this, but the app hasn’t been updated in a while and there is no mobile capability. Evernote has some good tools for screen-capture or copying an entire web page and the iOS apps have a nice capability to take a picture of something and save it as a note.
I may keep Evernote around to fill this very narrow niche of collecting notes of a visual/design-related examples.
Update (22 Jan 13): My observations are somewhat in line with Eddie Smith’s. His thoughts regarding PDFs are interesting.
As I write this, I’m listening to Mac Power Users episode #117. Katie Floyd’s use-cases for Evernote aren’t making any convincing arguments and David Sparks’ responses coincide with mine. Considering I have borrowed many of David’s workflow tricks, this is not surprising. ↩
There are two export options: HTML and an .enex archive that is actually XML. If you want a very simple markdown note to export littered with <div> and <br> elements, then you are in luck.↩
Is it too late for a “start the new year” post? One of my “resolutions” for 2013 is to be more productive; less surfing/fiddling, more doing. With that in mind, I recently spent a fews days doing the following:
Emptied Mail.app Inbox. Zero’ed it out.
Reviewed, reorganized and scrubbed OmniFocus: every project, context and task
Cleaned out RSS Starred list, with a bunch going to Pinboard
Cleaned out Twitter Favorites
Cleaned out Instapaper. Now it only has things that are to be read…later.
Re-organized nvAlt notes; delete, combine, tag and title
Deleted a bunch of unused apps on the MacBook Pro, iPhone, and iPad
Desktop Inbox folder (apps to tryout, random downloads) nearly emptied
Desktop folder for inbound scans emptied. Paperless FTW.
Cleaned out Safari bookmarks. Some of those hadn’t been clicked in a loooong time
Started changing passwords. Along those lines - removed access to Dropbox for apps I no longer use. Ditto for Twitter.
It has been liberating. Now time to get to work, and hopefully not fill all those buckets back up with unnecessary crap.