diff --git a/install/INSTALL.md b/install/INSTALL.md index 21bc1a7..f6ef974 100644 --- a/install/INSTALL.md +++ b/install/INSTALL.md @@ -92,6 +92,7 @@ apt-get install libhtml-parser-perl libhtml-template-perl libhtml-template-compiled-perl + libmime-tools-perl libsession-token-perl libtext-multimarkdown-perl libtext-wikicreole-perl diff --git a/tools/cleanup-archive.pl b/tools/cleanup-archive.pl new file mode 100644 index 0000000..5d4f066 --- /dev/null +++ b/tools/cleanup-archive.pl @@ -0,0 +1,47 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Data::Dumper; + +my $base_dir=shift; +-d $base_dir or die "Usage: $0 \n"; + +my $now = time; +my $day = 24 *60 * 60; + +sub remove{ + my ($file) = @_; + print "remove $file\n"; + unlink $file; +} + +sub cleanup_files{ + my ($dir) = @_; + opendir my $dh, $base_dir or die "Could not open '$base_dir' for reading: $!\n"; + while (my $file = readdir $dh) { + next if $file eq '.' or $file eq '..'; + my $path="$base_dir/$file"; + if (-l $path){ + my $age = ($now-(lstat $path)[9])/$day; + remove $path if $age > 7; + }elsif (-f $path){ + my $age = ($now-(stat $path)[9])/$day; + remove $path if $age > 360; + } + } +} + +sub cleanup_tmp_files{ + my ($dir) = @_; + opendir my $dh, $dir or die "Could not open '$dir' for reading: $!\n"; + while (my $file = readdir $dh) { + next if $file eq '.' or $file eq '..'; + my $path="$base_dir/$file"; + my $age = ($now-(stat $path)[9])/$day; + remove $path if $age > 7; + } +} + +cleanup_files($base_dir); +cleanup_tmp_files("$base_dir/tmp"); + diff --git a/tools/remove-recordings.pl b/tools/remove-recordings.pl index f6c58eb..b38990c 100644 --- a/tools/remove-recordings.pl +++ b/tools/remove-recordings.pl @@ -25,11 +25,12 @@ my $entries = db::get($dbh, $query); my %paths = map {normalize($_->{path}) => $_->{start}} @$entries; my $dir = $config->{locations}->{local_audio_recordings_dir}; -for my $file (sort glob("$dir/*m4a")) { +for my $file (sort glob("$dir/*")) { + next if $file !~ /\.(mp3|wav|flac|aac|ogg|m4a|aiff|aif|opus|aac)$/i; next if -M $file < 14; my $filename = normalize($file); unless (exists $paths{$filename}) { - print " --- $filename\n"; + print "$filename\n"; unlink $file or die $! if $delete; } } diff --git a/website/agenda/planung/css/default.css b/website/agenda/planung/css/default.css index bae8f03..4d0ac27 100644 --- a/website/agenda/planung/css/default.css +++ b/website/agenda/planung/css/default.css @@ -710,7 +710,7 @@ ul.tabContainer li:last-child{ } #content #dialog{ - position:absolute; + position:fixed; z-index:1000; left: 0; right: 0;