Shiny New E-Book Gizmo: The Amazon Kindle


View Full Version : softlinks via manifest.xml


wallcraft
01-19-2008, 09:51 PM
Last week there was a post to i to i blog about: how to easily access content on the external memory (http://i-to-i.irexnet.com/2008/01/10/tips-tricks-how-to-easily-access-content-on-the-external-memory/). In internal memory, it involves adding a subdirectory containing just a manifest.xml such as:
<package>
<symlink>/mnt/cf/books</symlink>
</package>
The subdirectory then shows up as a standard directory in the contentlister, which will take you to the CF card. If this is all you do, the link shows up in contentlister as "books", rather than "/mnt/cf/books", so this could be confusing if you had several external media types. The post suggests fixing this by adding a manifest.xml to your /mnt/cf/books directory, so that it shows up as "Books on CF card". I would rather have a technique for distinguishing between the symlink and the actual directory, but this does seem to be a viable method for setting up symlinks to directories - providing having them only work in the contentlister is ok.

daudi
01-20-2008, 04:02 AM
It is indeed a good method, but you need to take care. See this thread (http://forum.irexnet.com/viewtopic.php?t=2194) on the irex forum. Note what happens when you delete a symlink using the contentlister---you delete what the link points to, not the link itself. I was hoping that we could add an image to show that it is a link, but it seems we cannot.

Blue
01-20-2008, 04:55 AM
I've been thinking about this feature. Isn't there a command you can put in a shell script that changes the directory that the contentlister displays?

Then you could make your directory in for example books, place a manifest file in it that points to the shell script like thoose in the installer packages and avoid thoose problems like deleting or images...

-Thomas-
01-20-2008, 05:09 AM
As I just pointed out in the iRex forum, there is another method for linking directories without having the delete problem. Add a new directory and put the following manifest.xml in it:

<package>
<metadata>
...
</metadata>
<directory>
<content>/mnt/cf/documents</content>
</directory>
</package>

This way the directory shows up too, but the symlink can be deleted correctly.

daudi
01-20-2008, 06:39 AM
Cool. And by including <y-metadata>
<image>link.png</image>
</y-metadata> you can have an image making it clear this is a link and not the original.

Now I just need to symlink this post to the thread on the irex forum :)

Dabon
06-01-2008, 01:46 AM
Hi Thomas and Daudi,

The softlinks feature seems a very good feature that I would like to be able to install, but I have to admit that I am somewhat lost in your experts comments. Thomas recommended to install another directory, and i am wondering if I should install the manifest files described by Wallcraft first? or should I just add a new directory (where?) and create a manifest file (where? CF internal or both?) with the content described by Thomas and Daudi??
I am very confused and would really appreciate if one of you would be kind as to provide me with some step by step installation/creation.
Thanks a million in advance.

daudi
06-01-2008, 05:12 AM
OK, this should be a complete recipe:

create a directory, give it any name you like
create a file called manifest.xml as shown below in the directory you have just created
set the directory in the manifest to point to where you want to link to
optionally add an image file to show this is a link


Here's a complete manifest.xml file<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<dc-metadata>
<Title>This is the title</Title>
<Description>This is the description</Description>
<Date>2008-04-21T11:41:48</Date>
</dc-metadata>
<y-metadata>
<image>link.png</image>
</y-metadata>
</metadata>
<directory>
<content>/mnt/usb/iliad</content>
</directory>
</package>
This creates a symlink that points to a directory called "iliad" on the usb (/mnt/usb/iliad) and makes it clear that this is a symlink by the use of an image. If you don't want to use an image to identify that this is a link then you can remove <y-metadata>
<image>link.png</image>
</y-metadata>

I've attached an example that contains four symlinks: to books and notes on the internal memory, USB and to CF. You can change the path that these point to to anything you like, even shares on your PC if you have networking setup that way. Now there's a thought ...

Dabon
06-18-2008, 06:29 PM
Dear Daudi,

Thank you very much for your response and the symlink examples sent. Please accept my apologies as I was on a business trip and was not able to respond to you earlier.
I was finally able to test your symlink files with mitigated success.
1. First test: I copied the symlink files that you provided (manifest xml and link png) to the CF book folder and I was able to read the books on the internal memory from the CF Book folder successfully. In addition to the fact that this is not really what I want to ultimately accomplish, the other issue in that case was that i could not access the other books uploaded on my CF Book folder, but only books from the internal memory were accessibles.
2. Second test: I made a couple of modifications to the book manifest xml file that you provided (Description: Books on the CF; content: mnt/CF/Books), and I copied the modified manifest and the link png files to the existing internal memory Book folder, but this time was not able to access books from the CF/Book folder???:blink::angry::blink: when I tried to click on the link file which appeared I opened a Notes type of file with the png....

I guess what I really want to be able to accomplish is to have a link from the intenal memory folders (Books, Documents, Notes and Newspapers) to the CF folders (Books, Documents, Notes and Newspapers) so that I can access my CF files (almost all of them) quicker by using the iliad buttons.

I really don't know what i am doing wrong, but i will appreciate if you can again extend me a helping hand..:)
Thanks a million in advance,

Dabon.

daudi
06-19-2008, 01:23 AM
OK, try these. These assume that you have folders called:

books
documents
notes
newspapers

on your cf card. So, thats's: /mnt/cf/books etc. Note that these are lower case. Copy the attached symlink entries to the appropriate internal memory locations of your iliad. They could in fact go anywhere, as they always point to the same place, but to achieve what you want just copy the cf-books folder to the books folder on internal memory; copy the cf-notes folder to the notes folder on your iliad, and so on. Then you can press the iliad Books button and one of the entries will be one that points to Books on the CF.

If you want this symlink to always be the first entry in the contentlister, change the name of the folder from cf-books to 00cf-books (i.e. put a couple of zeros at the front).

Dabon
06-19-2008, 02:04 AM
THANK YOU SOOO MUCH, Daudi!!!! You saved my life!!!
This is exactly what I was looking for...I sincerely hope that one day will come when I will somehow be able to 'properly' thank you and all the others iliad developers for your dedicated hard work..helping total strangers...
May God bless you!!!
Take good care,

Dabon.

daudi
06-19-2008, 03:44 AM
You're welcome! I'm glad it is sorted.