diff --git a/ChangeLog b/ChangeLog index c021313..9ff8866 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ yapfaq 1.1.0 (unreleased) * --test: Set Supersedes and don't modify Message-ID if -o is set. * --test: Force -o if -n is not set. +* Add conversion script for old status files. yapfaq 1.0.1 (2025-01-24) * Add %t placeholder for Message-ID (feature parity with 0.9). diff --git a/contrib/convert.pl b/contrib/convert.pl new file mode 100755 index 0000000..fa5699a --- /dev/null +++ b/contrib/convert.pl @@ -0,0 +1,16 @@ +#! /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"; + } +}