maint: enable evo3-sync plugin builds in binary-meta scripts
[barry/progweb.git] / contrib / perlbarry / bimages
blobf6fdcf22dbbf6e7133819eef3a5c6206c55ee02c
1 #!/usr/bin/perl
3 # get-jpeg version 0.1
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.
21 #$HEAD = 0;
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);
31 $jpeg = 0;
32 read(IN, $head, 3);
33 if ($head =~ /^!\0\x01$/) { # barrybackup data, ipd2tgz
34 $header = $head;
36 else {
37 read(IN, $header, 15);
38 $header = $head . $header;
41 ($name, $remainder) = split(/\0/, <IN>, 2);
42 ($name =~ /\.jpg$/) or next;
44 $remainder = "