AddCurrentRSSItemToTaskPaper


Outdated!!!

This information is for TaskPaper 2 which is old and outdated. TaskPaper 3 is the current version of TaskPaper. For TaskPaper 3 support please visit the support forums.


This script works with NetNewsWire. With an RSS headline selected in NetNewswire, run this script. It will create a new task with the title of the RSS item and the URL in the Inbox project. If the Inbox project does not exist, it will create it. It will also add a child note to the new task with the summary of the RSS item as the text.

If you prefer, you can download a copy of the script here

tell application "NetNewsWire"
    try
        set theSelection to the selectedHeadline
        if the theSelection is missing value then error "One or more headlines must be selected."
        repeat with theHeadline in theSelection
            my importItem(theHeadline)
        end repeat
    end try
end tell

on importItem(theHeadline)
    tell application "NetNewsWire"
        try
            set theSubject to title of theHeadline
            set theDate to date published of theHeadline
            set itemURL to URL of theHeadline
            set itemSummary to summary of theHeadline
            tell application "TaskPaper"
                -- Check to see if the Inbox project exists
                set theProjects to search front document with query "project = \"Inbox\""
                -- If not we create it
                if the length of theProjects is less than 1 then
                    tell front document
                        make new project with properties {name:"Inbox"}
                        display dialog "I'm Here"
                    end tell
                end if
                tell front document
                    tell project named "Inbox"
                        -- create the task and note
                        set newTask to make new entry with properties {name:"- " & theSubject & " - " & itemURL}
                        tell newTask
                            make new entry with properties {text content:itemSummary}
                        end tell
                    end tell
                end tell
            end tell
        end try
    end tell

    tell application "GrowlHelperApp"

        set the allNotificationsList to ¬
            {"Mail to TaskPaper success"}

        set the enabledNotificationsList to ¬
            {"Mail to TaskPaper success"}

        register as application ¬
            "Headline to TaskPaper" all notifications allNotificationsList ¬
            default notifications enabledNotificationsList ¬
            icon of application "TaskPaper"

        notify with name ¬
            "Headline to TaskPaper success" title ¬
            "Added to TaskPaper" description ¬
            theSubject application name "Headline to TaskPaper"
    end tell
end importItem