2011


31
Dec 11

Making Safe URLs

I need to do this often enough, I wrote a macro with some Python for it. The macro converts a url with invalid characters (such as spaces) to a safe encoded url. Importantly, the forward slashes, colons, question marks, equal signs, quotes and hashes that are necessary to pass queries and parameters are untouched by the conversion.

A common example for me is as follows.
Select a URL that has bad actors in it:
http://www.macdrifter.com/wp-content/uploads/2011/12/$$shomer fucking?.jpg

Run the macro and the idealized URL is inserted in its place:
http://www.macdrifter.com/wp-content/uploads/2011/12/%24%24shomer%20fucking%3F.jpg

Here’s the Keyboard Maestro Macro:

Here’s the Python script that does all of the work:

#!/usr/bin/env python
from urlparse import urlparse, urlunparse
import urllib
import os

# Get values from Keyboard Maestro workflow
kmVarClipBoard = os.getenv('KMVAR_tempClip')

# Create a parsed url. See: http://docs.python.org/library/urlparse.html
o = urlparse(kmVarClipBoard)

# Remove unsupported characters. '/' is a safe character
newPath = urllib.quote(o.path, '/')
newParams =  urllib.quote(o.params, '/')

# Create a new tuple with our new quoted path as a replacement
n = o[0:2] + (newPath ,) + o[3:]

# Reassemble the entire url
baseUrl = urlunparse(n)
print baseUrl

Of course, if this is passed something that is not a url, then it will throw an exception. If that’s a concern, then check one or more of the url parse values to make sure there is a domain.


31
Dec 11

Hazel’s App Sweep

You are using Hazel’s “App Sweep” feature right?


Hazel App Clean Up

It’s in the “Trash” pane of the Hazel control panel. Whenever an application is put in the trash, Hazel automatically offers to clean up any detritus associated with the application.


App Sweep


30
Dec 11

Junecloud Automator Actions

Junecloud makes the terrific Delivery Status widget and Delivery Status Touch for iOS. If you do a lot of package tracking, these are the best tools available.

But I noticed that they also provide a free set of Automator actions that are very handy.

  • “Save for Web” generates images with specific size and quality settings.
  • “Make Names Web-Friendly” replaces spaces and other special characters to web friendly characters such as underscores.
  • “Create Clean Archive” makes a zip archive but removes all of the resource forks and Mac specific cruft.
  • “Create Symbolic Link”

Good stuff.


30
Dec 11

Path Finder, The Finder For Geeks

Path Finder is one of the unspoken heroes of my Mac. It’s been around for years and it’s one of my secret tools for working with files. It’s the Finder for geeks. Here’s an overview of some of Path Finder’s most helpful features.

The Shelf

The Path Finder shelf is a temporary holding place for files. Once loaded up, all the files on the shelf can be manipulated as one group. This is a pretty big time saver for me. I can hunt and peck through multiple folders, placing individual items on the shelf as I go. When I’m done, I can grab them all at once and move them to a new directory in one shot. Each Path Finder window gets its own shelf too.

 

 

Copying That Really Works

Whenever I have a problem copying large files or copying a large number of files in the Finder, Path Finder is the solution. Path Finder has some kind of magic ability to copy, move or delete files that the Finder chokes on.

 

 

Integrated Tools

Path Finder is Swiss Army Knife of file browsers. There’s a huge number of option available other than just browsing files.

  • Open a selected file or folder in the terminal. Path Finder even presents it’s own Terminal instance in a browser pane.
  • Preview a file right in the Path Finder browser.
  • Built in text editor. View a file and edit in place.
  • An expanded “Get Info” option. The Path Finder info panel is more detailed and provides push button control over file privileges.
  • Aggregated info for a large number of files. Ever hit CMD-I on 20 files at once in the Finder. It’s a mess. Path Finder does it right. All the info is displayed in a single window.
  • Need the path of the selected file? Path Finder provides a number of options for the format of the path.
  • View and kill processes right from the browser. It even shows the previous applications greyed out at the bottom of the list. There’s also a nice pop-up application launcher.

 

 

The UI

The Path Finder UI is familiar enough that a new user can jump right in and start leveraging it’s power. However, there are a number of additional view options for tweaking the interface for a power user.

  • Tabbed Finder windows!
  • There are side bar favorites, but there are also hierarchical favorites in the tool bar. This makes quick work of diving into deep folder hierarchies.
  • All view options are available in a single popover panel. This makes adjusting and sorting a folder very easy.
  • Dual File Browsers. That’s two browser panes in one window.

 

List Options

List Options

 

Replace the Finder

Path Finder provides an additional option if you really prefer it to the traditional Finder. Path Finder can replace the Finder. That’s right, it can kill the Finder and run in it’s place when you startup. I do not run it this way. I typically bring out Path Finder when I have a specific task to accomplish.

Scripting

The native Finder has a lot of functionality available in AppleScript, but Path Finder adds to that with an extensive AppleScript dictionary. There’s a lot to like, but if that’s not enough, there is a complete SDK for Path Finder. Unfortunately, I have yet to see any plugins made available by third parties.

 

 

Conclusion

I tend to not think about the Finder until I hate it. When that time comes, I quickly open Path Finder and get some real work done. Path Finder is like a Finder for the nerds. I certainly wouldn’t give it to my mom. But then again, the Finder is no great gift either.


29
Dec 11

More ReadNow

I gave a brief thumbs up to ReadNow a few days ago but I always intended to give the application a deeper review after I had more time with it. I’m here to tell you that it has changed the way I use Instapaper.

Instapaper, Then

I love me some Instapaper. Well, I love to put things into Instapaper. Instapaper has become the bottomless inbox that every procrastinator hopes for. It’s a place I put aspirations. A home for the things I wish I read more intently but just skimmed instead.

Instapaper was my guilty conscience. Every time I opened the app on my iPad, I felt like I needed to go to the bottom and force myself to work to the top. But of course that didn’t happen. So I’d make little deals with myself. Read a few from the bottom and a few from the top.

I’m not sure where this psychology comes from. I think it’s the layout of the iPad app. Maybe it’s how the folders are hidden away. Whatever it is, I feel like I failed with Instapaper.

Instapaper, Now

My relationship with Instapaper has changed since I installed ReadNow[1]. As Reeder is to RSS, ReadNow is to Instapaper. I feel comfortable just sitting and browsing my Instapaper collection. Searching and organizing is natural. If I randomly land on an article I can easily drag it to a folder or just read and delete it. I can also easily send it to my real bookmarking service, Pinboard.in.

ReadNow Review

The layout is very similar to Reeder for Mac. Instead of a list of feeds, ReadNow presents a list of Instapaper folders. Browsing is fast and the article display is clean. I especially like the dark layout option which is light text on a black background, which is exactly how I keep Instapaper on iOS. Not surprisingly, ReadNow presents articles the way Instapaper presents them: clean and concise without distractions.

 

 

readnowimg

 

 

Sharing

ReadNow provides a number of options for sharing articles. It integrates directly with Twitter, Pinboard, Delicious[2], Evernote and Facebook. I only have experience with Twitter, Evernote and Pinboard but the sharing features work perfectly with those services. The original link is shared but I’d like an option to share the Instapaper link as well. There have been a number of times I just wanted to send an article to someone and they were blocked by some ridiculous paywall or required iOS app. I no longer share those links.

 

 

shareimg

 

 

Organizing

ReadNow provides drag and drop access to Instapaper folders. It’s much quicker to organize articles in ReadNow than it is on my iPad. ReadNow also provides access to folder creation, renaming and deletion in Instapaper. ReadNow provides direct access to a folder both in-app and on the web. Ctrl-clicking a folder provides an option to open the Instapaper folder on the web. That’s a nice touch. The application does seem to lack a function to reorder folders, which I sorely miss.

 

 

folderimg

 

 

I’ve taken a much more flexible approach to organizing articles in Instapaper since using ReadNow. For example, I’m trying to brush up on Vim so rather than just read a bunch of articles, I organize them into an Instapaper folder called “Vim.”
Now I have a nice group of good articles about this single topic. Sure, I do something similar in Pinboard, but Instapaper is a honored place. I throw everything into Pinboard, while Instapaper only gets the good stuff. Instapaper is curated.

Searching

Article searching is fast and accurate. Only articles that are synced can be searched Since the maximum number of archived articles that can be synced is only 500, there is some limit to the usefulness of searching in the app. This is not the deep searching that a premium Instapaper account provides. The search in ReadNow only looks at the Title, URL and Tags (which I assume are folder names). It’s not possible to search all of the content. However, it is possible to search within a single article, which is nice.

 

 

searchimg

 

 

The advantage of only searching a small collection of articles, is that the search is nearly instantaneous and real time. Articles are filtered as search terms are completed. In this case curation and limitations do provide some benefit.

Options

ReadNow gets it right with application options. The preferences provide a good amount of control over the experience. For example, the article syncing can be limited from 25 to 500 articles for the reading list, liked or archived articles.

 

 

syncimg

 

 

ReadNow also provides global hot keys for getting articles into Instapaper and gesture support browsing articles. ReadNow also provides an option to automatically archive an article if it is opened in the browser or the space bar is tapped while reading. Much like Reeder for the Mac, ReadNow provides a dizzying array of keyboard shortcuts for just about every action, which makes keyboard surfing Instapaper a real possibility.

 

 

readimg

 

 

Conclusion

If you haven’t guessed by now, or you skipped to the conclusion, I really like ReadNow. It’s changed the way I use Instapaper. I still have some guilt about my Instapaper backlog, but I’m starting to use it like a bookmarking service that also provides a great reading experience. What’s important, is that I’m culling the collection and actually reading a lot of great content that I forgot about. I’m remembering what I really enjoyed about Instapaper.


  1. Affiliate link  ↩
  2. If you’re still using Delicious, then I doubt you’re an Instapaper user. Delicious is the antithesis of Instapaper.  ↩

29
Dec 11

New Apple News!

Experiment:
Every time a site mentioned a theoretical Apple product due out soon, I deleted them from my RSS feeds.

Results:
I deleted about 10 feeds before I realized this was going to get ugly.

Conclusion:
Theoretical Apple news is a popular topic for lazy writers.

 

Sorry about the sensational title. I feel dirty.


29
Dec 11

Tweet Seats? Really? [Link]

Special seating for Tweeting and “Live Blogging”[1]

Just stay home then. Seriously. For the good of society. Unrelated: voluntary sterilization is legal.


  1. As opposed to “Dead Blogging” I presume.  ↩


29
Dec 11

Limbo Game [Link]

Neven Mrgan’s recommendation. He knows a few things about great games.


29
Dec 11

Numbers and Beer

My previous look at a beer inventory system focused on Bento. In this overview, I’ll explain my experiences while using Apple’s Numbers for the same purpose.

Using the Mac

Numbers already stands out as the best general spreadsheet application on any platform. But this is not a Numbers review. How does it work as an inventory application?

Not surprisingly, it works like a spreadsheet. That’s not necessarily bad. The Numbers interface is nice. Entering data is easy and getting it back out is as simple as can be. Importantly, exporting to a CSV file means the data is completely portable.

display

 

Unfortunately, images don’t work so well. If I want to include pictures of the bottle, then I can not export from Numbers to CSV. Exporting removes all all images (as expected). If I were to rely on Numbers for my inventory, I would be sure to leave out images.

Data Portability

I’ve delayed this post waiting for an iWork update from Apple. I was waiting for iCloud to come to the Mac in some meaningful way. That has not happened which means iWork has no automatic sync between the Mac and iOS. Data is transferred in the awkward yet traditional way of export and email.

Exporting is straight forward. In fact, if you have a OmniOutliner on the Mac there is even a trick to export from Numbers into OmniOutliner. Simply copy your numbers table and paste it as plain text into an editor like BBEdit. Save as a “.txt” file. You can now drag that file onto OmniOutliner to get a rough version of your spreadsheet except as an outline.

Beyond that, Numbers provides several other options for exporting. On the iPad you can email as a Numbers, PDF or Excel file. But Numbers brings some super-powers to the game if you want to share your content with someone else. Simply share a document via iWork.com (remember that?) and the app automatically generates an email to send to anyone that you want to share with. This is a special email though, because it also registers the recipient as a viewer of the content. That means, even though the content is on the web, it’s not publicly available. Only specified recipients can view it.

The content looks great on iWork.com too. Here’s a screenshot of the web page. Just perfect.

iwork

Sort and Search

Sort and search is great in Numbers. Searching is fast and highlights the hit term with a visual queue. There’s also a list of all hits so that I can scroll through hits easily.

Search Form

Beyond standard sorting (sorting by column headings) Numbers provides a couple of other options for categorizing. The categories can be combined with filtering to create a lean and condensed version focusing on a few items while also providing some context. For example in this screen shot I’m looking at all stouts with grouping by breweries.

 

 

 

Miscellany

Another nice feature in Numbers is the wide range of column data types. The options are comparable to Bento. It’s flexible and easy to setup.

It’s also easy to setup a custom view into a data table with logical formatting. For example, highlight cells with a value above or below a specific number or date. I use this to identify entries that are missing data or that have a rating above 3. It’s a nice visual queue and very easy to setup. It’s also a feature that really sets a spreadsheet apart from most other options.

formatting 

 

formatted

 

Using the iPad

The iPad version of Numbers is very approachable. There’s little setup and the app is full featured. I did not experience any issues when transferring a Mac version of the inventory to the iPad. Equations seem to work but some formatting was lost. It wasn’t an exact duplicate of the Mac version but it was good.

Sharing

The iPad version provides several options for sharing, including email and upload to iWork. I held off on this post, waiting for iCloud sync to be announced, but sadly there still is not a seamless mechanism for working in Numbers across multiple platforms. In this regard, Bento still wins with WiFi syncing.

Data Access

Numbers on iPad excel in one huge way over Numbers for the Mac: The input form. Any iPad spreadsheet can be accessed through a simple and attractive form. It makes data access far easier than tapping on small spreadsheet cells. The form view is how Numbers should be used. I only use the spreadsheet view for setup and to get a 30,000 foot view of the data. All data entry and browsing happens through the form view.

iPad

iPad Form

Using the iPhone

Forget trying to use Numbers as a spreadsheet alternative on an iPhone. Unless you only have a single column in your spreadsheet it will frustrate you to the point that you would rather use a ledger book.

iPhone

However, the form view on the iPhone is great. It feels natural and it’s easy to add records. Unfortunately search only works in the spreadsheet mode which is minuscule.

iPhone Form

Sharing

I have not used iWork.com much but I have to say, this is where Numbers succeeds. I can share a private link with anyone through email. That gives them the ability to view my entire inventory in a web browser. I can also make the list public. It’s not great for group editing, but it’s still nice. Sure Google Docs could do this too but it does not come with an elegant iOS app. iWork does give the recipient the ability to download and use the list for themselves.

Pros

  • Data portability
  • Excellent sharing options
  • List and Form views
  • Functions
  • Column data types
  • Available on Mac, iPad and iPhone
  • Summary rows
  • “Sync” over 3G

Cons

  • Poor data syncing
  • No auto-suggest for text entry
  • Awkward interface
  • Poor Search options

Conclusion

Bento still wins for easy entry and data access on iOS. The lack of support to take a snapshot and add it to an entry makes Numbers less than ideal for me. I really like to capture the label of an interesting beer so I can show it to a supplier. It makes it easier to find in my collection too. Images are also stripped out

Next up in this series is OmniOutliner. Believe it or not OmniOutliner can be used for more than an outline.


28
Dec 11

Markdown in Python

A nice Python module that works well.


28
Dec 11

Kickstarter Turining Into eBay?

iPen is a rebrand of another commercial product (or three).

Isn’t this sort of thing against the Kickstarter EULA?

“It seems as if, rather than requiring funding to get off the ground, Cregle has used Kickstarter to attract attention and gain developer support.”


28
Dec 11

UCLA Professor Charged in Death of Researcher

Frightening story from ChemBark.com

My graduate work was done in synthetic organic chemistry. This story is particularly close to me since I too have been engulfed in flames caused by t-Butyllithium. I was not seriously injured but I can tell you that few lab workers are properly trained to handle the incredibly dangerous materials required to earn an advanced degree in organic chemistry. While I was on fire, not a single person present (there were at least 3 people) knew where the proper extinguisher was located or how to use it. I had the presence of mind to walk (while I was on fire) to the extinguisher for pyrophoric metals, pull the pin, turn it on myself and pull the handle for 5 seconds.

I think this case has a good chance of changing the way things are done in academic labs. It’s sad that someone had to die and my heart goes out to Sheri Sangji’s family and friends.


27
Dec 11

Markdown to WordPress in Python

I got part way down the rabbit hole before I found this nice looking Python project. It looks very complete. The GitHub project is worth a look too.

The python allows writing in Markdown with meta-data headers and then posting directly to a WordPress blog.

I might still continue with my work since I like using Marked to get the HTML for a post. Marked provides a beautiful preview of the post as a sanity check. If you see some wonky looking posts in the future, it’s a good chance I I’ve started posting using a Python script and didn’t consider some edge-case.[1]


  1. This post was written in MultiMarkdown Composer, previewed with Marked and then uploaded from a Keyboard Maestro macro. Yeah, I think I’ve gone off the rails this holiday break.  ↩

27
Dec 11

Fugly

If they are looking to add the word “fugly” to the dictionary, I have a good example they can use for the definition.


27
Dec 11

The Umbrella Man [Link]

Great NYT video.

“You can never, on your own, think up all the non-sinister, perfectly valid explanations for that fact”

By way of SwissMiss