![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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). Last edited by Bert; 05-06-2007 at 12:48 PM. |
![]() |
![]() |
![]() |
#2 |
Pac-Man caught my iLiad.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. Last edited by yokos; 04-12-2007 at 07:44 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#4 |
Pac-Man caught my iLiad.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Pac-Man caught my iLiad.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. ![]() [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>
Code:
<?xml version="1.0" encoding="iso-8859-1"?> Last edited by yokos; 04-13-2007 at 04:53 AM. Reason: utf-8 bug |
![]() |
![]() |
![]() |
#7 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#8 | |
Feedbooks.com Co-Founder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#10 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 2898
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
|
Here's another, quite large, update:
As always, source + dist in first post. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
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 |