Skip to content

Instantly share code, notes, and snippets.

@jontey
Created May 31, 2018 18:47
Show Gist options
  • Save jontey/aa343b9842dbf03abe09664f4a27c24a to your computer and use it in GitHub Desktop.
Save jontey/aa343b9842dbf03abe09664f4a27c24a to your computer and use it in GitHub Desktop.
Run Tidy2 for each html file in folder using Notepad++ and Python Script
import os;
import sys;
filePathSrc = notepad.prompt('Enter the path to the folder where the files are located', 'Convert files to UTF-8', 'C:\\');
for root, dirs, files in os.walk(filePathSrc):
for fn in files:
if fn[-5:] == '.html':
notepad.open(root + "\\" + fn)
console.write(root + "\\" + fn + "\r\n")
notepad.runPluginCommand("Tidy2", "Tidy (config 1)")
notepad.save()
notepad.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment