07-11-2007, 09:41 PM | #16 |
Connoisseur
Posts: 78
Karma: 156
Join Date: Jul 2007
Device: sony reader
|
Hi,
I need a simple utility to convert lots of txt or html files (some without extension even though they are txt or html) to lrf, or rtf, whatever format that can be easily read in sony reader, with no border, no need for special layout, just quick and batch, need to support unicode I can code java very well, but I don't know anything about lrf or rtf format, if there's such module or code samples on that side that will help, I can easily build the rest. or if your txt2lrf or html2lrf can handle (you can even merge them make it seemless) that's even better thanks |
07-11-2007, 09:50 PM | #17 |
Resident Curmudgeon
Posts: 76,114
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I do suggest using html2lrf to convert your html files. Give them a go and see how it works. Might be just what you want.
As for the text files, use Word to format them and then import them into Book Designer after that. That's the easiest way to do it. |
Advert | |
|
07-11-2007, 10:30 PM | #18 |
creator of calibre
Posts: 44,422
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@DailyPlanet Yeah lit2lrf will be in the gui
@ns66 You're best bet is to write a script that runs through the files, detects if they are txt or html and call txt2lrf/html2lrf as appropriate. |
07-12-2007, 01:15 AM | #19 |
This world is not my home
Posts: 31
Karma: 485498
Join Date: Jul 2007
Location: Massachusetts
Device: Kindle Paperwhite, Kindle Oasis 2
|
?
I don't want to seem like a pest, but what is your estimated timeframe for releasing 4.0
|
07-12-2007, 01:24 AM | #20 |
creator of calibre
Posts: 44,422
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Somewhere between 1 and 3 months
|
Advert | |
|
07-25-2007, 05:22 PM | #21 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jul 2007
Device: Sony PRS-500
|
unicode characters problem
I have been having a problem with many txt files I try to run through this, where somewhere in the txt file is a unicode character the program cannot process.
I usually get a message like this: UnicodeEncodeError: 'ascii' codec can't encode character u'\xc6' in position 25014: ordinal not in range(128) which I guess is a python related error? (I know very little about programming) I can sometimes track down the character if I can understand the unicode for that character, I use Charactermap to find and replace it in Word. But often with an error like this I don't know how to locate the character. Does anyone have any tips for me on either a macro I can run in word to remove characters txt2lrf cannot process,or how to use the error message to locate the offending character? Are there any plans to "pre-screen" text files in txt2lrf to help remove those characters? So far I have been finding them manually by deleting half the text, seeing if the error remains, then keep deleting half until I find it. Which is super slow. Any help would be appreciated! |
07-25-2007, 10:13 PM | #22 |
creator of calibre
Posts: 44,422
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You shouldn't be getting unicode errors. Can you post the full error message and the version of libprs500 you're using.
|
07-26-2007, 11:41 AM | #23 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jul 2007
Device: Sony PRS-500
|
txt2lrf error
woops, double post
Last edited by Bokeh; 07-31-2007 at 05:48 AM. |
07-26-2007, 11:43 AM | #24 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jul 2007
Device: Sony PRS-500
|
here is the error i get when trying to use txt2lrf on a gutenberg txt file from http://www.gutenberg.org/ebooks/7110
Traceback (most recent call last): File "convert_from.py", line 89, in <module> File "convert_from.py", line 78, in main File "convert_from.py", line 63, in generate_html File "encodings\cp1252.pyo", line 15, in decode UnicodeEncodeError: 'ascii' codec can't encode character u'\xe6' in position 5154: ordinal not in range(128) oh and I am using the latest version of the program, 0.3.79 |
07-26-2007, 11:46 AM | #25 |
creator of calibre
Posts: 44,422
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Will be fixed in next release.
|
07-29-2007, 11:41 AM | #26 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jul 2007
Device: PRS-500
|
RuntimeError: maximum recursion depth exceeded in cmp
When running txt2lrf on the attached file,
alex@langabe:~/shared/ebooks-cache $ txt2lrf the\ art\ of\ war.txt I get the runtime error specified in the subject line. Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) alex@langabe:~/shared/ebooks-cache $ libprs500 --version 0.3.75 I don't think increasing the recursion limit will help, you'll run out of stack. It should probably implement the algorithm without recursion. Alex |
07-29-2007, 02:13 PM | #27 |
creator of calibre
Posts: 44,422
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Nah this is probably a logic bug. Squashed in the next release. Also try upgrading to the latest version 0.3.79.
Last edited by kovidgoyal; 07-29-2007 at 02:15 PM. |
08-23-2007, 08:26 AM | #28 |
Banned
Posts: 640
Karma: 4911
Join Date: Jul 2007
Location: Grapevine, TX
Device: iPad4
|
I'm using ver 103 and I am getting:
Traceback (most recent call last): File "convert_from.py", line 97, in <module> File "convert_from.py", line 93, in main File "convert_from.py", line 83, in process_file File "libprs500\ebooks\lrf\html\convert_from.pyo", line 1403, in process_file File "libprs500\devices\prs500\driver.pyo", line 56, in <module> File "libprs500\devices\libusb.pyo", line 32, in <module> File "libprs500\__init__.pyo", line 53, in load_library File "ctypes\__init__.pyo", line 423, in LoadLibrary File "ctypes\__init__.pyo", line 340, in __init__ WindowsError: [Error 126] The specified module could not be found |
08-23-2007, 09:54 AM | #29 |
creator of calibre
Posts: 44,422
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I cant duplicate this bug and the line numbers in the error message are wrong. Can you try uninstalling and re-installing libprs500.
|
08-23-2007, 03:11 PM | #30 | |
Resident Curmudgeon
Posts: 76,114
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Tags |
libprs500, txt2lrf |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ahhhhh - Utility overload: BookDesigner, BookCreator, Textify, txt2lrf...too much | FatDog | Workshop | 6 | 05-10-2010 12:00 AM |
DX: Contrast has Been Improved | ny10522 | Amazon Kindle | 3 | 06-15-2009 02:46 AM |
txt2lrf questions | ShellShock | Calibre | 0 | 05-04-2009 04:15 AM |
Has E-ink improved? | Kilarney | Which one should I buy? | 4 | 03-14-2009 07:01 PM |
txt2lrf | daesdaemar | Calibre | 3 | 11-20-2008 05:24 PM |