Modifying feed - Replace text within boundaries with another text within boundaries
I am trying to modify Pinterest feed - here is my pipe
So far I have replaced two strings, but I have problem with item.title.
Pinterest decided to provide for rss feed only 20 characters from picture description which is pity (although I understand a bit why). Anyway this title is also in item.description.
What I would like to achieve is pull text from item.description
which is limited by html characters
<-p>Kim Bora // Jamirang no.2<-/p> (sign - used because of text formatting)
And replace text in item.title limited by text
titleKim Bora // Jamirang
Please advise if such thing is possible with pipes and how. Thank you.
Ireally don't understand your second action. Do you want to replace the whole title by the extracted content? if so, really easy, in the rename module put 'title'. if not, please explain, I understand quickly, but I need people to explain a long time :p
forgot the markdown, sorry:
I'm not sure I understand what you wrote... anyway, to extract the content within the p mark-up, you can use a regex module, easy as your description field looks like to always be of the form <p>...</p><p>[what you want]</p>. To do so, use a regex of the form <p>.*</p><p>(.*)</p>, as I did here: http://pipes.yahoo.com/luneart/bc62007497377b017eb3975643428cf6
I really don't understand your second action. Do you want to replace the whole title by the extracted content? if so, really easy, in the rename module put 'title'. if not, please explain, I understand quickly, but I need people to explain a long time :p
If you check my pipe again I have used your suggestions, played a bit and yes replaced title. Problem is that pinterest doesn't have titles, only description, and pro-forma title is extracted arbitrarily from this description. So I wanted to extract title from description my way - I have used ; as end of phrase I want to use so it looks like this <p>.*</p><p>(.*);.*</p>
And asnwer to your question is yes.
I wanted to replace whole title with part of text in description limited by ><p> and;
When I go to your pipe I see the old source I don't know why.
However from your regex, I see troubles ahead: in the description field you're extracting the title from, the format is always of the form <p>.*</p><p>(.*);.*</p>? I mean, does the semi colon always is appear in the field? In my opinion you should go with a regex of the form <p>.*</p><p>([^;<]*) with [^;<] meaning any character except semi colon or <.