From c95e3ac92611cbd5251285c39ecce2faeff321b1 Mon Sep 17 00:00:00 2001 From: Milan Date: Wed, 31 May 2023 20:26:35 +0200 Subject: [PATCH 1/5] fixup! mail.pm: encode UTF-8 header --- install/INSTALL.md | 1 + 1 file changed, 1 insertion(+) 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 From cdc0b1dd7783f77d7deb2f02d35a3d3f2a7b60d1 Mon Sep 17 00:00:00 2001 From: Milan Date: Wed, 31 May 2023 20:29:05 +0200 Subject: [PATCH 2/5] tools/remove-recordings.pl: support more audio file extensions --- tools/remove-recordings.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/remove-recordings.pl b/tools/remove-recordings.pl index f6c58eb..6ea112c 100644 --- a/tools/remove-recordings.pl +++ b/tools/remove-recordings.pl @@ -25,7 +25,8 @@ 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}) { From 2bad47df5f34bc3edd11bccdadc3f8ca8a235a07 Mon Sep 17 00:00:00 2001 From: Milan Date: Wed, 31 May 2023 20:30:32 +0200 Subject: [PATCH 3/5] tools/remove-recordings.pl: print simple list of files w/o special line format --- tools/remove-recordings.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/remove-recordings.pl b/tools/remove-recordings.pl index 6ea112c..b38990c 100644 --- a/tools/remove-recordings.pl +++ b/tools/remove-recordings.pl @@ -30,7 +30,7 @@ for my $file (sort glob("$dir/*")) { 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; } } From 18709215efe8a8f2b695ddbe9211e3263fd0f0a2 Mon Sep 17 00:00:00 2001 From: Milan Date: Sat, 23 Sep 2023 00:19:52 +0200 Subject: [PATCH 4/5] tools/cleanup-archive.pl: add Remove files older than a year and links older than a week in the directory provided as the first argument. --- tools/cleanup-archive.pl | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tools/cleanup-archive.pl 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"); + From 6a09da9aa6f8601fe695fe269a8e5c78f8d78929 Mon Sep 17 00:00:00 2001 From: Milan Date: Sat, 23 Sep 2023 00:48:33 +0200 Subject: [PATCH 5/5] default.css: fix off-screen dialog positioning Change dialog positioning to 'fixed' for consistent visibility within the viewport, addressing previous issues with off-screen placement. --- website/agenda/planung/css/default.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;