Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 11-19-2011, 12:01 PM   #1
BruceBerry
Junior Member
BruceBerry began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2011
Device: Kindle Keyboard 3G
Priority between keep_only_tags and remove_tags

Hi,

I'm new to the recipe API and I'm trying to write a simple recipe. Suppose that I have an element i want to keep and I add it to keep_only_tags. However, the node is a descendant of some content i want to filter out, which I add to remove_tags. Will the node from keep_only_tags appear in the processed page, or will it be lost while filtering out its parent? I don't see it in the processed page, so I just want to make sure this is intended and I don't have a bug in the code.
BruceBerry is offline   Reply With Quote
Old 11-19-2011, 03:10 PM   #2
nickredding
onlinenewsreader.net
nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'
 
Posts: 324
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
First the keep only tags are extracted. Then the remove after and remove before tags are processed. Finally the remove tags are processed. So the content you want must first be contained with a keep only tag, and then not excluded via remove after/before and remove directives. The logic is in web/fetch/simple.py in case you want to look at it.
nickredding is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Job Priority Normal in Windows 7 DoctorOhh Calibre 2 10-04-2011 11:31 PM
remove_tags does not work JFS-NMF Recipes 1 03-04-2011 01:56 PM
Help Please: remove_tags doesn't work in WSJ Chinese Jmot Recipes 5 02-21-2011 04:10 AM
keep_only_tags and findAll boocko Recipes 3 11-18-2010 11:59 AM
keep_only_tags ultimatebuster Calibre 4 03-19-2010 07:49 PM


All times are GMT -4. The time now is 01:37 PM.


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