I try to include a RSS feed into Tinderbox. Ideally one note per RSS item. I checked the old forum and could not find a source how that would work. The user manual did not help me either. I should have a HTML tab under document settings, which does not exists.
So is there a way I can fetch on opening Tinderbox all latest items of a RSS feed note by note?
The “user manual” page you linked to dates back 7 years and applies to Tinderbox 5. If you have Tinderbox 6, this will not work. The attributes (and, I believe, the RSS import feature) are not present in Tinderbox 6.
Thanks for the hint. Do you maybe know of any API request I can run with an agent? Basically I only want Tinderbox to pull somehow data from the Internet.
You could import the raw RSS easily enough by placing the URL in $URL and setting $AutoFetch to true. That will strip tags and give you a rough-and-ready copy of the feed, which may be suitable for Explode.
Or, you could use runCommand to fetch the XML data with curl and then pass it along to a script that would extract just what you want.
Or, you could try scripting an XML reader like NetNewsWire through runCommand.
Or, you might try processing the RSS feed through a mashup service like Zapier and then use its output.
Much depends on precisely what you want to accomplish, and what tools you prefer to use.
I decided to work with the runCommand and wrote a Python script that reads my feed. See below. By the way somehow Tinderbox does not see my python packages and that’s why I have to load it extra.
Here is my idea:
First I load the json content through a stamp in a note. Now I thought I would create an agent that reads out the json result and creates new notes for each item. Does that makes sense or is it a redundant task? I just cannot get my head around the agent query to start creating notes. I browsed unsuccesfully the forum for a long time to find some hints how I can create notes from an input (e.g. json).
import sys
sys.path.append(‘/usr/local/lib/python2.7/site-packages’)
import feedparser
feed_url = “https://feeds.pinboard.in/rss/”
def main(feed_url):
d = feedparser.parse(feed_url)
for item in d.entries:
print item
if name == “main”:
main(feed_url)