User Tools

Site Tools


start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
start [2026/04/12 16:14] abeverleystart [2026/06/03 11:48] (current) abeverley
Line 92: Line 92:
   # Maximum width 400px   # Maximum width 400px
   mogrify -resize '400>' *.png   mogrify -resize '400>' *.png
 +
 +===== Comparing and normalising documents =====
 +
 +Use this to compare PDF and word documents:
 +
 +  * Same the word document as plain text
 +  * Use ''pdftotext'' to convert the PDF to plain text
 +
 +Use this Perl script to normalise each file:
 +
 +  my $str = do { local $/; <STDIN> };
 +  # Strip paragraph numbers
 +  $str =~ s/^[0-9.]+/\n\n/mg;
 +  # Remove wrapped lines that are not paragraph separators
 +  $str =~ s/(?<!\n)\n(?!\n)/ /g;
 +  # Strip space at beginning of lines
 +  $str =~ s/^\h+//mg;
 +  # Normalise paragraph breaks
 +  $str =~ s/\v\v+/\n\n/g;
 +
 +Compare both files using ''git diff --word-diff=color''
  
 ===== Using Overlay (OpenStreetMap) ===== ===== Using Overlay (OpenStreetMap) =====
start.1776010441.txt.gz · Last modified: by abeverley