Changeset 678


Ignore:
Timestamp:
1999-10-15T12:37:10+13:00 (25 years ago)
Author:
sjboddie
Message:

added bookcover

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/GBBPlug.pm

    r616 r678  
    3333
    3434# Imput files are expected to be GB encoded and have .gbb file extension
     35
     36# An jpeg image with the same filename as the .gbb file will be associated
     37# as cover.jpg if it exists
    3538
    3639package GBBPlug;
     
    8285
    8386    my $cursection = $doc_obj->get_top_section();
     87
     88    # copy the book cover if it exists
     89    my ($bookcover) = $filename =~ /^(.*?)\.gbb$/i;
     90    $doc_obj->associate_file("$bookcover.jpg", "cover.jpg", "image/jpeg")
     91    if -e "$bookcover.jpg";
    8492
    8593    my $text = "";
Note: See TracChangeset for help on using the changeset viewer.