A Node tool designed to convert Word (docx) files into simple HTML suitable for WordPress.
This tool will convert all .docx
files in the input
folder into WordPress-style HTML. WordPress-style HTML, in this case, means it doesn't bother with <p>
tags or other entities that will be taken care of by the WordPress autop filter.
The following features are currently supported:
- Paragraphs
- Headings
- Lists
- Footnotes (will be converted to endnotes wrapped in the appropriate Notes section)
- Blockquotes
The Nursing Clio Doc Converter requires NodeJS and npm. Node 15 is the recommended version of node to use. NC Doc Converter will probably work with other versions of node (at least as far back at 10), but no promises.
You can confirm node and npm are installed by running the following commands in a terminal:
node -v
npm -v
NodeJS and npm can be installed from the NodeJS website, using a package manager like Homebrew, or using a version manager like nvm.
NodeJS and npm can be installed from the NodeJS website, or by using the WSL and following the instructions for Linux.
NodeJS and npm can be installed using a package manager (follow the instructions on the nvm), or using a version manager like nvm.
Once the installation prerequisites are met, you are ready to install and use the NC Doc Converter.
- Download the latest version from GitHub and extract it into whatever directory you like.
- Open a terminal in the Doc Converter directory. (The shortcut for this is to double-click on the File Explorer address bar or press
alt
+d
, and then typecmd
and press enter.) - Install the npm dependencies with the command:
npm install
If you prefer to use Git to keep the NC Doc Converter up to date, you can instead clone it into your desired directory with git clone https://github.com/nursingclio/doc-converter.git
.
- Open a terminal in the Doc Converter directory. (The shortcut for this is to double-click on the File Explorer address bar or press
alt
+d
, and then typecmd
and press enter.) - Install the npm dependencies with the command:
npm install
- Move the docx files you want to convert into the
input
folder in the NC Doc Converter folder (which will be called "doc-converter-x.x.x" or "doc-converter" by default). - The NC Doc Converter must be run from a terminal. Open a terminal in the Doc Converter directory.
- Run the command
npm run NCconvert
- You should now find html files in the
output
directory corresponding to the docx files in theinput
directory. - You can run the
NCconvert
npm command multiple times with the same files. The output file will be overwritten. - To clean up you can either manually remove the input and output files, or you can run the command
npm run clean
to delete all of the files in both input and output directories.
- Move the docx files you want to convert into the
input
folder in the NC Doc Converter folder (which will be called "doc-converter-x.x.x" or "doc-converter" by default). - The NC Doc Converter must be run from a terminal. Open a terminal in the Doc Converter directory. The shortcut for this is to double-click on the File Explorer address bar or press
alt
+d
, and then typecmd
and press enter. - Run the command
npm run NCconvertwin
- You should now find html files in the
output
directory corresponding to the docx files in theinput
directory. - You can run the
NCconvertwin
npm command multiple times with the same files. The output file will be overwritten. - To clean up you can manually remove the input and output files. (The
clean
script does not work in Windows at this time.)
- If you installed manually using the source code file, you can update at any time by downloading a new version and replacing the old files with the new ones.
- If you installed using Git you can run
git pull origin stable
to update to the latest stable version.
Default usage: npm run NCconvert
Other commands:
npm run clean
: Delete all files in theinput
andoutput
folders.npm run clean:input
: Delete all files in theinput
folder only.npm run clean:output
: Delete all files in theoutput
folder only.