Generate .gitignore files from the command line or programmatically, in Python