Posts Tagged ‘netnewswire’

  1. Twitnews update

    Sometime back I posted an applescript to tweet news items in NetNewsWire to your twitter followers and seems like many people found it useful. I’m really glad that I could find some time today to make a few updates on the script.

    New features

    • Twitnews now saves your twitter login details to the keychain itself. The old script needed you to save your twitter login credentials to the system keychain manually. Now, it checks for the twitnews key in your keychain and if it does not exist, asks you for them and creates the key for you.
    • Growl support.
    • Checks character count is within 140 characters.
    • Uses URL shortener so that you can use analytics feature if you use it.

    I would however like to use Usable Keychain Scripting by Daniel Jalkut of Red Sweater Software, considering the problems faced by some users, which I blame Apple for their really bad implementation of Keychain Scripting. I tried using Daniel’s scripting definition but could not get it to work, probably it is not updated for Snow Leopard. I’m not sure about this, so if you have suggestions on how I can improve the script, please leave your comments.

    Please download it here.


    Unzip and drop it into ~/Library/Application Support/NetNewsWire/Scripts. Now you can access the script from the scripts menu on NetNewsWire.

    If you would like to assign a keyboard shortcut to the script, check this post.

    What else ?

    The script has been tested on 10.5 and 10.6, but still if you find it buggy, please let me know in the comments. Otherwise, I hope you find it useful.

    The code is available at Github.

    UPDATE: If you’d prefer to use URL shortener, the script has been updated by Sean to use for click tracking.

    UPDATE: has been shut down :( Please see this post for an updated script.

  2. Add more Readability to NetNewsWire

    If you are reading this post on my blog using Readability, then you are probably gonna love this. For those, who have not heard about Readability, it is a nifty little tool by Arc90, which transforms a webpage or blog post you are looking at to something very friendly to your eyes, or just increases the ‘readability’ as the name implies. From day one, I’m in love with it. If you haven’t yet, go check it out.

    Coming back to the post, I discovered this really nice tip that helps to get Readability installed on NetNewsWire (yeah, your favorite news reader), using Applescript. It is very useful because you probably read all your news subscriptions on your news reader. So here you go!

    Hint: I recommend adding a shortcut to the script once you have set it up. See this post if you’d like to know how you can do that.

  3. TwitNews Keyboard Shortcut

    Some time ago, I wrote an applescript ‘TwitNews‘ for posting link to news items to Twitter from NetNewsWire. Many people seemed to find it useful and I’m happy about it. Today morning I got an email about how he used Spark app to create a keyboard shortcut to use the script. That is really useful because you dont have to select TwitNews from the scripts menu anymore. Instead just hit the assigned keyboard shortcut. That really gives it a native feeling. Unfortunately, I could not get Spark to work. Instead I found that it is much easier to use Mac OS X inbuilt feature in System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts.

    Just create a new keyboard shortcut with the Application as NetNewsWire, Menu title as ‘TwitNews’ if you haven’t renamed the script when you put it inside the scripts folder, and your desired keyboard shortcut. I chose ⌃T as it is the same shortcut with Safari140 which is a useful tool to post stuff to Twitter from Safari (if you didn’t know).

    Thanks to Ian Tornay for the idea of keyboard shortcuts!

  4. TwitNews – Post to Twitter from NetNewsWire

    Just mashed up a quick applescript to post the currently selected news item in NetNewsWire to Twitter. The code is highly influenced from TwiTunes, (which posts the current track on iTunes to Twitter) and the Shorten URL script from iconmaster. So all credits goes to them.

    By default, the contents of the tweet is set to the title of the news item and the URL is shortened using and you can easily customize it.

    The script needs you to save your Twitter login credentials in your keychain or else you will get an error. To do this, tell Safari to save your login details to Keychain while you login to Twitter or you can do it manually in the keychain app by selecting ‘New password item’ and set Keychain item name as and fill in your Twitter username and password in the following fields.


    Download the script TwitNews, uncompress and drop it into ~/Library/Application Support/NetNewsWire/Scripts. Now you can access the script from the scripts menu on NetNewsWire.


    If you want to have a look at the code:

    tell application "NetNewsWire"
    if index of selected tab = 0 then
    -- We're looking at headlines, so just get the headline URL
    set feed_url to URL of selectedHeadline
    set feed_title to title of selectedHeadline
    -- We're looking at a web view tab, so we need to know which tab
    set i to index of selected tab
    set i to i + 1
    -- Get the tab's URL
    set URL_list to URLs of tabs
    set title_list to titles of tabs
    set feed_url to item i of URL_list
    set feed_title to item i of title_list
    end if
    -- Build the GET request for the API
    set feed_url to "" & feed_url
    -- Submit the GET request and copy the results to clipboard
    set cmd to "curl " & feed_url
    set feed_url to (do shell script cmd)
    end tell

    -- change the status message to your liking here:
    set tweet to feed_title & " " & feed_url

    -- let the user edit
    display dialog "Edit your Twitter status" with title "TwitNews" default answer tweet cancel button 1 default button 2 buttons {"Cancel", "Send"}
    set tweet to (text returned of result)

    -- get login from keychain
    tell application "Keychain Scripting"
    set twitter_key to first Internet key of current keychain whose server is ""
    set twitter_login to quoted form of (account of twitter_key & ":" & password of twitter_key)
    end tell

    -- post to twitter
    set twitter_status to quoted form of ("status=" & tweet)
    set results to do shell script "curl --user " & twitter_login & " --data-binary " & twitter_status & ""

    Hope you find this useful and feel free to make any changes as you need.

    UPDATE: You might want to check this post to assign a keyboard shortcut to the script.

    UPDATE: There is an updated version available with some new features. Please see this post.