|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
############################################################################### |
|
|
############################################################################### |
|
|
# (B) Use `m2r` to convert automatically produced `.md` docs to `.rst` |
|
|
|
|
|
|
|
|
# (B) Use `m2r2` to convert automatically produced `.md` docs to `.rst` |
|
|
############################################################################### |
|
|
############################################################################### |
|
|
|
|
|
|
|
|
# Install `m2r` |
|
|
|
|
|
pip3 install m2r |
|
|
|
|
|
|
|
|
# Install `m2r2` |
|
|
|
|
|
pip3 install m2r2 |
|
|
|
|
|
|
|
|
# Copy and then convert the `.md` docs |
|
|
# Copy and then convert the `.md` docs |
|
|
cp ./*.md docs/ |
|
|
cp ./*.md docs/ |
|
|
cd docs/ || exit |
|
|
cd docs/ || exit |
|
|
m2r --overwrite ./*.md |
|
|
|
|
|
|
|
|
m2r2 --overwrite ./*.md |
|
|
|
|
|
|
|
|
# Change excess `H1` headings to `H2` in converted `CHANGELOG.rst` |
|
|
# Change excess `H1` headings to `H2` in converted `CHANGELOG.rst` |
|
|
sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst |
|
|
sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst |