#----------------------------------------------------------------------------\ safari_download v3.0 http://jafat.sourceforge.net Copyright 2007 - Jake Cunningham #----------------------------------------------------------------------------\ Background: =========== The Safari web browser on MacOSX stores information about downloaded files in <~user>/Library/Safari/Downloads.plist . This is a text format XML property list file. Details: ======== This program parses the Safari XML Downloads.plist file and presents the contents in TAB delimited format. It has been tested on Linux with GNUstep and OSX 10.4. Changes since v1.0,v2.0: ======================== Version 3.0: - is now written in Objective-C (GNUStep/Cocoa) where as the previous versions (1.0 and 2.0) were written in PERL and required an additional PERL module. - prints out all of the key/value pairs found, rather than pre-determined key/value pairs (as in v1.0). - detects the presence of error code -999 which indicates the download was canceled or interrupted, and prints the (derived) status: - Interrupted - Canceled - Completed - Unknown Installing: ============ safari_download is being distributed in both binary and source code formats. The binary version: The binary version is a statically linked binary built on Linux and should run on any x86 Linux distribution. To install the binary version, simply unpack the tarball and copy the safari_download binary to your desired location. To compile the source code version: - Install GNUstep (See: http://www.gnustep.org) - Initialize the GNUstep environment using the following command: (Assuming GNUstep is installed in /usr/lib/GNUstep) ". /usr/lib/GNUstep/System/Library/Makefiles/GNUstep.sh" - Compile: cd safari_download make After compilation, the dynamically linked binary will be in the obj/shared_obj directory. Copy this binary to your desired location. To statically compile the binary substitute the "make" command with: make shared=no The resulting statically linked binary will be in the obj/static_obj/ directory. Compile the source code (OSX): -------------------------------------- - Compile: cd safari_download make -f Makefile.OSX The resulting binary, safari_download, can be copied to your desired location. Usage: ====== $ safari_download The output is written to STDOUT in TAB delimited format. Caveats: ======== This version of the script does not parse the NSData values in the DownloadEntryAliasBlob and DownloadEntryPostAliasBlob keys of the Download.plist file. - When using this program with GNUStep/Linux you may receive the following error message which appears to be the result of a bug in GNUStep. This error does not impede the function of the safari_download program: safari_downloads[###] don't know how to load entity 'http://www.apple.com/DTDs/PropertyList-1.0.dtd' id '-//Apple Computer//DTD PLIST 1.0//EN' .:3: validity error : Validation failed: no DTD found ! LICENSE: ======== safari_download (Copyright 2007 Jake Cunningham) is distributed under the GNU GPL v2. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #----------------------------------------------------------------------------\