I use iPhoto for organizing my pictures. I have written the following AppleScripts in order to have the ability to create direct links to them.
You should have selected one or more pictures in your iPhoto library before executing the script. The code for the links is sent to the clipboard and you may paste it to a MediaWiki page or a RTF document. Afterwards, every time you click a link, an AppleScript editor window opens with the required AppleScript code inside it. Finally, you may press cmd + R (executes the script), cmd + W (closes the window) and cmd + D (without saving) or have the same effect by executing the AppleScript of this post.
The AppleScript code for creating MediaWiki links is the following:
--http://www.organognosi.com
tell application "iPhoto"
activate
set selectedPhotos to the selection
set wikiLinks to {}
set the clipboard to ""
repeat with i from 1 to the count of selectedPhotos
set photoID to id of item i of selectedPhotos
set photoName to name of item i of selectedPhotos
set applescriptURL to "[applescript://com.apple.scripteditor?action=new&script=tell%20application%20%22iPhoto%22%0D%09set%20foundPhoto%20to%20get%20photos%20whose%20id%20is%20" & photoID & "%0D%09select%20album%204%0D%09select%20item%201%20of%20foundPhoto%0Dactivate%0Dend%20tell" & " " & photoName & "]"
set the clipboard to (the clipboard) & applescriptURL & "
" & return
end repeat
end tell
The AppleScript code for creating RTF links is the following:
--http://www.organognosi.com
tell application "iPhoto"
activate
set selectedPhotos to the selection
set wikiLinks to {}
set the clipboard to ""
repeat with i from 1 to the count of selectedPhotos
set photoID to id of item i of selectedPhotos
set photoName to name of item i of selectedPhotos
set applescriptURL to "<a href=\"applescript://com.apple.scripteditor?action=new&script=tell%20application%20%22iPhoto%22%0D%09set%20foundPhoto%20to%20get%20photos%20whose%20id%20is%20" & photoID & "%0D%09select%20album%204%0D%09select%20item%201%20of%20foundPhoto%0Dactivate%0Dend%20tell\">" & photoName & "</a>"
set the clipboard to (the clipboard) & applescriptURL & "</br>"
end repeat
delay 1
tell application "Finder"
do shell script "pbpaste | textutil -stdin -format html -convert rtf -stdout | pbcopy -Prefer rtf"
end tell