-
-
Save tzarskyz/5617495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- I use this snippet with Octopress to make new linklog posts. | |
-- I've tweaked the new_post rake task to allow me to fill in | |
-- the external-url: property by taking in a second argument: | |
-- rake new_post["Blog Title","http://some.url.com/"] | |
-- If the 2nd argument is the empty string, then I omit | |
-- that property in the yaml front matter. | |
-- I should note that I haven't updated my Octopress engine in a long time, | |
-- and when I set up the blog, link posts weren't built in. So | |
-- there may be a proper rake task for this now, since I think | |
-- the software now supports link posts natively. Tweak to your liking. | |
-- Doug Stephen | |
-- http://canadian-fury.com | |
tell application "Safari" | |
set pageTitle to name of document 1 | |
set currentURL to URL of current tab of window 1 | |
end tell | |
-- Here's how I return the information I pulled out | |
-- so that the script is useful as a TextExpander Snippet | |
return "rake new_post[\"" & pageTitle & "\",\"" & currentURL & "\"]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment