Project-Archiver
Project-Archiver copied to clipboard
Update ExportCommand.py with file name sanitisation
Add "slugify" method to sanitise filenames (removing haracters that aren't alphanumerics, underscores, or hyphens, and strip leading and trailing whitespace, dashes, and underscores).
Addresses issues #19 and #20
Just tried this, and it solved issues I was having with tapnair's original script. However, I had to add:
import unicodedata
import re
Am I missing something here, or did you forget to import the unicodedata and re libraries?
Sorry, yes I forgot to add those. I originally made changes to the local installation on my PC, and only created the fork and pull request afterwards from memory of what I changed. I will see if I can fix in the pull request.
I would also change so that the folder name is sanitized too.
integrated the closing change and the file name issue here https://github.com/o-gent/Project-Archiver