After blogging that Shortform mockup, I kept finding myself needing the app itself, so I went ahead and started writing it. It’s very much a draft and not polished, but the core is there, and it’s usable enough that I turn to it quite often.
You can create notes.
Notes are autosaved to a folder specified in preferences.
Notes are reopened when you open the app, like with Stickies.
Create new note with the contents of the clipboard
What’s not implemented yet
Console. I made a first failed attempt (which messed all the window layout up) and need to try again.
Title bars. I’ve decided I don’t actually want them — they look nice, but since you can drag a note using the margin on any side of the window, and since you can use keyboard shortcuts or the menu item to close the current note, the title bars aren’t really necessary.
Note that this is my first OS X app, so I’ve undoubtedly flubbed a number of things. But I do have to say that Cocoa is a very nice framework to work with — I was able to get to this point far more quickly than I expected to. And Objective-C is — dare I say it — growing on me a little.
Lately I’ve been itching for a way in OS X to quickly create temporary sticky notes but with Markdown support and with decent text processing (regex find-and-replace, etc.) and with the ability to type first and act later (like Drafts for iOS). The default Stickies app doesn’t really fit the bill (and it isn’t pretty).
So I’ve mocked up an OS X app I’m calling Shortform:
I don’t know if I’ll actually write the app (Cocoa learning curve and other pressing needs, etc.), but since the likelihood of someone else writing it is very small, that may have to be what happens. Things of note:
Console and reusable actions. In the upper left note, you can see a console at the bottom. It’s a command line for text editing, basically. There’d be built-in commands (like replace or trim or what have you) along with ways to send the text elsewhere (email and web services being the two main ones I’d use). You would also be able to save a sequence of commands into a reusable action.
Keyboard shortcuts. Lots of configurable shortcuts — new note, new note with clipboard contents automatically pasted in, shortcuts for custom actions, etc. And a global shortcut to focus the app.
Markdown preview. The middle note (with the green header) shows a preview (processed through Markdown to HTML with some CSS). I’m thinking notes could be in either edit mode and preview mode, rather than having two separate windows.
How I think I’d use Shortform:
Quick text processing. I often need to do a quick regex on a snippet of text — adding hyphens to the beginning of a list of things, for example.
Temporary notes while I’m working on something. Stuff I need to write down but don’t care to keep in a longer-term notebook. That’s how I use Stickies right now.
Quick entry for blog posts, etc. I love Drafts on iOS. Type first, then do what you need to do with it. It’s particularly useful with web services — I can type a note, then send it to whichever one of my Vinci notebooks I want.
Anyway, at this point it’s just a mockup. If I do end up building it someday, I’ll let y’all know.
For a while now I’ve used option-0 on OS X to type a degree symbol, primarily for tweets about how blasted cold this winter has been. But I’ve accidentally transgressed. That symbol (º) is not in fact a degree symbol, though it sure looks a lot like one. It’s actually an ordinal indicator. Sayonara to my typographic street cred…
To get the real degree symbol (°), type option-shift-8 instead. Now if only I could go back and edit all those tweets… (I blame iOS, where holding down the 0 key does in fact get you a degree symbol.)
Getting PIL working on Lion was a little more difficult than I thought it’d be. (I use PIL in Ink to resize images.) It appeared to install correctly, but when I tried to post something with an image, I got this:
ImportError: The _imaging C module is not installed
I followed the instructions at appelfreelance.com, but libjpeg wouldn’t compile, giving me this error:
checking build system type... mkdir: /private/tmp/PKInstallSandbox.vMj5ds/tmp: No such file or directory
mkdir: /private/tmp/PKInstallSandbox.vMj5ds/tmp: No such file or directory
config.guess: cannot create a temporary directory in /private/tmp/PKInstallSandbox.vMj5ds/tmp
configure: error: cannot guess build type; you must specify one
Turns out TotalTerminal had oddly set $TMPDIR to /private/tmp/PKInstallSandbox.vMj5ds/tmp, which obviously broke other things. I cleared it out (export TMPDIR=) and got libjpeg to compile.
But PIL still gave me this error when I tried to import _imaging in Python to test it:
ImportError: dlopen(/Library/Python/2.7/site-packages/PIL/_imaging.so, 2): Symbol not found: _jpeg_resync_to_restart
Referenced from: /Library/Python/2.7/site-packages/PIL/_imaging.so
Expected in: flat namespace
Oh joy. When I ran otool -L /Library/Python/2.7/site-packages/PIL/_imaging.so, libjpeg didn’t show up in the list, either. I recompiled and reinstalled libjpeg and PIL a few more times. No luck.
The final solution: I installed libjpeg via Homebrew (brew install libjpeg), then compiled and installed PIL (Imaging 1.1.7). That fixed the _imaging.so problem and PIL now works like a charm.