Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-11-2007, 05:13 PM   #1
Bert
Enthusiast
Bert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with others
 
Posts: 43
Karma: 2898
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
iLiad Manifest Creator

Because I was getting tired of always copy-pasting manifest.xml files, and editing them with notepad to get a pdf or folder with description and icon, I wrote another little java app to do just that.

The program can create and edit manifests for documents and directories. It allows to add a title, description and image to the manifest (note that you can use line breaks in the description). The image will be copied; You can also resize it to 69x93, set the background color and convert it to gray-scale (the iLiad's 16 levels). It is also possible to reset the current reading position to page 1.
Note that it is possible to drag & drop files and text to the text boxes.
It should work in all OS'es (I only tested Windows XP though), and requires JRE 1.4 (or above).

Watch out when you create a directory manifest: It moves all directory contents to a subdirectory, because that allows us to have a folder with manifest, but without manifest.xml in the file list (as I found out earlier). So don't try this with system folders!

Little request: Does anybody have the original images used by the iLiad (for pdfs, folders, ...)? I wanted to edit them a little, but couldn't find them in the sources (and I don't have shell access).


Updates:
v1.0 (11-04-2007): initial release
v1.1 (12-04-2007): bugfix
v1.2 (12-04-2007): bugfix (xml tags are case sensitive ... I didn't know that)
v1.3 (13-04-2007): another bugfix (problems with encodings)
v2.0 (06-05-2007): Creating manifest for dir no longer moves content to subdir, allow multiple source files (useful for mobipocket ebooks).
Attached Files
File Type: zip ILiadManifestCreator v1.3.zip (75.1 KB, 563 views)
File Type: zip ILiadManifestCreator v1.3-src.zip (138.9 KB, 511 views)
File Type: zip ILiadManifestCreator v2.0.zip (76.6 KB, 825 views)
File Type: zip ILiadManifestCreator v2.0-src.zip (139.1 KB, 689 views)

Last edited by Bert; 05-06-2007 at 12:48 PM.
Bert is offline   Reply With Quote
Old 04-12-2007, 07:26 AM   #2
yokos
Pac-Man caught my iLiad.
yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.
 
yokos's Avatar
 
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
Bert, I have a problem here. Your java program copies the pdf file & created image to a new subfolder, but no manifest.xml is written. :
system: Windows XP SP2, JRE 1.5
[Edit I] Same problem with dirs. Files are copied to "dir_content" sub dir, no manifest.xml was written.
[Edit II] I removed all maybe special characters in filenames & text for manifest.xml -> no other result; ok, this was not the crux.
Attached Thumbnails
Click image for larger version

Name:	iLiadManifestCreator_01.png
Views:	687
Size:	25.5 KB
ID:	3089   Click image for larger version

Name:	iLiadManifestCreator_02.png
Views:	562
Size:	4.3 KB
ID:	3090   Click image for larger version

Name:	iLiadManifestCreator_03.png
Views:	613
Size:	14.7 KB
ID:	3091  

Last edited by yokos; 04-12-2007 at 07:44 AM.
yokos is offline   Reply With Quote
Advert
Old 04-12-2007, 11:08 AM   #3
Bert
Enthusiast
Bert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with others
 
Posts: 43
Karma: 2898
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
I made a silly mistake: I made some last-minute change before making this post (added an extra check), without testing it ...

Version 1.1 on the first post.
Bert is offline   Reply With Quote
Old 04-12-2007, 11:32 AM   #4
yokos
Pac-Man caught my iLiad.
yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.
 
yokos's Avatar
 
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
Thanks, it is working now.
Bert, a new masterpiece.

[Edit] You can find the "original images" in /usr/share/contentlister. The 2.8 filesystem is here:
http://projects.mobileread.com/iliad/projects/os/

Last edited by yokos; 04-12-2007 at 11:45 AM.
yokos is offline   Reply With Quote
Old 04-12-2007, 03:16 PM   #5
Bert
Enthusiast
Bert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with others
 
Posts: 43
Karma: 2898
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
I'm writing quite some bugs, I really should test these things more ... I tested creating those manifests, checking only if they looked the same as the other ones, without actually using them. The first time I try to use them: no title, no description!
It seems that XML tags are case sensitive, and iRex made a little mess with their tags: some start with capitals and others don't (Title, Description and Date start with capitals, image, version and startpage don't.)

Anyway ... v1.2 is available on the first post.
Bert is offline   Reply With Quote
Advert
Old 04-13-2007, 04:23 AM   #6
yokos
Pac-Man caught my iLiad.
yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.
 
yokos's Avatar
 
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
Yeah, I found this out, too. No description.
I have written here "working" before watching result on iLiad, no good idea.

Bert, does your new java program convert the text input to UTF-8 compliant encoding? V1.1 didn't do this. We discussed this UTF-8 thing in my older manifest thread.

[EDIT] I checked version 1.2
UTF-8 bug is still there. Your java program doesn't check whether text input is compliant to UTF-8!
Non-compliant characters are written to manifest.xml. -> Contentlister can't handle manifest.xml.
See below code, "äöü" isn't correct UTF-8 encoding.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<package>
    <metadata>
        <dc-metadata>
            <Title>Title</Title>
            <Description>German Umlaute äöü</Description>
            <Date>2007-04-13T10:29:55</Date>
        </dc-metadata>
        <y-metadata>
            <image>Der Spiegel 11 2007.png</image>
            <startpage>Der Spiegel 11 2007.pdf</startpage>
        </y-metadata>
    </metadata>
</package>
We solved this by changing the first line of manifest to
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
iLiad screenshot shows utf-8 bug [last entry] [v1.1].
Attached Thumbnails
Click image for larger version

Name:	utf-8_bug.png
Views:	740
Size:	102.6 KB
ID:	3108  

Last edited by yokos; 04-13-2007 at 04:53 AM. Reason: utf-8 bug
yokos is offline   Reply With Quote
Old 04-13-2007, 05:23 AM   #7
Matthijs
Groupie
Matthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enough
 
Matthijs's Avatar
 
Posts: 199
Karma: 666
Join Date: Oct 2006
Location: Eindhoven, the Netherlands
Device: iLiad, DR1000S, DR800SG
You should REALLY make sure the manifest.xml files are using UTF-8 encoding. I thought that Java is fully unicode internally anyway? The problem is not that the characters are not supported by UTF-8, the XML file is written using the wrong character encoding.
Matthijs is offline   Reply With Quote
Old 04-13-2007, 05:56 AM   #8
Hadrien
Feedbooks.com Co-Founder
Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.
 
Hadrien's Avatar
 
Posts: 2,263
Karma: 145123
Join Date: Nov 2006
Location: Paris, France
Device: Sony PRS-t-1/350/300/500/505/600/700, Nexus S, iPad
Quote:
Originally Posted by Matthijs
You should REALLY make sure the manifest.xml files are using UTF-8 encoding. I thought that Java is fully unicode internally anyway? The problem is not that the characters are not supported by UTF-8, the XML file is written using the wrong character encoding.
Yes you can easily support UTF-8 in Java, it should be quite simple to correct this bug.
Hadrien is offline   Reply With Quote
Old 04-13-2007, 06:16 AM   #9
Bert
Enthusiast
Bert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with others
 
Posts: 43
Karma: 2898
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
Well, you're all right ... Java uses unicode internally but uses the local system encoding when reading/writing files. I had to explicitely set the encoding to UTF-8 when reading & writing the files, while I thought the XML encoder took care of that (I set the 'encoding' property to 'UTF-8' and thought that was enough ... that was clearly not the case).

Like I said, I should have tested this thing more before releasing it. It was a simple app ... and the xml files looked OK (in notepad) ... no need to switch on my iLiad, it would work anyway ...

v1.3 should work completely (and I tested it quite thoroughly - on my iLiad), you can find it on the first post as usual.
Bert is offline   Reply With Quote
Old 05-06-2007, 12:45 PM   #10
Bert
Enthusiast
Bert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with othersBert plays well with others
 
Posts: 43
Karma: 2898
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
Here's another, quite large, update:
  • When creating a manifest for a directory, the content will no longer be moved to a subdirectory.
    I saw how iRex did this for the mobipocket folder ... It's quite silly really: use '.' as directory content (in the manifest) and the manifest won't be visible in the file list. To hide the image you just start its name with a '.' (like always in Linux).
  • It is now possible to select multiple files as source. All selected files (and directories) will be moved to the subdir (if it's a new manifest). You'll have to select the startpage manually, although it tries to guess: if it finds a .pdf, .mobi or .prc file it will be selected standard.
    This allows us to create manifests for mobipocket books, which use 2 files.
  • Selecting source files is now somewhat different: to create manifest you select the directory or file(s) like earlier, to edit the manifest you select either the directory containing the manifest or the manifest.xml itself (selecting the source file again won't work!). I did this because it became unclear when selecting multiple source files.

As always, source + dist in first post.
Bert is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iLiad softlinks via manifest.xml wallcraft iRex Developer's Corner 11 02-17-2009 03:33 AM
creator is as mysterious as sublime creator bassetti Introduce Yourself 2 08-24-2008 06:49 AM
Manga creator from JPEGs? (BBeb creator) jessesn Sony Reader 3 10-03-2006 12:06 AM
BookDesigner PDF creator for iRex iLiad dummies Alexander Turcic iRex 2 09-11-2006 04:04 AM
iLiad More Manifest Tags arivero iRex Developer's Corner 21 08-19-2006 03:21 PM


All times are GMT -4. The time now is 11:28 AM.


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