Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2009, 06:34 PM   #1
logan
Member
logan doesn't litterlogan doesn't litter
 
Posts: 20
Karma: 104
Join Date: Jan 2009
Device: pocketbook 360
Apply match_regexps and filter_regexpr on feeds

Hi,

match_regexps and filter_regexps seems to be applied only on html link resolution.
I need them in feeds resolution too since some of them have heterogeneous links:
Code:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dct="http://purl.org/dc/terms/">
	<channel>
        ...
            <item>
                ...
				<link>http://www.liberation.fr/monde/0101318771-les-electeurs-israeliens-ont-choisi-le-pragmatisme</link>
				...
			</item>
			<item>
                ...
				<link>http://www.liberation.fr/monde/0101318514-repli</link>
                ...
			</item>
            <item>
                ...
                <!-- Item I want to ignore because it reference another website that isn't handled by my recipe -->
				<link>http://secretdefense.blogs.liberation.fr/defense/2009/02/un-officier-fra.html</link>
                ...
			</item>
        ...
    </channel>
</rss>
I'd like to put something like
Code:
  match_regexps = (r'http://www\.liberation\.fr/.*')
in my recipe to filter relevant item.

Is there another option make that happend or can I create a new ticket on trac ?
logan is offline   Reply With Quote
Old 02-11-2009, 07:08 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Implement the get_article_url method in your recipe. You can do arbitrarily powerful processing in it.
kovidgoyal is online now   Reply With Quote
 
Advertisement
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to apply the enhancements/patches ? nubbol Calibre 2 09-05-2010 12:42 AM
How to apply fixed-width fonts EnergyLens Calibre 5 04-17-2010 01:41 PM
Hachette jumps on the Apply pricing bandwagon CopperTrail News 0 02-06-2010 02:01 PM
Do international wireless fees apply to samples? RobbieClarken Amazon Kindle 4 10-25-2009 10:52 AM
Does UK copyright apply to AUS sourced material? ShellShock Upload Help 24 05-27-2009 09:33 AM


All times are GMT -4. The time now is 03:29 AM.


MobileRead.com is a privately owned, operated and funded community.