View Full Version : Text Wrapper Tool
Since kaitlyns page to convert texts for convenient reading on the D2 doesnt work anymore, I decided to write my own little page that does the trick. It is not very cleanly coded, so please feel free to report any bugs and feature requests here in this thread. Also, the server it is on is sometimes really slow, but I can move it, if it should become too bad.
Here it is: Text Wrapper (http://www.cyphire.de/d2/d2.php)
Features:
Takes different character spacings into account
Works with MaxSts FontPatch
Some options for neat paragraphing
No size limitation
HowTo:
paste text into field
convert
copy into texteditor of choice and save
transfer to your D2
enjoy
Hope you like it!
Thanks go to MaxSt for the width-table, kaitlyn for the idea. :-)
omjeremy
05-11-2007, 21:13
Thanks for your work and service! It is greatly appreciated.
I tried it on a text by selecting "wrap, block format" and got the following error:
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/web108/html/d2/d2.php on line 6
I got it working using some other selection, but it still doesn't look right to me.
Here's an example text from Gutenberg.org;
http://www.gutenberg.org/files/36/36.txt
Please refine your method and advice what method should be used to make this text display the best on the D2. I prefer block formatting, but the way you do it I don't think it will display very well on the D2. Please advice.
I tried it on a text by selecting "wrap, block format" and got the following error:
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/web108/html/d2/d2.php on line 6
Either a very big file, or the server is too slow. I dont have access to the php settings on this server, so i can't raise the execution time. If it keeps occuring, try cutting the file into chunks. Maybe I'll optimize for a bit more speed tomorrow.
I got it working using some other selection, but it still doesn't look right to me.
Here's an example text from Gutenberg.org;
http://www.gutenberg.org/files/36/36.txt
Please refine your method and advice what method should be used to make this text display the best on the D2. I prefer block formatting, but how you do it I don't think it will display very well on the D2. Please advice.
I suggest one of the last three, I like "Paragraph = short line" best. I will put up some samples how the different versions look like tomorrow.
Thanks for the feedback!
AussiePie
05-11-2007, 23:51
And thanks for working on this project RobinB :)
DAPmagic
06-27-2007, 21:06
Thank you very much, RobinB! [thumbsup]
This page rocks dude! Now i can take note ofall my activites and pass to the d2 more easely =) <3!
Fedito
Very cool.
I actually have a win32 text-based editor (like vi in *ix systems, but not derived from it) which can align marked text blocks/lines to whatever margins I specify, but this is even more convenient.
Thanks.
- wader
kaitlyn2004
06-28-2007, 10:18
Very cool.
I actually have a win32 text-based editor (like vi in *ix systems, but not derived from it) which can align marked text blocks/lines to whatever margins I specify, but this is even more convenient.
Thanks.
- wader
Those tools do not take into account each font's width
kaitlyn2004
06-28-2007, 10:19
I dont have access to the php settings on this server, so i can't raise the execution time.
set_time_limit(yourlimit)
http://www.php.net/set-time-limit
or ini_set('max_execution_time',yourlimit);
http://www.php.net/ini_set
Those tools do not take into account each font's width
Like I said, this tool is even more convenient. I don't need to do as much manually (or mentally) in the reformatting.
- wader
DAPmagic
07-20-2007, 10:51
Whenever I need to use the text wrapper tool and have to a search to find it. [blink]
Why?
No one has requested it to be stickied? I guess.
DiveSlip
07-20-2007, 11:21
I created application (D2TextFormatter (http://cowond2.god.su/index.php/D2TextFormatter)) for formatting text file for Cowon D2. This application uses a font file from cowon's firmware and can make justify formatting. But I created only russian version. If any wants to use it I can translate it to English. But I need in a list of codepages for European users:).
Snoopyboy
07-22-2007, 07:39
I created application (D2TextFormatter (http://cowond2.god.su/index.php/D2TextFormatter)) for formatting text file for Cowon D2. This application uses a font file from cowon's firmware and can make justify formatting. But I created only russian version. If any wants to use it I can translate it to English. But I need in a list of codepages for European users:).
It looks great, I've been looking for something like this could you please translate it?
Here http://www.paratype.com/help/language/language.asp?langCode=99 is a page with codepages, I guess you can choose either Western or Central European.
That's a great tool, thanks! :)
I created application (D2TextFormatter (http://cowond2.god.su/index.php/D2TextFormatter)) for formatting text file for Cowon D2. This application uses a font file from cowon's firmware and can make justify formatting. But I created only russian version. If any wants to use it I can translate it to English. But I need in a list of codepages for European users:).
Hi, I would like to second the request for an English version.
RobinB's online tool is great but I want to be able to convert eBooks for reading on the D2.
the_raven
08-22-2007, 04:18
I'd very much like to see an English version soon. The text display is terrible just now. I wonder why they made the D2 cut off words instead of putting them in the next line. Couldn't have been too difficult, could it?
If you're planning to make multiple language versions I could translate the English version into German.
cmetzner
08-22-2007, 08:47
Someone on this forum recommended pspad as a program to reformat. I downloaded it for free and it works great.
I set the margin to 48; set format to "block" "short paragraph" and it's done.
Lixtetraxx
08-22-2007, 12:18
Yeah I use pspad too and it work great
the_raven
08-23-2007, 04:44
Hey, this pspad looks pretty good. Can you convert multiple files at the same time? I only managed to do one file after another...
- A bit tiresome when you have a lot of ebooks ;-)
Schnuffi72
08-23-2007, 17:19
A translation of D2TextFormatter in German or English would be really cool :)
RobinB, Thanks a lot for this text wrapper. Very useful tool indeed.
2forty
Captain Ødegård
11-08-2007, 14:22
very useful tool :D
sticky it ^^
TackyTiger
07-27-2008, 06:40
Hope you like it!
Thanks go to MaxSt for the width-table, kaitlyn for the idea. :-)
It's great, thanks!
Was the width table posted on the forum anywhere? I couldn't find it. I fancied writing a perl module...
Was the width table posted on the forum anywhere?
It's the first 65536 bytes of the font file.
TackyTiger
07-27-2008, 10:22
It's the first 65536 bytes of the font file.
Thanks MaxSt.
Edit: In case it's useful to anyone, I've attached a simple perl script that takes a filename as an argument and prints the wrapped output to stdout, i.e;
./d2_textwrap.pl input.txt > output.txt
charonme
08-28-2008, 06:58
the idea of using pspad for formatting text for D2 is very cool, thank you for that suggestion. However - is the D2 font fixed-width?
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.