Mercurial > hg > python
changeset 64:fff2fa031ed7
regexp finished, I hope
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Thu, 14 Dec 2023 11:43:44 +0000 |
parents | 721bd7a04efb |
children | 5e5feacb730d |
files | repair.py |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/repair.py Thu Dec 14 10:16:28 2023 +0000 +++ b/repair.py Thu Dec 14 11:43:44 2023 +0000 @@ -98,20 +98,21 @@ marks: merge unseen keys, unequal values for same key prefer gnus EXCEPT bogus, w3c-ac-forum, handle by hand method: change "ht" to "nnml+ht", flag anything else + FIX group-2002-07 in gnus by hand params: TBD + + Comparison tool: - paste <(cat shared) <(fgrep -f shared mail/alist.fixed | sed 's/ \([0-9]\) '"$P $P/ \1 \2 \5 /g" | cut -f 3) <(fgrep -f shared gnus/alist.fixed | sed 's/ \([0-9]\) '"$P $P/ \1 \2 \5 /g" | cut -f 3) | { IFS=' ' ; while read gn g m; do if [ "$g" != "$m" ]; then printf "=----%s------\n%s\n%s\n" "$gn" "$g" "$m"; fi; done ; } | less - Watch out for tabs! To look for overlap, change 2nd \n in printf to \t export T=$'\t' -export B1="(\(\([-0-9a-z]\+\|([^)]*)\) \?\)*)" -export P1="\(nil\|$B1\)" -export P2="\(nil\|\((\($B1 \?\)*)\)\)" -export M='\("[^"]*"\|(nndraft "")\)' - - fgrep -f shared mail/alist.fixed | sed 's/ \([0-9]\) '"$P1 $P2 / \1 \2 \5 /;s/\(.*${T}.*${T}.*${T}\)$M /\1\2${T}/" + export B1="(\(\([^()]\+\|([^)]*)\) \?\)*)" + export P1="\(nil\|$B1\)" + export P2="\(nil\|\((\($B1 \?\)*)\)\)" + export MA='\("[^"]*"\|(nndraft "")\)' + fgrep -hf shared {gnus,mail}/alist.fixed | sed 's/ \([0-9]\) '"$P1 $P2 / \1 \2 \5 /;s/\(.*${T}.*${T}.*${T}\)$MA $P2/\1\2${T}\4/" + paste <(cat shared) <(fgrep -f shared mail/alist.fixed | sed 's/ \([0-9]\) '"$P $P/ \1 \2 \5 /g" | cut -f 3) <(fgrep -f shared gnus/alist.fixed | sed 's/ \([0-9]\) '"$P $P/ \1 \2 \5 /g" | cut -f 3) | { IFS=' ' ; while read gn g m; do if [ "$g" != "$m" ]; then printf "=----%s------\n%s\n%s\n" "$gn" "$g" "$m"; fi; done ; } | less '''