10-19-2006, 02:55 PM | #1 |
Übernerd
Posts: 238
Karma: 74
Join Date: Jun 2006
Location: Germany
Device: iRex iLiad
|
comic2iliad
comic2iliad
a html "book" generator for the iRex iLiad. Powered by AutoIt V3. Screenshot: Get the new less CPU cycles wasting Version! And the self-contained executable. Changelog 20061212
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 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) Last edited by b_k; 12-18-2006 at 01:31 PM. Reason: we got another update |
10-19-2006, 06:29 PM | #2 | |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Quote:
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 |
|
Advert | |
|
10-20-2006, 11:00 AM | #3 |
Übernerd
Posts: 238
Karma: 74
Join Date: Jun 2006
Location: Germany
Device: iRex iLiad
|
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. |
10-20-2006, 02:42 PM | #4 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
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.
|
10-20-2006, 03:58 PM | #5 |
Übernerd
Posts: 238
Karma: 74
Join Date: Jun 2006
Location: Germany
Device: iRex iLiad
|
I did that before I complained about that again. And guess what, that doesn't seem to be the reason.
|
Advert | |
|
10-20-2006, 06:26 PM | #6 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Did you run my tool against your picture collection? Did the produced book work properly?
|
10-21-2006, 06:48 AM | #7 |
Übernerd
Posts: 238
Karma: 74
Join Date: Jun 2006
Location: Germany
Device: iRex iLiad
|
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: Code:
<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> Code:
<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> Code:
<?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> Code:
<?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> Last edited by b_k; 10-21-2006 at 08:35 AM. Reason: added some examples |
10-24-2006, 10:29 PM | #8 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
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. |
10-25-2006, 04:57 AM | #9 | |
Evangelist
Posts: 458
Karma: 293
Join Date: May 2006
|
Quote:
Let us know how you get on...! |
|
10-25-2006, 11:03 AM | #10 |
Übernerd
Posts: 238
Karma: 74
Join Date: Jun 2006
Location: Germany
Device: iRex iLiad
|
found the problem. Looks like the page-indicator doesnt like this
Code:
<?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> Code:
<?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> BTW: I have tried to set everything to type "overview" before that. It hadn't helped. |
10-25-2006, 11:12 AM | #11 | |
Evangelist
Posts: 458
Karma: 293
Join Date: May 2006
|
Quote:
|
|
10-25-2006, 11:36 AM | #12 |
Übernerd
Posts: 238
Karma: 74
Join Date: Jun 2006
Location: Germany
Device: iRex iLiad
|
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.
|
10-25-2006, 09:59 PM | #13 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
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. |
10-29-2006, 03:41 AM | #14 |
Übernerd
Posts: 238
Karma: 74
Join Date: Jun 2006
Location: Germany
Device: iRex iLiad
|
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. Last edited by b_k; 10-29-2006 at 05:23 AM. |
10-29-2006, 07:00 AM | #15 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
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. |