Current obraz.py silently purges the entire destination directory, which is wrong as a misunderstood usage message or a typo may result in unlimited damage to the system.
The help message should make clear that:
--destinationis supposed to be the root of the site itself
- what is the default destination
obraz.pyis about to purge everything in this directory (ALLCAPS please)
-d --destination=DIR Destination directory (default: ./_site) -- WILL BE PURGED!
The program should not act as a silent alias to
rm -rf, and instead
- may try to identify an existing site directory (by dropping there a special .dotfile, or checking if
index.htmland year-like subdirectories are present); if the destination doesn't appear to be a site directory, ask for confirmation
- may always ask for confirmation if non-default destination is used, and implement
--purge-destinationoption for the bravest