Speaking from the Command Line

One of eight tips from [Mitchell Cohen][] points out that you can not only use Mac OS X’s built-in *Text to Speech* engine from the command line (`say “some text”`), but, even more usefully, you can save the results to an audio file–again, all from the command line:

say -f mytext.txt -o myaudio.aiff

[Mitchell Cohen]: http://www.mitchchn.me/2014/os-x-terminal/

Papers (Reference Manager Software)

I am just about done with moving a wide variety of research materials into the research management application [Papers][]. After trying to embrace Zotero for several years and never finding myself using it, and I recently found that the Application Support directory for Zotero had grown to an astonishing 2.82 GB. By comparison, my new Papers support directory, which has more material in it, weighs in at 268 MB. Quite a difference. I by no means mean to diminish Zotero: it is a fine, community-sourced app that is trying to be many things for many people. But its interface was always a limitation for me, and it has limited support for writing applications outside of Microsoft Word. (It’s RTF scan functionality never worked for me.)

I chose Papers over Sente for a couple of reasons:

1. Papers is cross-platform, and, like my writing application of choice, [Scrivener][], appears to be a Mac app that developed such a fierce following that demand for a Windows version made it a compelling option. By being cross-platform, like Scrivener and like Lightroom, my workflow is not tied to any particular platform, only to a small collection of developers who have shown their interest in providing excellent software and support for their paying customers — and I don’t mind paying at all for good work, and both these apps represent that, I think.
2. While I respect Sente’s move to address problems its users were having with DropBox syncing, forcing me as a user to sign up for their service and face an additional charge is an additional cost which I resent. If there were a clear way to support a local syncing infrastructure, I might have explored Sente more. I certainly found their dual note/quote stream very compelling, and I will urge the developers of Papers, at some point, to pursue that more. (For those interested in the dollar amounts: Sente’s free account is limited to 100 references per library — libraries are unlimited, so I guess one could simply produce an infinite number of libraries in hopes of never paying. Each library is limited to 250MB in attachments. After that, you need to pay $50, $30 for academics, for an expanded library.)

I was very close to purchasing Sente, for the dual note-stream of quotations and notations mentioned above, but I balked at the added cost of syncing. Papers’ syncing requires that the two devices be on the same network, but here’s hoping that its developers eventually realize that working with the DropBox library is preferable for some users. (I understand, however, that that could lead some users to have both apps open at the same time and make conflicting changes to the library. If the Mac app handles the syncing with the iOS app directly, this can be avoided.)

Why a reference manager? So I can do away with all the various `/sources` directories I have created in every single project directory for the last two decades. Doing so and working with sometimes overlapping projects meant that I either moved sources around or created duplicates — and if you have ever annotated one copy of a PDF and then lost that copy, with all your really good notes and highlights, you know it’s the same pain as loaning out a favorite book with all your marginalia and have it never come back: some part of your long-term memory has just been lost.

I already feel saner with having a central location in Papers. I haven’t used the application long enough to warrant the trust I currently feel, and I will certainly report any issues or problems I come across. Perhaps by summer’s end I will be able to give a better evaluation of the app’s utility and fidelity.

[Papers]: http://www.papersapp.com
[Scrivener]: http://literatureandlatte.com

Rebuild Launch Services!

The actual title of this post should probably be something like *If the **Open with…** contextual menu has duplicate entries in it, then do this.” But that seemed overly long. The problem with mentioning *Launch Services* is that most people don’t know it’s there and that it’s responsible for such things. Here’s a better way to do this, if you get a contextual menu in the Finder which looks like this:

Screen Shot 2013-04-18 at 08.33.06

And you want to do something about it,
and you want to attend to the fix yourself,
and you aren’t afraid of the terminal…

*Then*, you can do this: open up a terminal window (look in the Utilities folder inside the Applications folder [CMD + SHIFT + U]), and paste the following code in the command line:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

It’s long, but it needs to be just that way. Press return. Wait a second or two for the command to complete. You will know it’s done when the prompt comes back, indicating that it’s ready for another command.

*Then* simply re-launch the Finder. (Under the **Apple** menu, go to **Force Quit…** and you will see *Finder* listed as one of the apps that can be quit, or in the Finder’s case, re-launched.) You do not, as other instructions around the web indicate, need to log out and back in, nor do you need to re-start your machine. Running the command above and re-launching the Finder is all you need to do.

Mac OS LSM Reference

Apple’s `LatentSemanticMapping.h` documentation is [here](http://developer.apple.com/library/mac/#documentation/LatentSemanticMapping/Reference/LatentSemanticMapping_header_reference/Reference/reference.html#//apple_ref/doc/uid/TP40011480).

And [here](http://pypi.python.org/pypi/pyobjc-framework-LatentSemanticMapping/2.3) is the Python Package Index page for the `pyobjc` framework to access the Mac OS LSM … which makes it very clear that I’m not ready to do anything with it. (It notes that Apple’s documentation is sparse, at best, and that you’ll need to be comfortable with `pyobjc`.)

One other possible culprit for the `sandboxd` items showing up in my Mac’s console: the System Management Controller. Here are [directions for resetting the SMC](http://support.apple.com/kb/HT3964?viewlocale=en_US&locale=en_US).

Lion Diskmaker

[Lion Diskmaker](http://blog.gete.net/lion-diskmaker-us/) also works for Mountain Lion: “Lion Disk Maker is an application programmed with AppleScript that you can use with Mac OS X 10.6, 10.7 and OS X 10.8 to burn a DVD or build a bootable drive from Mac OS X Lion or OS X Mountain Lion Installation program. As soon as you launch the application, it tries to find the OS X Install program with Spotlight. Then, it proposes to build a DVD or create a bootable install disk.”

I’ve heard lots of good things about it and it does make it possible to do a clean install of the OS, something I am considering because of [the rise of kernel_task](http://arstechnica.com/civis/viewtopic.php?f=19&t=1179717).