App-MaMGal

 view release on metacpan or  search on metacpan

TODO  view on Meta::CPAN

There could also be an option to just remove generated files, rather than
creating them.

There are some features in imageindex which would be nice to have, such as
graphic smileys, or greater ability to control the appearance of pages.

Ability to rapidly move from a directory to any of its parents by clicking on a
component of the path displayed at the top of the page.

Parallel processing - having all CPUs busy generating the gallery would be
nice, but need to think AT LEAST of the following possibly non-thread-safe
calls first:
 - fork (to call mplayer): possibly fork off a worker process before starting any threads
 - localtime/gmtime: :-/
 - readdir: only ever call from the main thread?
 - thread-safety of other modules that we use

Investigate the possibility of speeding up loading of creation timestamp from
the EXIF data, possibly by caching it. Currently it constitutes most of the
processing time for regenerating the top-most index file.

Add an option to treat directories more than N levels deep and older than T
days as not needing a refresh. This would significantly speed up refreshes of
large galleries.

Make description suppression optional.

lib/App/MaMGal/Entry/Dir.pm  view on Meta::CPAN

	}
	return $prev, $next;
}


sub _write_contents_to
{
	my $self = shift;
	my $code = shift;
	my $suffix = shift;
	# TODO: this will be an issue when mamgal goes multi-threaded
	my $tmp_name = $self->child('.mamgal-tmp');
	my $full_name = $self->child($suffix);
	$self->SUPER::_write_contents_to($code, $tmp_name, $full_name);
}

sub _side_length
{
	my $self = shift;
	my $picture_count = shift;

lib/App/MaMGal/Logger.pm  view on Meta::CPAN


our $not_available_warned_before = 0;
our $exe_failure_warned_before = 0;

sub log_exception
{
	my $self = shift;
	my $e = shift;
	my $prefix = shift;
	if ($e->isa('App::MaMGal::MplayerWrapper::NotAvailableException')) {
		# TODO this needs to be made thread-safe
		return if $not_available_warned_before;
		$not_available_warned_before = 1;
	} elsif ($e->isa('App::MaMGal::MplayerWrapper::ExecutionFailureException')) {
		# TODO this needs to be made thread-safe
		goto JUST_LOG if $exe_failure_warned_before or (! $e->stdout and ! $e->stderr);
		$exe_failure_warned_before = 1;
		$self->log_message($e->message, $prefix);
		$self->log_message('--------------------- standard output messages -------------------', $prefix);
		$self->log_message($_, $prefix) for $e->stdout ? @{$e->stdout} : ();
		$self->log_message('--------------------- standard error messages --------------------', $prefix);
		$self->log_message($_, $prefix) for $e->stderr ? @{$e->stderr} : ();
		$self->log_message('------------------------------------------------------------------', $prefix);
		return;
	} elsif ($e->isa('App::MaMGal::SystemException')) {



( run in 0.828 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )