Created
May 31, 2018 18:47
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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