Commit Graph
2 Commits
Author SHA1 Message Date
Cody Boone Ferguson ba764a1833 Fix tmp/format-headers.sh, format headers
The script had "s surrounding the git ls-files command which turned it
to a single file which of course is wrong.

Ran script again fixing many README.md files that had incorrect number
of blank lines for critical headers.

This will have to be done a final but a good number of files have been
corrected.
2023-12-27 08:54:28 -08:00
Cody Boone Ferguson d4032df767 Add tmp/format-headers.sh script from Landon
With a slight modification so that the script uses git ls-files so that
it only acts on files called README.md under the directories of the
years (i.e.  '[0-9]{4}/*README.md') that are under git control this
script formats headers so that the spacing before lines starting with
'##' (as in '^##') are correct. It checks for specific header names.
More could be added if necessary and if any heading level is wrong or it
is decided that a different heading level might be better the regexp can
be modified to fix it as well.

This script will be useful to run after every README.md file has been
updated.

Added to tmp/ as it is likely (or possibly?) a temporary tool that might
not be needed after the temp-test-ioccc repo is merged back into the
winner repo. On the other hand it might be useful to use after new
contests are run or even after some major edits of README.md files.

Uses perl in a bash loop.
2023-11-03 03:47:14 -07:00