Posterizer
Last month I introduced Posterizer, a simple little program that reduces images to a handful of key colors you select. Rather than postpone it indefinitely until I’m completely satisfied with it, I’ve decided to release what I’ve got so far.
Download Posterizer Test Release (Mac OS X Universal Binary, 2.9MB)
The documentation on packaging a Tcl/Tk script as this kind of stand-alone application bundle is sparse, so the remaining rough edges stem from this experimental integration.
Posted on Sunday, June 3rd, 2007.
Isecalc
Isecalc is a new LDraw utility by Philippe Hurbain. It computes the intersection of two parts (useful for part authors).
Happily, it is Mac compatible. I built Isecalc with the following command:
g++ Isecalc.cpp -arch i386 -arch ppc -o Isecalc
The -arch
options are only needed to produce a universal binary.
Posted on Saturday, June 2nd, 2007.
Expanded Yojimbo Comment Fields
This hack tweaks Yojimbo’s bookmark, serial number, and password editors so that their comment fields expand to fill the remainder of the item pane. Before and after:
Download Expanded Yojimbo Comment Fields (33k) for Yojimbo 1.4
Download Expanded Yojimbo Comment Fields (34k) for Yojimbo 1.5.1
The download contains three modified Nib files and a readme explaining how to install them. Proceed at your own risk.
Posted on Monday, May 21st, 2007.
Save Selection Service
The Save Selection service allows you to immediately save the selected text in any application. When you invoke the service you’ll be asked where to save the selection. That’s it! No need to copy and paste into a separate text editor.
Download Save Selection Service 1.0 (33k)
The service file goes in ~/Library/Services/
and is invoked from the Services submenu of the application menu. Here is the AppleScript source code:
on process(_selection) tell application "System Events" to set _appname to the name of every process whose frontmost is true tell application (_appname as string) to set _file to choose file name with prompt "Save the selected text as:" default name "Selection.txt" set _fp to open for access _file with write permission write _selection to _fp close access _fp end process
This service made with ThisService.
Posted on Sunday, May 20th, 2007.
Bookmark in Yojimbo 1.2
A new version of my Bookmark in Yojimbo script is available. It now checks for duplicate bookmarks and is compatible with Firefox. I use this daily.
Posted on Friday, May 11th, 2007.
Backdate Yojimbo Import
When you use this script to import files into Yojimbo, the imported items are automatically assigned the creation and modification dates of the original file (Yojimbo normally records the date of import as the creation date for imported items). Now you can easily preserve the chronological relationship between imported files.
This script is based on the similar Backdate Yojimbo Items script I wrote a few days ago, which is better for isolated corrections than bulk backdating. The same warnings about unsupported database manipulations apply.
Download Script: BackdateYojimboImport.scpt.zip (13k)
Download Droplet: BackdateYojimboImport.app.zip (35k)
Both versions work exactly the same, except that you can drag files (or folders) onto the droplet icon to import them (or their contents). The droplet appears in the Dock when invoked, whereas the script version runs transparently. A good place to install the script is ~/Library/Scripts/Applications/Yojimbo/
.
When you invoke the script, a file chooser will appear. You can select multiple files to import by Shift- or Command-clicking. (If you would rather select folders, look at the code. It is a trivial change.) The backdated timestamps will not appear in Yojimbo until you restart the application.
Posted on Wednesday, May 9th, 2007.
Mariano Who?
In Afton’s first little league game of the season, visiting Afton beat Greene 8 to 7 in three innings of play (ended early on account of it being a school night). After two innings at second base, closer Joe DeVona was called to the mound, where he recorded two strikeouts and the save in his pitching debut. Afton remains on the road this weekend, when they hope to carry their winning momentum into an afternoon game against Hancock.
Posted on Wednesday, May 9th, 2007.
Backdate Yojimbo Items
An issue that has recently arisen on the Yojimbo mailing list is that imported items are considered created at the time of import. This is logical, but some people would prefer to retain the creation date of the original file. Enter “Backdate Items,” an AppleScript for Yojimbo that gives you the ability to change the creation date of existing items:
A word of warning: this script modifies Yojimbo’s database directly using sqlite3. This is quite certainly an unsupported way to manipulate your data. In fact, Apple clearly states that Core Data files like this should not be tinkered with:
While it is easy enough to look under the covers and see what is going on with the XML and SQLite data formats, you should never modify the data in these files yourself.
But I tinker. If you do, too, please back up your ~/Library/Application Support/Yojimbo/Database.sqlite
file first. Consider yourself warned that this script could potentially mangle that database.
Download Backdate Yojimbo Items Script 1.2 (11k)
Install the script in ~/Library/Scripts/Applications/Yojimbo/
. Usage:
- Select some items in Yojimbo’s list pane.
- Invoke the Backdate Items script.
- Enter the desired date and time in any supported format.
- Click “Creation” or “Creation & Modification” to reset the corresponding timestamps.
- Changes will not be visible until you restart Yojimbo. You may backdate more than once before restarting Yojimbo, but don’t edit a backdated item until you’ve restarted Yojimbo or your changes may be lost.
Examine the script for more information about how it works. The SQLite Database Browser can also be used for this purpose, but you’ll have to manually convert dates to seconds since January 1, 2001 00:00:00 GMT (the NSDate epoch). With any luck, the option to preserve creation dates will eventually be added to Yojimbo’s import facility and this hack can be retired.
Posted on Monday, May 7th, 2007.
GraphicConverter Information Window
Currently, GraphicConverter’s image “Information” window is only visible when GraphicConverter is in the foreground. It is difficult to consult this information when working in another application.
As an interim solution, this AppleScript displays a subset of that information in a Growl notification window (or in an alert, if Growl is not installed). The notification window remains visible in all applications until you dismiss it with a click.
Download Global Image Info Script (5k)
Put the script in ~/Library/Application Support/GraphicConverter/Scripts/
(for GraphicConverter’s script menu) or ~/Library/Scripts/Applications/GraphicConverter/
(for FastScripts or the standard script menu). Select the “Global Image Info” item from the corresponding menu to display the information for the frontmost image.
Posted on Saturday, May 5th, 2007.
Import Yojimbo Note
This little AppleScript for ThisService provides an alternative to Yojimbo’s own “Import Text” service. It creates and opens a new note item containing the currently selected text. Text style is not preserved and the note window that is opened allows you to promptly edit the note’s name or tags.
Download Yojimbo Note Service (33k)
The unzipped service goes in ~/Library/Services/
. You can assign a keyboard shortcut with Service Scrubber. Here is the actual AppleScript:
on process(_selection) tell application "Yojimbo" activate -- could display a dialog prompting user to name/tag note set _item to make new note item with contents _selection open location "x-yojimbo-item://" & (get id of _item) end tell end process
Posted on Friday, May 4th, 2007.