11-28-2007, 02:27 AM | #76 | |
Connoisseur
Posts: 86
Karma: 399
Join Date: Jun 2007
Device: Nook, Sony PRS-500, Nokia 770 (FBReader)
|
Quote:
(r'\xE2\x80\x99', lambda match: "'"), Any ideas? Dave Last edited by DaveNB; 11-28-2007 at 03:25 AM. |
|
11-28-2007, 02:49 AM | #77 |
creator of calibre
Posts: 44,027
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm not sure that regexp is correct, use --keep-downloaded-files to make sure, it's actually being applied.
|
Advert | |
|
11-28-2007, 03:54 AM | #78 |
Connoisseur
Posts: 86
Karma: 399
Join Date: Jun 2007
Device: Nook, Sony PRS-500, Nokia 770 (FBReader)
|
Yeah, I wasn't so sure about that regex either, but your previous suggestion of correcting Wired.com's claimed encoding to UTF-8 worked perfectly, didn't even have to search for the errant pattern and correct it. Hopefully this will fix all accented characters as well (they were showing up funny after the LRF conversion).
Version 0.7 now being put up on Kovid's Wiki for custom user profiles for web2lrf. It's alot easier to post the changes in just one place that way. https://libprs500.kovidgoyal.net/wiki/UserProfiles Apostrophe's fixed. Dave |
11-28-2007, 05:38 AM | #79 |
Groupie
Posts: 186
Karma: 499
Join Date: Oct 2007
Location: France, Toulouse
Device: Sony PRS500
|
|
11-30-2007, 07:03 AM | #80 |
Connoisseur
Posts: 86
Karma: 399
Join Date: Jun 2007
Device: Nook, Sony PRS-500, Nokia 770 (FBReader)
|
I wrote up a HOWTO and posted it to Kovid's libprs500 page
OK, I put up a quick and dirty and hopefully helpful HOWTO here: https://libprs500.kovidgoyal.net/wiki/UserProfiles Hope that helps. Dave |
Advert | |
|
11-30-2007, 11:29 AM | #81 | |
Translating Calibre...
Posts: 657
Karma: 2902
Join Date: Aug 2007
Location: ER.de
Device: [PRS-500], PB360
|
Quote:
Maybe Kovid can create a link to a new page with your HOWTO. The User Profile page is getting too big... |
|
11-30-2007, 11:47 AM | #82 | |
Groupie
Posts: 182
Karma: 1078201
Join Date: Sep 2007
Device: iPad Air 2
|
Quote:
One question I wanted to ask Kovid, you, or anyone else with more experience building profiles. Is it possible to setup a profile in order to clean up a regular web page that links to the content you want? Or are the profiles strictly for use with RSS feeds? Thanks! |
|
11-30-2007, 01:08 PM | #83 |
creator of calibre
Posts: 44,027
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@DaveNB
Thanks, I've moved your HOWTO to a separate page that is referenced from UserProfiles https://libprs500.kovidgoyal.net/wiki/UserProfilesHOWTO That way you can address it directly and the UserProfiles page doesn't become too long. @JTravers The behavior of web2lrf is fully customizable. You would need to re-define the build_index function in your profile to simply return the path to the pre-built index file. |
11-30-2007, 11:35 PM | #84 |
Member
Posts: 13
Karma: 10
Join Date: Nov 2007
Device: Sony 505
|
Hey guys, I just wanted to say congrats on getting Wired done!....even though I haven't had a chance to tinker with it all week, I am keeping up with the progress.
I'll try to use the HOWTO dave posted to work on The Atlantic, www.theatlantic.com, one of my favorite reads. I was having some trouble picking out the links last time I tried, I think, but I'll give it another go. bhavesh |
12-01-2007, 06:52 PM | #85 |
Translating Calibre...
Posts: 657
Karma: 2902
Join Date: Aug 2007
Location: ER.de
Device: [PRS-500], PB360
|
Can anybody give me a hint how to insert "druck-" after the penultimate comma of the following link?
http://www.spiegel.de/sport/sonst/0,1518,520867,00.html It should look like this afterwards: http://www.spiegel.de/sport/sonst/0,...520867,00.html So where are the phyton specialists? |
12-01-2007, 07:15 PM | #86 |
creator of calibre
Posts: 44,027
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
tokens = url.split(',')
tokens[-2:-1] = ['-druck'] url = ','.join(tokens) that's just off the top of my head you'll almost certainly have to modify it to make it work correctly. |
12-02-2007, 06:23 AM | #87 | ||
Translating Calibre...
Posts: 657
Karma: 2902
Join Date: Aug 2007
Location: ER.de
Device: [PRS-500], PB360
|
Quote:
Somewhere after: Code:
def get_feeds(self): return [ ('Spiegel Online', 'http://www.spiegel.de/schlagzeilen/rss/0,5291,,00.xml') ] def print_version(self,url): return url.replace Quote:
|
||
12-02-2007, 01:20 PM | #88 |
creator of calibre
Posts: 44,027
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Code:
def print_version(self,url): tokens = url.split(',') tokens[-2:-1] = ['-druck'] return ','.join(tokens) |
12-02-2007, 02:24 PM | #89 | |
Translating Calibre...
Posts: 657
Karma: 2902
Join Date: Aug 2007
Location: ER.de
Device: [PRS-500], PB360
|
Hmm.
Quote:
|
|
12-02-2007, 02:31 PM | #90 |
creator of calibre
Posts: 44,027
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just retype the function making sure that the indentation is all spaces and equal
|
Tags |
libprs500, web2lrf |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
web2lrf to capture blog archive? | Deputy-Dawg | Sony Reader Dev Corner | 1 | 02-14-2008 11:41 PM |
web2lrf: La Repubblica | alexxxm | Sony Reader | 1 | 11-13-2007 12:27 PM |