5 # Copyright (C) 2008, ashley willis <barry@venamous.net>
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE.
16 # See the GNU General Public License in the COPYING file at the
17 # root directory of this project for more details.
19 # downloads all JPEG files in 'Content Store' to current directory.
23 @dump = `btool -d 'Content Store'`;
24 @converted = convertDump
(@dump);
26 # open $fh, "<", \$text;
27 # while (<$fh>) { #... }
29 foreach $file (@converted) {
30 open(IN
, "<", \
$file);
33 if ($head =~ /^!\0\x01$/) { # barrybackup data, ipd2tgz
37 read(IN
, $header, 15);
38 $header = $head . $header;
41 ($name, $remainder) = split(/\0/, <IN
>, 2);
42 ($name =~ /\.jpg$/) or next;