Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross-Platform Way of Creating Safari Webarchives

I've been searching around and haven't found any reference to tools that can create Safari's webarchive format.

Does anyone have pointers to code for creating this format, or at least a format reference documentation?

Ideally I'd like to build a tool that takes a directory and splits out a webarchive, for loading into a iPhone.

like image 689
morais Avatar asked Oct 20 '08 19:10

morais


2 Answers

To expand on what Ben said: CFLite (the cross-platform open-source subset of Core Foundation) ships with a plist parser. If you can link against that, it should be quite simple to work with .webarchive files, which are simply property lists that concatenate all files (HTML, CSS, etc.) into one.

There are other libraries as well, such as Mac-PropertyList on CPAN for Perl.

like image 176
Sören Kuklau Avatar answered Sep 22 '22 08:09

Sören Kuklau


I believe the format for .webarchives is officially undocumented, but it's just a plist. You can open it in the Property List Editor and examine its contents. Shouldn't be to hard to replicate most, if not all, of what's in there.

like image 28
Ben Gottlieb Avatar answered Sep 19 '22 08:09

Ben Gottlieb