A github repo for code to convert the Roadmap to Reentry into HTML.
Make sure you have node and python3 installed.
An outline of commands used, for people who are comfortable on the command line:
git clone https://github.com/rootandrebound/roadmap-to-html.git
cd roadmap-to-html
python3 -m venv . # create a python virtual environment
source bin/activate # activate the virtual environment
make install # install all node and python dependencies
make # build the output
git clone https://github.com/rootandrebound/roadmap-to-html.git
cd roadmap-to-html
To get started, you need to download the original word document and put it in the root project folder. Download source.docx
and put it in the root folder for this repository.
Note that the preceding link should only be accessible to staff members at Root & Rebound or people who have been given specific access to the containing folder.
This step ensures that any python dependencies will not interfere with other Python projects on your computer. This step is a common good practice when working on any project that uses Python.
python3 -m venv . # create a python virtual environment
source bin/activate # activate the virtual environment
This command will install all the dependencies for both Node and Python.
make install
This command will:
- Produce an output similar to what is described here.
- Run the necesary gulp tasks to compile and minify CSS & Javascript
make
This command will fire up a development server and you will be able to see the site opening http://localhost:3000/ in your browser.
make server
The Makefile includes one command for producing the HTML output:
node_modules/mammoth/bin/mammoth \ # the path to mammoth's executable
./source.docx \ # the path to the input word document
--output-dir=roadmap \ # the output directory
--style-map=stylemap.txt # the stylemap
mv output/source.html \ # rename the resulting html doc
output/raw_index.html
python main.py # chop up and output each chapter