(Requires Safari 5.1 or later) This script adds the current article in NetNewsWire to Safari 5.1′s new “Reading List”. This script can be added to the scripts folder of NetNewsWire. When activated, it will take the current active article and add it to Safari’s Reading List for later review.

(*
http://veritrope.com
NetNewsWire to Safari Reading List
Written by David A. Cox
Version 1.0
July 13, 2011

Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/code/netnewswire-to-safari-reading-list
*)


--Clear out some variables we need to use in different parts of the script
property currentUrl : ""
property currentTitle : ""

--Here we get the URL and name of the current article by calling another part of the script
getURLfromNNW()

--Here we create the dialog to get the text you want to note your read later link with
set ReadLaterDialog to (display dialog "Preview Text" with title ¬
        currentTitle with icon stop ¬
        default answer ¬
        currentTitle buttons {"Add to Reading List", "Cancel"} ¬
        default button 1 ¬
        giving up after 30)
       
--ToFix For some reason, the title set by this script is overwritten in Safari by the articles name a moment after it is set.
--This section uses the info gatehred to add the article to the reading list.
if button returned of ReadLaterDialog is "Add to Reading List" then
        tell application "Safari"
                add reading list item currentUrl with title text returned of ReadLaterDialog
        end tell
end if

on getURLfromNNW()
        tell application "NetNewsWire"
                set headUrl to ""
                set headName to ""
                set mainList to URLs of tabs
                set mainListIndex to index of selected tab
                set mainTitles to titles of tabs
                set webUrl to (item (mainListIndex + 1) of mainList)
                set webName to (item (mainListIndex + 1) of mainTitles)
                try
                        set headUrl to URL of selectedHeadline
                end try
                try
                        set headName to title of selectedHeadline
                end try
                -- work out if we're in a tab or a regular view
                if headUrl is equal to "" and webUrl is equal to "" then
                        display dialog "Sorry, you don't appear to have anything selected in NetNewsWire" with title app_title
                        return 1
                else if webUrl is equal to "" then
                        set currentUrl to headUrl
                        set currentTitle to headName
                else -- no headline but there is a webpage
                        set currentUrl to webUrl
                        set currentTitle to webName
                end if
                --return currentUrl
        end tell
end getURLfromNNW

This script is for use with NetNewsWire: It will take the current story you are reading and add it to a text file (along with an intro bit of text). It is useful for creating a list of links to share with someone. The script also makes it easy to mark a link as NSFW. […]

(*
http://veritrope.com
NetNewsWire To TextEdit
Written by David A. Cox
Version 1.0
July 13, 2011

Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/code/netnewswire-to-textedit
*)


--Set the file to use for saving your links by dragging the file between the "" marks below
set Path2TextFile to ""

--Lets make sure the file path is not still blanked out
if Path2TextFile is "" then
    display dialog "You need to open this script in AppleScript Editor,
and set the path for the file you would like to use to store your links"

end if

--Here we set up all our defaults and clear out variables
property documentname : ""
property currentUrl : ""
property currentTitle : ""
set NSFW to false

--Let's try to open the document in TextEdit in case it is closed
--try
tell application "TextEdit"
    open Path2TextFile
end tell

--Let's figure out what the file name is we are to write to
set oldDelimiters to AppleScript's text item delimiters -- always preserve original delimiters
set AppleScript's text item delimiters to {"/"}
set documentname to last text item of Path2TextFile
set AppleScript's text item delimiters to oldDelimiters

--Here we get the URL and name of the current article by calling another part of the script
getURLfromNNW()

--Here we create the dialog to get the clever opening you want to use for the link
set PostDialog to (display dialog "Clever Quip above URL " with title ¬
    currentTitle with icon stop ¬
    default answer ¬
    currentTitle buttons {"update the list!", "NSFW"} ¬
    default button 1 ¬
    giving up after 30)

--Now we build out the text based on the URL, and what your asked, and make note of if it is safe for work or not
set URLintro to text returned of PostDialog
if button returned of PostDialog is "NSFW" then
    set NSFW to true
end if
set theString to URLintro & "
"
& currentUrl

--And finally we call the section of the script that writes the text to text edit
appendMe(theString, NSFW)
on getURLfromNNW()
    tell application "NetNewsWire"
        set headUrl to ""
        set headName to ""
        set mainList to URLs of tabs
        set mainListIndex to index of selected tab
        set mainTitles to titles of tabs
        set webUrl to (item (mainListIndex + 1) of mainList)
        set webName to (item (mainListIndex + 1) of mainTitles)
        try
            set headUrl to URL of selectedHeadline
        end try
        try
            set headName to title of selectedHeadline
        end try
        -- work out if we're in a tab or a regular view
        if headUrl is equal to "" and webUrl is equal to "" then
            display dialog "Sorry, you don't appear to have anything selected
in NetNewsWire"
with title app_title
            return 1
        else if webUrl is equal to "" then
            set currentUrl to headUrl
            set currentTitle to headName
        else -- no headline but there is a webpage
            set currentUrl to webUrl
            set currentTitle to webName
        end if
        --return currentUrl
    end tell
end getURLfromNNW
on appendMe(theString, NSFW)
    tell application "TextEdit"
        if NSFW is true then
            set last character of document documentname to (last character of document documentname & return)
           
            --Here we mess with the font to make NSFW stuff stand out
            set savedFont to font of last character of document documentname
            set savedColor to color of last character of document documentname
            set font of last character of document documentname to "Helvetica-
Bold"

            set color of last character of document documentname to {65535, 18601, 19374}
            set last character of document documentname to (last character of document documentname & theString & " ")
            set font of last character of document documentname to savedFont
            set color of last character of document documentname to savedColor
            set last character of document documentname to (last character of document documentname & return)
        else --The case that the URL has not been marked as NSFW, we post it to the top of the list in the default font
            set first character of document documentname to (return & first character of document documentname)
            set first character of document documentname to (theString & "
                        "
& first character of document documentname)
        end if
        save document documentname
    end tell
end appendMe

NetNewsWire is still my RSS Reader of choice — in part due to it’s scriptability! When I started using Microsoft Outlook 2011 as my default email program, one of the things that I missed was being able to send the full contents of NetNewsWire items to people (currently only an option if you’re using Apple […]

(*
http://veritrope.com
NetNewsWire to Microsoft Outlook
Version 1.0
April 18, 2011

Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/code/netnewswire-to-microsoft-outlook-mail-contents

// IMPORTANT NOTES
- This AppleScript requires Outlook 2011 SP1 or Greater (Version 14.1.0+)
- If you do not have GROWL installed, you'll currently get an "GrowlHelperApp" error.  I think I have a fix for this and -- if you're interested in testing it -- please send me a message:
1.) With the Veritrope.com Contact Form, located at http://veritrope.com/about-veritrope/contact/, or
2.) Via the Veritrope.com Twitter account -- @Veritrope

// CHANGELOG:
1.00  INITIAL RELEASE

// INSTALLATION:
Just drop it into the NetNewsWire Script Folder!           

FastScripts Installation (Optional, but recommended):
--Download and Install FastScripts from http://www.red-sweater.com/fastscripts/index.html
--Copy script or an Alias to ~/Library/Scripts/Applications/NetNewsWire
--Set up your keyboard shortcut

*)


(*
======================================
// USER SWITCHES
======================================
*)


--CURRENTLY NONE

(*
======================================
// OTHER PROPERTIES
======================================
*)


property the_Item : ""
property the_Title : ""
property processnames : {}

(*
======================================
// MAIN PROGRAM
======================================
*)


--CHECK FOR GROWL
my myGrowl()

--GET INFO FROM NNW
tell application "NetNewsWire"
    try
        --IS IT A TAB OR A HEADLINE?
        if (index of selected tab is not 0) then
           
            --IT'S A TAB!
            set the_Type to "tab"
            set urlsList to URLs of tabs
            set ixCurrentTab to index of selected tab
            set titleList to titles of tabs
            set the_Item to (item (ixCurrentTab + 1) of urlsList)
            set the_Title to (item (ixCurrentTab + 1) of titleList)
            set the_URL to the_Item
            set the_Item to my get_Page(the_Item)
            set dispName to "NetNewsWire "
           
            --CREATE THE MESSAGE IN OUTLOOK
            set the_Message to my outlook_Create(the_Title, the_Item, the_Type, dispName, the_URL)
            my growl_Notify(the_Title)
           
            --IT'S A HEADLINE!
        else if exists selectedHeadline then
            set the_Headline to selectedHeadline
            set the_Type to "headline"
            set the_Item to ""
            set dispName to (display name of subscription of selectedHeadline)
            set the_URL to (URL of selectedHeadline)
            set the_Title to (title of selectedHeadline)
           
            --CREATE THE MESSAGE IN OUTLOOK
            if exists (description of selectedHeadline) then
                set the_Item to (description of selectedHeadline)
                set the_Message to my outlook_Create(the_Title, the_Item, the_Type, dispName, the_URL)
            else
                set the_Item to my get_Page(the_URL)
                set the_Message to my outlook_Create(the_Title, the_Item, the_Type, dispName, the_URL)
            end if
           
            --GROWL RESULTS
            my growl_Notify(the_Title)
        else
            if "GrowlHelperApp" is in processnames then
                tell application "GrowlHelperApp" -- GROWL FAILURE FOR NO SELECTION
                    notify with name ¬
                        "Failure Notification" title ¬
                        "No Headline or Tab Selected!" description ¬
                        "Please Select An Item And Try Again." application name "NetNewsWire to Microsoft Outlook"
                end tell
            else if "GrowlHelperApp" is not in processnames then -- NON-GROWL ERROR MSG. FOR NO SELECTION
                display dialog "No headline or tab selected!" with icon 0
            end if
        end if
       
        (* ERROR HANDLING *)
    on error errText number errNum
        if "GrowlHelperApp" is in processnames then
            tell application "GrowlHelperApp" -- GROWL FAILURE FOR ERROR
                notify with name ¬
                    "Failure Notification" title ¬
                    "Message Failure" description "Failed To Send " & the_Title & ¬
                    " Due To The Following Error: " & return & errText ¬
                    application name "NetNewsWire to Microsoft Outlook"
            end tell
        else if "GrowlHelperApp" is not in processnames then -- NON-GROWL ERROR MSG. FOR ERROR
            display dialog "Item Failed to Import: " & errNum & return & errText with icon 0
        end if
    end try
end tell

(*
======================================
// HANDLER SUBROUTINES
======================================
*)


--CHECK / REGISTER GROWL
on myGrowl()
    tell application "System Events"
        set processnames to name of every process
    end tell
    if "GrowlHelperApp" is in processnames then
        tell application "GrowlHelperApp"
            set the allNotificationsList to {"Success Notification", "Failure Notification"}
            set the enabledNotificationsList to {"Success Notification", "Failure Notification"}
            register as application ¬
                "NetNewsWire to Microsoft Outlook" all notifications allNotificationsList ¬
                default notifications enabledNotificationsList ¬
                icon of application "Microsoft Outlook"
        end tell
    end if
end myGrowl

--GET THE WEBPAGE DATA
on get_Page(the_Item)
    set rawItem to do shell script "curl -siL " & (quoted form of the_Item)
    set the_code to items 10 thru 12 of rawItem as string
    --ON ERROR
    if the_code is greater than 400 then
        display dialog "ERROR"
    else
        --STRIP HEADER
        set oldDelim to AppleScript's text item delimiters
        set newDelim to "<head>"
        set AppleScript's text item delimiters to newDelim
        set theItem to second text item of rawItem
        set AppleScript's text item delimiters to oldDelim
        return theItem
    end if
end get_Page

--CREATE THE OUTGOING MESSAGE IN OUTLOOK
on outlook_Create(the_Title, the_Item, the_Type, dispName, the_URL)
    set the_Title to "Article from " & dispName & "-- " & the_Title
    set the_Item to "<h3>Original Link: </h3>" & the_URL & "<hr>" & the_Item
    tell application "Microsoft Outlook" -- CREATE HTML MAIL FROM HEADLINE
        set newmessage to make new outgoing message with properties {subject:the_Title, content:the_Item}
        open newmessage
        activate
    end tell
end outlook_Create

--GROWL SUCCESS
on growl_Notify(the_Title)
    if "GrowlHelperApp" is in processnames then -- GROWL SUCCESS
        tell application "GrowlHelperApp"
            notify with name ¬
                "Success Notification" title ¬
                "Message Created!" description ¬
                "Successfully created " & the_Title & ¬
                " in Microsoft Outlook" application name "NetNewsWire to Microsoft Outlook"
        end tell
    end if
end growl_Notify