04-15-2006, 08:33 AM | #1 |
Intentionally Left Blank
Posts: 172
Karma: 300106
Join Date: Feb 2006
Location: Royal Oak, MI, USA
Device: Nook STR
|
Some Questions About Link Filters
In trying to filter links on a site, I ran into a couple of issues with version 9b:
First, the easy one. I have an "exclude" filter to get rid of one link on the page and a "rewrite" filter for all of the others. The rewrite works perfectly. While working out the exact form of the "exclude" filter, I accidentally created one that would not match the other links as they are on the page but would match them after they were rewritten. That excluded everything. Is that the intended behavior? Does the order of the filters matter? I had the exclude first in the list, followed by the rewrite. Second, in working on the exclude, I initially used the regular expression: .*page=1 which matches only the unwanted link. It failed to work; that is, the link was left in the document. I eventually tried: .*listings\.asp.* which did work. Is there something wrong with the syntax of the first expression? It seems to me that should have been fine. This was the only link on the page that ended with "page=1". |
04-15-2006, 01:33 PM | #2 |
Jah Blessed
Posts: 1,295
Karma: 1373
Join Date: Apr 2003
Location: The Netherlands
Device: iPod Touch
|
Links are always rewritten first and then matched against the other filters. Your second question I'm not sure about. Posting the SXL would help.
|
Advert | |
|
04-15-2006, 06:10 PM | #3 |
Intentionally Left Blank
Posts: 172
Karma: 300106
Join Date: Feb 2006
Location: Royal Oak, MI, USA
Device: Nook STR
|
Your response to my first question rang the bell that answered the second one. This is something good to make note of.
You say Sunrise XP always rewrites first, then filters. The rewrite I am using appends "&print=1" to the end of the links, so that I will get the printer friendly version. The link I wanted to exclude was the only one on the page that ended with "page=1", hence I tried to use the ".*page=1" pattern to match it. But if the rewrite runs first, the link would have been rewritten to end with "page=1&print=1", which does not match the pattern ".*page=1". It does, of course, match the pattern ".*listings\.asp.*" both before and after it is rewritten, because of the ".*" at the end. Case closed! Thanks, Laurens |
04-15-2006, 08:39 PM | #4 |
Intentionally Left Blank
Posts: 172
Karma: 300106
Join Date: Feb 2006
Location: Royal Oak, MI, USA
Device: Nook STR
|
I have just edited the link filtering portion of the tutorial to include the above.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Firmware Link? | FrankKau | Kobo Reader | 30 | 07-26-2010 09:05 PM |
What's with the Wiki link? | eGeezer | Feedback | 2 | 10-28-2009 08:05 PM |
the feed only contains a link ... | alexxxm | Calibre | 7 | 02-18-2009 08:43 AM |
New link to jkOnTheRun? | RCR | Feedback | 1 | 02-05-2009 03:31 AM |
iLiad jabref export filters for iliad PDF management | daudi | iRex Developer's Corner | 0 | 01-19-2008 03:52 PM |