[Sugar-devel] activities using zip files

Tomeu Vizoso tomeu at sugarlabs.org
Fri May 29 10:57:26 EDT 2009


On Fri, May 29, 2009 at 00:24, James Simmons <jim.simmons at walgreens.com> wrote:
> Sascha,
>
> If the Activity creates a Zip file then the Journal automatically
> resumes it in that Activity.  Making Activities use a special MIME type
> when creating a Journal entry doesn't give me anything I don't have already.

Well, if the file has its own file extension, then when you move files
across computers it will be still resumable with your activity (and
will use its icon). Not critically important but may be handy in some
cases.

> Where we have problems is in downloading Zip files from Gutenberg and
> other places that don't do anything special with the MIME type.  For
> instance, Gutenberg has zipped up text files as well as zipped up
> websites (multiple html pages plus illustrations).  Somebody mentioned
> that Browse will eventually be able to save web pages with
> illustrations, etc. as zipfiles for offline reading.  If Browse could
> handle that, you'd also want it to be able to open these Gutenberg zip
> files if they are saved in the Journal, and it would be nice to do it
> with one click.

Yeah, Browse could grow some generic support for zip files, but anyway
the worst problem is that people are using zip files as a generic
container but without signaling its contents with an specific file
extension :/

> The format I use for View Slides is sometimes called CBZ.  It's just a
> Zip file containing images with a .cbz suffix rather than .zip.  The
> GNOME desktop recognizes this file type and displays the first image in
> the file as the file's icon.  I don't think there is a MIME type for
> that though.

View Slides could register a mime type for that extension. This way,
when someone downloads or copies a file ending in .cbz, ir would open
with VS and would use its icon. More info:

http://wiki.sugarlabs.org/go/Development_Team/Almanac/Activity_Bundles#Bundle_structure

Regards,

Tomeu

> James Simmons
>
>
> Sascha Silbe wrote:
>> On Wed, May 27, 2009 at 12:34:03PM -0500, James Simmons wrote:
>>
>>> 5).  When several Activities support the same MIME type (Zip files
>>> are BOUND to be popular) then there needs to be a way of specifying
>>> that a particular Journal entry should be resumed by a particular
>>> Activity by default.
>> Actually zip is just a container format and should be handled as such
>> (if possible at all). I.e. zips created by activities should use a
>> MIME type identifying the _contents_, not the generic application/zip.
>>
>> File formats can be - and often are - nested: OpenOffice documents are
>> xml-inside-zip, some other application might be using
>> xml-inside-tar-inside-gz and source tarballs are
>> (C+Makefile+...)-inside-tar-inside-bz2. Unfortunately, most software
>> using MIME types has very little support for such complexity (only
>> gzip/bzip/compress as "encodings"). While it would be nice for the
>> Journal to handle the full (i.e. nested) type, we'll need to cope with
>> the lack of support in other software (like web servers) for quite
>> some time.
>>
>> CU Sascha
>>
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>


More information about the Sugar-devel mailing list