Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
publishing rss feeds (Read 11353 times)
Sebastian Stephenson
Full Member
*
Offline



Posts: 100

publishing rss feeds
Mar 09th, 2009, 6:23pm
 
is there any kind of syntax for have a note the has an rss feed in it and you want to only so one of the rss items and you can do this in the template language.I know you can limit items in the fetching of notes and thats fine but I am just wondering is there any other way of fetching rss feeds? thanks
Back to top
 
 
Sebastian Stephenson sebey9   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: publishing rss feeds
Reply #1 - Mar 9th, 2009, 6:50pm
 
If you download the aTbRef TBX you'll see it has both RSS and Atom feeds.  If you look at how they are put together (all templates are template notes in the TBX) you'll see how the feed is assembled from item. If I recall I use items changed in the last day, but you could look to a container sort on some criteria and only pick the first or last child if you only want one item per RSS feed. You can certainly have more than one feed if you so desire - though make sure they use different names if output to the same folder.

It's not clear exactly what you're trying to do as in typing your earlier I think you left out a few words that would have clarified your plan.

One think I did learn from the aTbRef is that if your RSS feed covers the whole TBX, you want the feeds at the end of the outline order - so they are last processed and thus able to reflect changes to other notes that might occur in the last agent update cycle.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Sebastian Stephenson
Full Member
*
Offline



Posts: 100

Re: publishing rss feeds
Reply #2 - Mar 10th, 2009, 12:35pm
 
what i am trying to achieve is that I want to be able to pull the whole rss feed and then export one of the news items to html

lets say on the front page that I want to be able to only show one of the rss items. I also want a archives on the html and that I want to to able to show all the rss items

I know a way of doing this by creating two notes one for front page and one for archives but I was wondering if instead of making two notes I could have this happen at the export/template/html level.

thanks marks does this clear things up?
Back to top
 
 
Sebastian Stephenson sebey9   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: publishing rss feeds
Reply #3 - Mar 11th, 2009, 3:44pm
 
sorry if I'm being dumb but I can't work out what you're trying to do. I seems you at one an the same time want a feed that has one item and many items - which doesn't make sense.

As the RSS is created on export, trying to parse one element out of the feed to use in a web pages is pointless extra work, just use an include pointing at the appropriate alias within the agent created to generate the RSS feed - you can use either the RSS item's template to format the include or use a different template.  If you wanted the most recent RSS item by this method, sort your RSS agent on $and include the first child of the RSS agent. Modified
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Sebastian Stephenson
Full Member
*
Offline



Posts: 100

Re: publishing rss feeds
Reply #4 - Mar 12th, 2009, 10:37am
 
sorry I am not generating the rss feed the feed has been generated I am trying to fetch an rss feed not generate one
Back to top
 
 
Sebastian Stephenson sebey9   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: publishing rss feeds
Reply #5 - Mar 12th, 2009, 11:11am
 
Ah, if you're trying to auto-fetch RSS content into TB and extract one note I think that's only possible now by using a command line to parse the input. In another thread Mark B has said reading an RSS into a one-note-per-RSS-item isn't possible in v4.6.0 but is something being looked at (possibly) for later versions. Given the latter it's probably writing a short clear explanation of what you need and emailing it into Eastgate so it can be looked at if/when such a feature is worked upon.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Sebastian Stephenson
Full Member
*
Offline



Posts: 100

Re: publishing rss feeds
Reply #6 - Mar 12th, 2009, 11:56am
 
ok thank you very much sorry about the confusion
Back to top
 
 
Sebastian Stephenson sebey9   IP Logged
Sebastian Stephenson
Full Member
*
Offline



Posts: 100

Re: publishing rss feeds
Reply #7 - Mar 18th, 2009, 1:39pm
 
I actually see that I think I forgot something to say and that was for the fetched RSS feed I wanted to publish that rss content as html is this possible? thanks
Back to top
 
 
Sebastian Stephenson sebey9   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: publishing rss feeds
Reply #8 - Mar 18th, 2009, 8:16pm
 
Can you clarify.  I think you're saying you have an RSS feed, with multiple items, in a TB note and you wish to export the first item from that note to HTML? If so, does the imported RSS feed you're using as source data still have any XML mark-up? Could you post an example of the sort of data you have in your source note?
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Sebastian Stephenson
Full Member
*
Offline



Posts: 100

Re: publishing rss feeds
Reply #9 - Mar 19th, 2009, 9:47am
 
Ok so what I am trying to do is make a podcast website and the content for the website will come form the rss feeds (shownotes,title of epsidoe,link to mp3,etc) instead of making a blog entry to post it

I want to have a archives feature and a front pages feature. The way I am thinking of doing this is by having the one show's rss feed in two notes;one with only the latest episode(front page) the other with rest of the episodes(achieves).

The question I am asking is if you can extract from the fetched rss feed which is stored in the two notes and be able to get the contents got from the template and them put into html. for example for the front page I want to be able to get the show notes in a sperate div and have the link to the mp3 in another div for the javasrcipt player to see and use,as an example

live rss>>fetching>>tinderbox note>>put the fetched content in a template>>html export


for fetching the rss elements I want, I have made a custom template,which will extract what I want out of the feed(shownotes,link to mp3,title etc.)
Back to top
 
 
Sebastian Stephenson sebey9   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: publishing rss feeds
Reply #10 - Mar 19th, 2009, 10:33am
 
I think that perhaps this can be done.  But we also have a preliminary design for a nicer way to do it, probably to be part of Tinderbox 5.

There's also some latitude, I think, for doing some of this in Javascript, as a quasi-static Ajax widget.
Back to top
 
 
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: publishing rss feeds
Reply #11 - Mar 19th, 2009, 11:50am
 
I confess that whilst I understand the general idea, I can't make headway helping as there's still no clear description of the overall task/workflow. New elements keep arriving!  So far, I think:
  • Your TBX (auto-?)fetches RSS content
  • A custom template reads only part of the feed into a note. ??? So, do you mean a command line script is parsing the called feed and only writing some of it's data to your note.
  • You have note with (some) feed data.  In what form? With/without mark-up?
  • You want to export to HTML from this note but only using only the first 'item'. How is that item delimited from other content before/after it in the note text? What doesn't quite make sense here is that if you only want the first item of the feed, why not filter out it alone as you import the original RSS given that you're already doing some form of import filter.  

It would certainly help if you could post a small TBX with your basic structure (prototypes, templates, etc.) and a little specimen data. At present the description given is still very open to (mis-)interpretation.

There is nothing to stop 2 separate notes in your TBX fetch the same RSS. In  principle you apply different filters to each input though I'm not 100% sure, now I poke around more, that you can apply a script (filter) to (auto-)fetched data. The AutoFetchCommand I mentioned previously doesn't pre-process the auto-fetched data but rather offers an alternate input. But if there were - and I can't find one - a syntax to describe calling the raw fetched data stream them an AutoFetchCommand could take the input, pass it to a command line whose stdout would pass the filtered context to the note's $Text.  There is also the issue to contend with that auto-fetching sets the note to read-only possible stopping the filtered fetched content from being written.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Sebastian Stephenson
Full Member
*
Offline



Posts: 100

Re: publishing rss feeds
Reply #12 - Mar 19th, 2009, 12:20pm
 
mark a thank you for your help but as I was thinking about the problem I figureed it out

tinderbox fetches the rss and presents it though a template well what I thought I would was I would make my own template for presenting rss and by that add the html as it was coming it.

if this is still not making sense then when the document is done I'll post a it here to see if you can make sense of it  Wink

but thank you so much for you time and you have been very helpful.
Back to top
 
 
Sebastian Stephenson sebey9   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: publishing rss feeds
Reply #13 - Mar 19th, 2009, 3:05pm
 
No problem. Glad you got the problem sorted!
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print