Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-27-2007, 10:07 AM   #1
kenbaldwin
Connoisseur
kenbaldwin began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Oct 2006
Device: Sony PRS-500
text file tricks

I prefer to keep my library ‎as plain text, so I can read it on all kinds of devices. Plus it's easy to manipulate programmatically. Here are a few tricks I use to improve the experience of reading text files on the Reader, if anyone else is interested...

(1) The Reader renders plain text using Dutch/Times 12. I prefer sans serif (Swis). This can be changed by editing main.xml and reflashing the firmware using the universal flasher:
https://www.mobileread.com/forums/showthread.php?t=10900

Look for these lines:

Code:
<style font="Dutch801 Rm BT">
  <style id="text" size="12"/>
</style>
and move the nested text style definition up inside the Swis style element:

Code:
<style font="Swis721 BT">
  ...
</style>
You'll probably be tempted to increase the font size too, but oddly this seems to have no effect. I just use the Medium (1) scale level.

(2) The Reader does not extract any metadata from a TXT file. The filename is used as the document title, and no author is displayed. Since I name my files consistently in the form "author - title.txt", I use the attached make_cache.pl Perl script to parse the filenames and populate the cache.xml appropriately. (This assumes that you're using a memory card to transfer books, as I do.)

The script should correctly update the cache when you add or remove books, preserving any existing bookmarks. It only works for TXT files. Type "make_cache.pl -help" for details.

By default, the scripts sets the scale factor to 1 (Medium), so you don't need to paginate a new book twice (once at the Small scale factor, then again at the Medium scale factor). but you can change this using the -scale option.

(3) When formatting books, I put a double newline between paragraphs to separate them. The attached book_convert.pl script is the main tool I use. It (usually) does a pretty good job on TXT, PDB, RTF, DOC, HTML, and LIT. You need catdoc installed for DOC files, and ConvertLit for LIT.

If anyone else is reading text files and has any additional suggestions, I'd like to hear them. In particular, has anyone figured out how to generate the layout information in cache.xml?

Ken
Attached Files
File Type: xml main.xml (33.5 KB, 471 views)
File Type: pl book_convert.pl (15.0 KB, 397 views)
File Type: pl make_cache.pl (4.5 KB, 281 views)
kenbaldwin is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with reflow text file siulayhumga Workshop 9 07-31-2010 06:36 PM
text file and table of content skao Calibre 1 04-09-2010 12:15 PM
text file formatting hobbyman Calibre 5 10-05-2008 05:18 PM
Can I Change Text File Reading Font? ibishop Sony Reader Dev Corner 1 08-15-2008 04:19 PM
Text File with web links? schulzmc Amazon Kindle 3 05-23-2008 03:06 PM


All times are GMT -4. The time now is 12:21 PM.


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