Python renaming functions for file blinding and (optional) renaming back to the original.
To use:
chmod +x renamer.py
> ./renamer.py blindrename [dir]
> ./renamer.py unblind [dir]
Alternatively, in a Python shell:
import renamer
folder = [path to files]
renamer.blindrename(folder)
renamer.unblind(folder)
Output of blindrename will be a keyfile.csv that can be used to unblind later if desired.
This is largely a feature extension and translation of Jim Salters's excellent blindrename.pl (https://doi.org/10.5281/zenodo.44678). This is meant to be a Python translation that also incorporates reverse functionality in case the user does something bad (running on the home folder seems the most likely incidental - most other cases are covered by checking for root at the start of the script).