|
|
View Full Version : comic2iliad
comic2iliad
a html "book" generator for the iRex iLiad. Powered by AutoIt V3.
Screenshot:
http://img291.imageshack.us/img291/4647/screenshotcz8.jpg
Get the new less CPU cycles wasting Version! And the self-contained executable. ;)
Changelog
20061212
Added Self-contained executable. (No need to install AutoIT)
Switched to OnEvent mode.
20061130
Added ability to read a simple image list
for the archive:
Since there has nothing changed with the manifest.xml bug I don't understand, i will repost my script set here. The .zip contains only the source, you will need AutoIt (http://www.autoitscript.com) to run it.
I remember you again, the packages generated don't work at the moment, linking between the pages works as expected, the total number of pages is set correctly in the page indicator, but it won't display your current position.
Maybe someone is smarter than me and will find the failure I made.
The main part is comic2iliad.au3, what gui.au3 and language.au3 contain should be obvious.
The old one will produce transitional HTML, the newer Version transitional XHTML, as W3C compatible as is possible to have it running on the iLiad.
Update:
Forget about the before mentioned problems, it should all work now.
Bonus: I added the ability to read the file names of the images from a simple txt file (imgs.txt) in the "img" directory. One filename per line. (do a "dir /1 > imgs.txt" and sort the names after that)
scotty1024 10-19-2006, 05:29 PM Since there has nothing changed with the manifest.xml bug I don't understand, i will repost my script set here.
I think your problem is that there is only one valid "type" and that value is "overview".
See attached PictureBook application I whipped up from my RFC formatter as a proof-of-concept for you.
The two critical things I think are:
In manifest.xml:
manifest.append(" <Type>overview</Type>\n");
and
manifest.append(" <pagelist type=\"overview\" count=\"").append(pictures.length).append("\">\n");
In an HTML file:
index.append("<meta name=\"keywords\" type=\"overview\">\n");
This application produces working files, so you can use it as a reference.
To compile:
javac PictureBook.java
To Run:
java PictureBook manga45981 mangaBook45981
I can swear, that the files I created have been working, I think that was in v2.5. I have really no clue why it doesn't work now.
As far as I understand the HowTo, <Type>overview</Type> has nothing to do with linking the page indicator to the pages. Only <meta name="keywords" type="overview"> should be important and the type is defined by what pagelist types are available in the manifest.xml.
scotty1024 10-20-2006, 01:42 PM Tweak your files to match, see if they work. If they work, we can speculate on why then, or you can get busy reading comics. :)
I did that before I complained about that again. And guess what, that doesn't seem to be the reason.
scotty1024 10-20-2006, 05:26 PM Did you run my tool against your picture collection? Did the produced book work properly?
bite me, your java thingie works. The only big difference i see ist that it doesn't add a doc type definition header. have to try that out.
Edit:
My html-page:
<html>
<head>
<link rel="prev" href="9.html"/>
<link rel="next" href="11.html"/>
<meta name="keywords" type="comic">
<title>Twokinds</title>
</head>
<body>
<center>
<img src="./img/20031110.jpg" alt="Image"/>
</center>
</body>
</html>
This is what the java tool makes:
<html>
<head>
<link rel="prev" href="page0001.html"/>
<link rel="next" href="page0003.html"/>
<meta name="keywords" type="overview">
<title>Page 2</title>
</head>
<body>
<center>
<img src="img/20031024.jpg"/>
</center>
</body>
</html>
My manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<dc-metadata>
<Title>Twokinds</Title>
<Description>comic2iliad</Description>
<Date>2006-10-21T14:14:39</Date>
<Format/>
<Identifier/>
<Language>en-us</Language>
<Type>comic</Type>
</dc-metadata>
<y-metadata>
<startpage>1.html</startpage>
<version>000</version>
</y-metadata>
</metadata>
<index>
<pagelist type="comic" count="335">
<page number="001" url="1.html"/>
<page number="002" url="2.html"/>
<page number="003" url="3.html"/>
<page number="004" url="4.html"/>
<page number="005" url="5.html"/>
....
<page number="333" url="333.html"/>
<page number="334" url="334.html"/>
<page number="335" url="335.html"/>
</pagelist>
</index>
</package>
The manifest generated by your tool:
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<dc-metadata>
<Title>.\img</Title>
<Description>Picutre Book</Description>
<Date>2006-10-21T12:39:21</Date>
<Format/>
<Identifier/>
<Language>en-us</Language>
<Type>overview</Type>
</dc-metadata>
<y-metadata>
<startpage>page0001.html</startpage>
<version>000</version>
</y-metadata>
</metadata>
<index>
<pagelist type="overview" count="334">
<page number="0001" url="page0001.html"/>
<page number="0002" url="page0002.html"/>
<page number="0003" url="page0003.html"/>
<page number="0004" url="page0004.html"/>
<page number="0005" url="page0005.html"/>
...
<page number="0332" url="page0332.html"/>
<page number="0333" url="page0333.html"/>
<page number="0334" url="page0334.html"/>
</pagelist>
</index>
</package>
The only difference I still see is the indention, but if the xml would be interpreted correct, that should not make a difference, or am I wrong?
scotty1024 10-24-2006, 09:29 PM You haven't given up have you?
I can do a lot of things with Java but hooking into a windows product to auto-magically pump the comics into the iLiad isn't one of them.
Did you try generating your documents with "overview" as the type? I realize you want to use "comic" but ... the iLiad may want things its way. :)
The only difference I still see is the indention, but if the xml would be interpreted correct, that should not make a difference, or am I wrong?
Always best to indent xml... It shouldn't make a difference, but its easier for you to see your mistakes. I'd change the type to overview, and see if that helps. Oh, and make sure there aren't any ctrl-m chars (Windows linefeeds) in the xml. Again, shouldn't make a difference but so far (since I don't use Windows) I'm not sure if this makes a difference.
Let us know how you get on...! :D
found the problem. Looks like the page-indicator doesnt like this
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<dc-metadata>
<Title>Twokinds</Title>
<Description>comic2iliad</Description>
<Date>2006-10-21T14:14:39</Date>
<Format/>
<Identifier/>
<Language>en-us</Language>
<Type>comic</Type>
</dc-metadata>
<y-metadata>
<startpage>1.html</startpage>
<version>000</version>
</y-metadata>
</metadata>
<index>
<pagelist type="comic" count="335">
<page number="001" url="1.html"/>
<page number="002" url="2.html"/>
<page number="003" url="3.html"/>
<page number="004" url="4.html"/>
<page number="005" url="5.html"/>
....
<page number="333" url="333.html"/>
<page number="334" url="334.html"/>
<page number="335" url="335.html"/>
</pagelist>
</index>
</package>
but this:
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<dc-metadata>
<Title>2kinds</Title>
<Description>nix</Description>
<Date>2006-10-25T16:56:36</Date>
<Format/>
<Identifier/>
<Language>en-us</Language>
<Type>overview</Type>
</dc-metadata>
<y-metadata>
<startpage>page1.html</startpage>
<version>000</version>
</y-metadata>
</metadata>
<index>
<pagelist type="overview" count="335">
<page number="1" url="page1.html"/>
<page number="2" url="page2.html"/>
<page number="3" url="page3.html"/>
....
<page number="332" url="page332.html"/>
<page number="333" url="page333.html"/>
<page number="334" url="page334.html"/>
<page number="335" url="page335.html"/>
</pagelist>
</index>
</package>
The urls seem to cause the whole trouble. Any idea why?
BTW: I have tried to set everything to type "overview" before that. It hadn't helped.
The urls seem to cause the whole trouble. Any idea why?
BTW: I have tried to set everything to type "overview" before that. It hadn't helped.
The pages you link to need to exist for the manifest.xml file to "work"...?
read my post again, please. my problem was that I had " <page number="[0-9]" url="[0-9].html"/> ". It seems to me like the iLiad needs, to have the setup working properly, at least one non-decimal character at the beginning of the html filename.
scotty1024 10-25-2006, 08:59 PM My guess would be Mathis thinks filenames can't start with numbers.
Good work! I'm sure there are more than a few graphic novelists eagerly awaiting your new scripts.
I think I'm going to switch this Tool to PyGTK. From my point of view this has the advantage, that I would only write that script once. Presuming we had Python+PyGTK together on the iLiad, I would than have a tool running on Linux, the iLiad and even on Windows (I think there are some nice tricks to pack the Python parts into a single .EXE). So you would be able to just put the images in a directory and let the iLiad do the work.
Personal advantage for me: I would come to learn a cross-platform script language.
Anyone care to comment?
Edit: I just got another idea: XUL (XML User Interface Language) would be another approach. Since we already have a Mozilla browser on it that is able to run XUL, why not try that.
I just have to find out if and how I can get access to the files.
scotty1024 10-29-2006, 06:00 AM The iLiad has gtk support but no Python. However, if you used a python compiler that should still work nicely.
I'd stay away from XUL though, not exactly a speed demon even when you have a real CPU.
bump for update:
to fulfill my own lazyness, i added the ability to read a image list file. It just has to be placed in the "img" dir, filename "imgs.txt". If this file is available, the script will only use the files in that list, it doesn't check for forgotten/new images. This file contains one image filename per line, in the order they should appear in the finished document.
Example:
file1.jpg
file2.gif
file3.png
...
I'm waiting to hear some other ideas from you.
ok, i really want to know why there are only 4 downloads of the latest version? Is it that bad? Or missing functions?
Give me feedback and I can make it better.
we got an update. See first post (http://www.mobileread.com/forums/showpost.php?p=43104&postcount=1).
I always find it amusing that my take on this (http://www.syngrithy.org.uk/index.php?pT=2) is so often downloaded... Its hit the 200 mark, and that includes four hits from someone in Holland... :blink:
I think that points out what most people are doing with their expensive e-reader devices... They're not reading heavy-weight newspapers on them... They're reading comics, instead...! :D
kapoira 12-14-2006, 06:50 AM at least for me this is true (i don't use this program), i have buy the iliad to read books,manuals AND manga. This is the use i'm now doing but another think to mention is that i buy the iliad, to have a linux machine, and the possibilities to port thinks to them,put the monitors of various machines and see in a "page", chess, go, to put wargames style pen &paper,....
splat 12-14-2006, 04:23 PM This looks like a great app and definitely one I will use if I get the iLiad. Are there any photos or video of the end result (comics on the iLiad). How is the page refresh when reading. I know with alot of manga, there is not very much text so slow page refresh could be a tad annoying.
What are peoples experiences?
|