Hacking Converting to xhtml

Cermage

Well-Known Member
OP
Member
Joined
Dec 2, 2007
Messages
1,701
Trophies
0
Website
Visit site
XP
275
Country
Introduction
alright, i guess most people know the basic steps of setting up dslibris (download, copy right files to card) but as for actually converting to the right format and making the books usable with dslibris. A major setback with dslibris is that it only takes 1 format which is Xhtml. Now, e-books as you will find out, don't use xhtml as a main file format. in fact i haven't found any at all in xhtml format. I don't know why the authors chose this format, i believe txt, doc or their own format which can easily be converted like comicbookds and pictods would have done much better. Simply because converting to xhtml is a pain in the ass if you don't know what you are doing.

What We need


1. the ebook
2. Microsoft word 2008 (Has to be 2008!) or Macromedia Dreamweaver
3. this site; OH HAI CLICKY CLICKY
4. notepad

Brief on fileformats
i hope by now you would have at least guessed that in the ebook world there are many different flavours. i've encoutered pdf, txt, html, images, doc and some other silly file types. Just pray to god that the ebook you have is in one of those formats besides in images (god, someone kill the people who do images for ebooks). with all those filetypes i've listed (bar images) it is extremely simple to copy and paste the text with what you want.

What to do
1. So you've got the ebook, open it up in its respective program (txt files go to notepad, doc go to microsoft word, html go to your browser e.t.c) and COPY absolutely everything, besides the pictures and the stuff you don't want (i will elaborate later on things you don't want)

If the file format is html, just open it in notepad, copy all of it and skip the next few steps till we visit the webpage

2. IF the file is originally just pure text, open up a notepad, save it somewhere and put .html as the file extension. this will be your medium file.

if you are using dreamweaver you don't need to do this.

3. If you are using word, just open up the file(the file you just saved as .html) by right clicking -> edit. and paste all the stuff you copied in and save. this will put in all the html code you want and need.

if you are using dreamweaver just open it up, and paste the stuff in save appropriately.

4. Open the file in notepad, you will see a whole lot of mumbo jumbo. just simply select all ( Ctrl+A) and copy it.

5. Visit the website i gave out earlier, if you are a lazy bastard like me, here is the link again
Link?!

6. Paste everything into the "Html:" box and click convert. wait a little.

7. wait. its not long, really depends on the book.

8. Once something is in the xhtml box, select it all and copy it. Open up another notepad file paste everything in and save it with the .xhtml extension.

9. Copy it to the /book/ directory of your microsd and you are good to go.


Stuff you Don't Want!


alright as i said earlier, there are things you don't want in the xhtml. it won't exactly screw anything up but it makes it look extremely bad. heres a list of the stuff you don't want

Table of Contents
Acknowledgements
Character list
Glossary
Publication details
Maps
Images of any kind

Title
Sometimes when i use the process above, i get no title for my book when its loaded in dslibris. on the book selection screen it will show up as the file name. heres an example of what im talking about. Lets say my book is called "Wrath of a Mad God" and its filename was woamg.xhtml, sometimes when i use that proccess the selection screen will show woamg.xhtml instead of "wrath of a mad god". Its cause the file is missing the title or you just converted it wrong.

To add the title is really simple, open the converted file in notepad and simply type [Insert your title name here] where the first space/paragraph break is. so in this case it would be Wrath Of A mad God

Conclusion

hope you learned something new, just keep in mind that this was a rush 10-20 minute job. its night, cold and im tired. so i hope you have fun reading!
 

Dark^'^Knigh

Well-Known Member
Member
Joined
Apr 25, 2007
Messages
1,043
Trophies
0
Location
Paradise
Website
Visit site
XP
86
Country
Thanks, guide was simple enough to follow to convert .txt to .xhtml.
My problem is now I have installed dslibris in accordance with the readme and it loads fine (shows button controls, etc. but that's as far as I get). How do I see my selection of books to read?

Maybe, just maybe, I've done something wrong in setup or the placement of files, books, etc.
 

Dark^'^Knigh

Well-Known Member
Member
Joined
Apr 25, 2007
Messages
1,043
Trophies
0
Location
Paradise
Website
Visit site
XP
86
Country
Yep, dumped all files onto root (which I hate). Select the dslibris.nds file and it loads as follows:
left screen - dslibris logo; right side - dslibris user guide (top of screen) & prefs (bottom).

user guide states to hit select to enter the library browser. When I do that it only places an asterisk at the bottom of right side: [ 1* >
 

Bri

Well-Known Member
Member
Joined
Dec 25, 2007
Messages
3,413
Trophies
0
Website
Visit site
XP
116
Country
United States
Dark^'^Knight said:
Yep, dumped all files onto root (which I hate).

I think you misread what Incomplete wrote. It looks like the files have to be in a "books" folder, NOT on the root of the microSD card.

-Bri
 

Cermage

Well-Known Member
OP
Member
Joined
Dec 2, 2007
Messages
1,701
Trophies
0
Website
Visit site
XP
275
Country
oh i misread your comment. you don't press selct to go to the book select screen. you press start, select is a form of bookmarking
 

leonster

Active Member
Newcomer
Joined
Sep 29, 2008
Messages
34
Trophies
0
XP
24
Country
No Word 2008 = no go for me. I stick to OpenOffice exclusively.

And no Dreamweaver...

Any alternatives? Surely there must be some website that could convert it right from txt?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: (i was allowed to do that)