Skip to content
Makes workable HTML from Microsoft Word's Web-Filtered HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
convert
images
misc
.gitignore
CMatch.ps1
README.md
ReplaceIT.ps1
ReplaceInFolder.ps1
regex.md

README.md

ReplaceIT

This cleans Word's "Web Page, Filtered" output.

###How-To

Save your Word document as "Web Page, Filtered (*.htm;*.html)".

Clone this repository into a local folder and place your htm files into the "convert" directory.

cd C:\Users\Whatever\ReplaceIT
.\ReplaceInFolder.ps1 .\convert\YourFolder-or-File

ReplaceIT will confirm the file, or list all of the .htm files in the folder you target and ask you if you would like to convert them. (Want to submit a PR? Make it look multiple levels down)

!! ReplaceIT will search down multiple folders and convert any .htm files it finds !!

###Options

.\ReplaceInFolder.ps1 .\TargetDirectory -log

Logs all operations to a logfile in the current directory.

###Functions

  • Creates a backup before converting
  • Removes inline styling
  • Identifies super and subscripts (pretty damn well)
  • Case-sensitive foreign language character replacement
  • Replaces all images with a placeholder
  • Formats tables
  • Converts bulleted lists to unordered lists
  • Adds "title" class to linked <p> elements

Many thanks to Michael Clark for his remarkable expertise.

You can’t perform that action at this time.