]> www.average.org Git - mkgallery.git/commitdiff
change include path name
authorEugene Crosser <crosser@average.org>
Fri, 22 Aug 2008 09:01:39 +0000 (09:01 +0000)
committerEugene Crosser <crosser@average.org>
Fri, 22 Aug 2008 09:01:39 +0000 (09:01 +0000)
improve rss generation

mkgallery.pl
mkgalrss.pl

index 2596b9834aafd430a012b5a34c94dab9d7286ba1..7efd5c4209209b42e03497f7b6ae9ee29e23bad2 100755 (executable)
@@ -74,13 +74,14 @@ if ($rssfile && ! $haverssxml) {
 my $term = new Term::ReadLine "Edit Title";
 
 FsObj->new(getcwd)->iterate;
 my $term = new Term::ReadLine "Edit Title";
 
 FsObj->new(getcwd)->iterate;
+if ($rssobj) { $rssobj->{'rss'}->save($rssobj->{'file'}); }
 
 sub help {
 
        print STDERR <<__END__;
 usage: $0 [options]
  --help:        print help message and exit
 
 sub help {
 
        print STDERR <<__END__;
 usage: $0 [options]
  --help:        print help message and exit
- --incpath:     do not try to find .include diretory upstream, use
+ --incpath:     do not try to find .gallery2 diretory upstream, use
                 specified path (absolute or relavive).  Use with causion.
  --debug:       print a lot of debugging info to stdout as you run
  --asktitle:    ask to edit album titles even if there are ".title" files
                 specified path (absolute or relavive).  Use with causion.
  --debug:       print a lot of debugging info to stdout as you run
  --asktitle:    ask to edit album titles even if there are ".title" files
@@ -134,10 +135,10 @@ sub getinc {
        my $depth=20;           # arbitrary max depth
 
        if ($incpath) {
        my $depth=20;           # arbitrary max depth
 
        if ($incpath) {
-               return $incpath."/.include";
+               return $incpath."/.gallery2";
        }
 
        }
 
-       my $inc=".include";
+       my $inc=".gallery2";
        while ( ! -d $fullpath."/".$inc ) {
                $inc = "../".$inc;
                last unless ($depth-- > 0);
        while ( ! -d $fullpath."/".$inc ) {
                $inc = "../".$inc;
                last unless ($depth-- > 0);
@@ -673,8 +674,7 @@ sub img_entry {
                my $w=$self->{$sz}->{'dim'}->[0];
                my $h=$self->{$sz}->{'dim'}->[1];
                print $IND "  ",a({-href=>$src,
                my $w=$self->{$sz}->{'dim'}->[0];
                my $h=$self->{$sz}->{'dim'}->[1];
                print $IND "  ",a({-href=>$src,
-                       -class=>"conceal ".
-                               (($sz == 640)?"slideshowThumbnail":""),
+                       -class=>"conceal",
                        -title=>"Reduced to ".$w."x".$h},
                        $w."x".$h)," \n";
        }
                        -title=>"Reduced to ".$w."x".$h},
                        $w."x".$h)," \n";
        }
index e2ee8a88fca2e4aaec34f9b63ebcc8bbcd27c219..419806b68ca84fe369f1af55573cd75dfb6b3685 100755 (executable)
@@ -48,13 +48,8 @@ sub help {
        print STDERR <<__END__;
 usage: $0 [options]
  --help:        print help message and exit
        print STDERR <<__END__;
 usage: $0 [options]
  --help:        print help message and exit
- --incpath:     do not try to find .include diretory upstream, use
-                specified path (absolute or relavive).  Use with causion.
  --debug:       print a lot of debugging info to stdout as you run
  --debug:       print a lot of debugging info to stdout as you run
- --asktitle:    ask to edit album titles even if there are ".title" files
- --noasktitle:  don't ask to enter album titles even where ".title"
-                files are absent.  Use partial directory names as titles.
- --rssfile=...:        build RSS feed for newly added "albums", give name of rss file
+ --rssfile=...:        name of the rss file to create
 __END__
 
        exit 1;
 __END__
 
        exit 1;
@@ -79,6 +74,8 @@ $term->addhistory($link) if ($link);
 my $desc = $term->readline('Gallery description >','');
 $term->addhistory($desc) if ($desc);
 
 my $desc = $term->readline('Gallery description >','');
 $term->addhistory($desc) if ($desc);
 
+$link .= '/' unless ($link =~ m%/$%);
+
 $rssobj->channel(
                title=>$title,
                link=>$link,
 $rssobj->channel(
                title=>$title,
                link=>$link,