#!/bin/bash # # File: check-titles # Version: 0.10 # # Checks whether the PDF files are in two column style. They should be in 1-column style! # (C) 2025 by Manfred Jeusfeld. This script is made available under the # Creative Commons Attribution-ShareAlike CC-BY-SA 4.0 license. # # The BASH script is part of the scripts used for CEUR-WS.org. No warrantee whatsoever. No support. # # Requires the installation of certain packages, in particular perl # Install on Debian-based systems with # sudo apt install perl # # Note that this script is updated on a regular basis. # # The content of this script is also copied into check-pdf-errors. # # Manfred 2025-11-13 (2025-11-21) # if [ ! -f "index.html" ]; then echo "No file index.html found." exit 1 fi if [[ ! `ls *.pdf` ]]; then echo "No file with filetype *.pdf in this directory." exit 1 fi echo "" echo "(*) Check whether the paper titles in index.html match the title of the PDF file" echo "" MISMATCHTITLE="no" # Capture Perl output directly perl_output=$(perl -Mopen=locale -0777 -ne ' use strict; use warnings; my $any_mismatch = 0; # Subroutine to aggressively normalize text by removing punctuation and standardizing spaces. sub normalize_text { my ($text) = @_; # 1. Standardize whitespace and remove newlines $text =~ s/[\n\t\r]+/ /g; $text =~ s/\s+/ /g; # 2. Convert to lowercase $text = lc($text); # 3. FIX: Specifically strip known "noise" characters before stripping all punctuation # This handles both the standard * and the Unicode ⋆ $text =~ s/[\*\x{22c6}]//g; # 4. Remove all remaining non-alphanumeric characters $text =~ s/[^a-z0-9]/ /g; # 5. Final cleanup: collapse spaces so "Cyber-Security" and "Cyber Security" match $text =~ s/\s+//g; # Remove ALL spaces for a "condensed" comparison return $text; } while (/