How to create a new MIME type for a Sugar activity?
James Simmons
jim.simmons at walgreens.com
Mon Feb 4 12:21:42 EST 2008
I am writing a Sugar activity in Python. This activity will enable the
user to navigate through a list of image files stored in a Zip file by
using the arrow keys, and might support a slideshow feature too. There
might be a hundred image files stored in the Zip file. Grouping the
images in one file makes it much easier to deal with them in the Journal.
The thing is, I want this Zip file to have its own MIME type, so that:
1). The Etoys activity does not try to open the file, at all, ever.
EToys takes a long time to start up and shut down and it is really
annoying when I open the file with EToys instead of my own activity.
2). My Activity *does* open the file.
3). The Zip files containing images show up in the Journal with my own
Activity's icon, which looks like a slide projector.
To accomplish this I have created my Zip files with the extension
".slides" and I'd like to be able to use the MIME type
"application/slides" for such files.
I'm also interested in creating a reader program for Gutenberg etexts.
I'd like these files to have their own MIME type too so they don't get
opened by the Write activity by mistake. I was thinking of using a file
suffix of ".book" and a MIME type of "text/book" for these.
I tried using a mimetypes.xml file in the bundle but that didn't work.
I couldn't find an example of an Activity that used such a file so I'm
not certain I'm doing it correctly.
I'd appreciate any information on MIME types or on alternative
approaches that would solve problems 1-3. Thanks much,
James Simmons
More information about the Devel
mailing list