Copy and paste this text into Script Editor. Save the script as "Tumble" to (Your home folder)/Library/Application Support/Quicksilver/Actions If the Actions folder isn't there, go ahead and make it.
to extractBetween(SearchText, startText, endText)
set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to startText
set endItems to text of text item -1 of SearchText
set AppleScript's text item delimiters to endText
set beginningToEnd to text of text item 1 of endItems
set AppleScript's text item delimiters to tid
return beginningToEnd
end extractBetween
to parseLink(link)
set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to " "
set theURL to the 1st text item of link
set AppleScript's text item delimiters to theURL
set theName to 2nd text item of link
set AppleScript's text item delimiters to tid
return "url=" & theURL & "&name=" & theName
end parseLink
using terms from application "Quicksilver"
on process text post
tell application "Keychain Scripting"
set tumblr_key to first Internet key of current keychain whose server is "www.tumblr.net"
set tumblr_login to ("email=" & account of tumblr_key & "&password=" & password of tumblr_key)
end tell
set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to "."
if (1st word of post is "http") then
set type to "link"
set send to parseLink(post)
else if (1st text item of post is "www") then
set type to "link"
set send to parseLink(post)
else if (1st character of post is "\"") then
set type to "quote"
set AppleScript's text item delimiters to "\""
set theQuote to the 2nd text item of post
set AppleScript's text item delimiters to "--"
set source to the 2nd text item of post
set send to "quote=" & theQuote & "&source=" & source
else
set title to extractBetween(post, "<t>", "</t>")
set AppleScript's text item delimiters to "</t>"
set body to 1st text item of post
if (body is "</t>") then set body to 2nd text item of post
set send to "title=" & title & "&body=" & body
end if
set AppleScript's text item delimiters to tid
set new_post to the quoted form of (tumblr_login & "&generator=Quicksilver&type=" & type & "&" & send)
set results to do shell script "curl --data-binary " & new_post & " http://tumblr.com/api/write"
if (results is "Authentication failed.") then show notification "Posting failed. Make sure your email and password are correct!"
return nothing
end process text
end using terms from
Setup an entry in Keychain Access with name "www.tumblr.net", account as your email, and password as your password. Make sure it's set as an "Internet password" (case sensitive!). If you use Safari, this may already be there.
Invoke Quicksilver, hit period, enter some text, hit tab, and begin to type "Tumble." When the action pops up, hit enter and send! If nothing seems to happen, it probably worked. Check the Tumblr Dashboard to make sure.
To send a regular post, simply begin typing. Surround the title with "<t>" and "<t>":
Regular: <t>(Title)</t> (Post)
Links: (URL) (Link name)
Quotes: "(Quote)" --(Source)