diff options
Diffstat (limited to 'Master/texmf-dist/scripts/memoize/memoize-clean.py')
-rwxr-xr-x | Master/texmf-dist/scripts/memoize/memoize-clean.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/memoize/memoize-clean.py b/Master/texmf-dist/scripts/memoize/memoize-clean.py index dd543327cba..db758bbd352 100755 --- a/Master/texmf-dist/scripts/memoize/memoize-clean.py +++ b/Master/texmf-dist/scripts/memoize/memoize-clean.py @@ -18,13 +18,14 @@ # The files belonging to this work and covered by LPPL are listed in # <texmf>/doc/generic/memoize/FILES. -__version__ = '2023/10/10 v1.0.0' +__version__ = '2024/01/02 v1.1.0' import argparse, re, sys, pathlib, os parser = argparse.ArgumentParser( description="Remove (stale) memo and extern files.", - epilog = "For details, see the man page or the Memoize documentation." + epilog = "For details, see the man page or the Memoize documentation " + "(https://ctan.org/pkg/memoize)." ) parser.add_argument('--yes', '-y', action = 'store_true', help = 'Do not ask for confirmation.') @@ -63,7 +64,8 @@ for mmz_fn in args.mmz: elif endinput: raise RuntimeError( - r'Bailing out, \endinput is not the last line of file $mmz_fn.') + rf'Bailing out, ' + rf'\endinput is not the last line of file {mmz_fn}.') elif m := re_prefix.match(line): prefix = m[1] @@ -109,7 +111,8 @@ tbdeleted = [] def populate_tbdeleted(folder, basename_prefix): re_aux = re.compile( re.escape(basename_prefix) + - '[0-9A-F]{32}(?:-[0-9A-F]{32})?(?:-[0-9]+)?(?:\.memo|(?:-[0-9]+)?\.pdf|\.log)$') + '[0-9A-F]{32}(?:-[0-9A-F]{32})?' + '(?:-[0-9]+)?(?:\.memo|(?:-[0-9]+)?\.pdf|\.log)$') try: for f in folder.iterdir(): if re_aux.match(f.name) and (args.all or f not in keep): @@ -157,3 +160,8 @@ if tbdeleted: print("Bailing out.") elif not args.quiet: print('Nothing to do, the directory seems clean.') + +# Local Variables: +# fill-column: 79 +# after-save-hook: py2dtx +# End: |