I’ve been cataloguing a lot of stuff that I have with a view to selling it. Having got the new mac I checked to see if my code for delicious library still worked, which it did. Since then I’ve realised that what I also need is a searchable index for the ammo box type things full of CD’s. Currently they’re in there with the CD in the front of the slip and the inlays in the back. A lot of these are scanned in already or I’m scanning them in as I go.
Delicious Library has a ‘location’ field which is blank by default and only shows up when you edit an item. I needed to set this for things as I went so I created this small applescript:
-- Menu Title:  "Set Location"
-- Menu Keyboard Shortcut: command-l
-- Menu Path: 
-- Copy and paste everything into Script Editor (use spotlight to find it).
-- Then save to home/Library/Scripts/Applications/Delicious Library 2
-- You can edit the menu keyboard shortcut to be whatever you want.
tell first document of application "Delicious Library 2"
set selectedItems to selected media
set itemsRef to a reference to selectedItems
repeat with mediaItem in itemsRef
display dialog "Enter location:" default answer "X.X"
set newLocation to text returned of result
set location of mediaItem to newLocation
Which does what I want. After I’ve scanned an item in I can hit apple-l and type in the location. Much much faster.