]> mj.ucw.cz Git - gallery.git/blobdiff - Gallery/Archive.pm
gal-mj-digikam: Use image title
[gallery.git] / Gallery / Archive.pm
diff --git a/Gallery/Archive.pm b/Gallery/Archive.pm
deleted file mode 100644 (file)
index 6fb3457..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# Simple Photo Gallery: Web Archiver
-# (c) 2005 Martin Mares <mj@ucw.cz>
-
-package Gallery::Archive;
-import Gallery qw(%CF);
-
-use IO::Handle;
-
-sub new($$) {
-       my ($cls, $type) = @_;
-       my $x = { 'type' => $type, 'files' => [] };
-       return bless $x;
-}
-
-sub Start($) {
-       my ($this) = @_;
-       my $type = $this->{'type'};
-       my $cts = { "tar" => "application/x-tar", "zip" => "application/zip" };
-       defined $cts->{$type} or die "Unknown archive type $type";
-       print "Content-Type: ", $cts->{$type}, "\n";
-       print "Content-Disposition: inline;filename=gallery.$type\n";
-       print "\n";
-}
-
-sub Finish($) {
-       my ($this) = @_;
-       my $type = $this->{'type'};
-       STDOUT->flush();
-       chdir($CF{"PhotoDir"}) or die;
-       if ($type eq "tar") {
-               system("/home/mj/bin/tar", "cf", "-", @{$this->{'files'}});
-       } elsif ($type eq "zip") {
-               system("zip", "-", @{$this->{'files'}});
-       } else { die; }
-}
-
-sub RawHTML($$) {
-}
-
-sub img($$$) {
-       my ($this, $orig, $annot) = @_;
-       push @{$this->{'files'}}, $orig;
-}
-
-1;