yapfaq/contrib/convert.pl
Thomas Hochstein c969b7c2c1 Add conversion script for old status files.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2026-01-31 11:19:33 +01:00

16 lines
331 B
Perl
Executable file

#! /usr/bin/perl -w
#
# Convert pre-1.0 yapfaq status file to new format
#
# Usage: convert.pl < old.txt.cfg > new.cfg
while (<>) {
if (/Lastpost/) {
$_ =~ /Lastpost:\s(\d\d?\.\d\d?\.\d\d\d\d)/;
print "Last-Posted: $1\n";
}
if (/LastMID/) {
$_ =~ /LastMID:\s(<[^>]+>)/;
print "Last-Message-ID: $1\n";
}
}