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

Go Back   MobileRead Forums > E-Book Formats > Other formats > LRF

Notices

Reply
 
Thread Tools Search this Thread
Old 07-11-2007, 09:41 PM   #16
ns66
Connoisseur
ns66 doesn't litterns66 doesn't litter
 
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
ns66 is offline   Reply With Quote
Old 07-11-2007, 09:50 PM   #17
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,680
Karma: 17734032
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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.
JSWolf is offline   Reply With Quote
Old 07-11-2007, 10:30 PM   #18
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: 25,790
Karma: 4998511
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.
kovidgoyal is offline   Reply With Quote
Old 07-12-2007, 01:15 AM   #19
DailyPlanet
This world is not my home
DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.DailyPlanet ought to be getting tired of karma fortunes by now.
 
DailyPlanet's Avatar
 
Posts: 23
Karma: 485498
Join Date: Jul 2007
Location: Billerica, Mass
Device: Amazon Kindle Paperwhite
?

I don't want to seem like a pest, but what is your estimated timeframe for releasing 4.0
DailyPlanet is offline   Reply With Quote
Old 07-12-2007, 01:24 AM   #20
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: 25,790
Karma: 4998511
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Somewhere between 1 and 3 months
kovidgoyal is offline   Reply With Quote
Old 07-25-2007, 05:22 PM   #21
Bokeh
Junior Member
Bokeh began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2007
Device: Sony PRS-500
Question 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!
Bokeh is offline   Reply With Quote
Old 07-25-2007, 10:13 PM   #22
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: 25,790
Karma: 4998511
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.
kovidgoyal is offline   Reply With Quote
Old 07-26-2007, 11:41 AM   #23
Bokeh
Junior Member
Bokeh began at the beginning.
 
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.
Bokeh is offline   Reply With Quote
Old 07-26-2007, 11:43 AM   #24
Bokeh
Junior Member
Bokeh began at the beginning.
 
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
Bokeh is offline   Reply With Quote
Old 07-26-2007, 11:46 AM   #25
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: 25,790
Karma: 4998511
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Will be fixed in next release.
kovidgoyal is offline   Reply With Quote
Old 07-29-2007, 11:41 AM   #26
langabe
Junior Member
langabe began at the beginning.
 
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
Attached Files
File Type: txt the art of war.txt (335.6 KB, 367 views)
langabe is offline   Reply With Quote
Old 07-29-2007, 02:13 PM   #27
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: 25,790
Karma: 4998511
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.
kovidgoyal is offline   Reply With Quote
Old 08-23-2007, 08:26 AM   #28
edbro
Warthog Driver
edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.edbro is fluent in JavaScript as well as Klingon.
 
edbro's Avatar
 
Posts: 630
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
edbro is offline   Reply With Quote
Old 08-23-2007, 09:54 AM   #29
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: 25,790
Karma: 4998511
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.
kovidgoyal is offline   Reply With Quote
Old 08-23-2007, 03:11 PM   #30
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,680
Karma: 17734032
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by edbro View Post
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
Create a ticket and post the command line you used and also the text file.
JSWolf is offline   Reply With Quote
Reply

Tags
libprs500, txt2lrf

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 02:58 AM.


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