Loading README.md +1 −6 Original line number Diff line number Diff line Loading @@ -24,14 +24,9 @@ Before proceeding, **make sure that there are no uncommitted changes in your wor Then run: ```bash # Clean previous html make clean # Fix references to sections in other docs for i in [0-1]*.md; do sed -i "s/\.md\#/\.html\#/g" $i; done # Build html documentation make html # Restore the markdown files to their previous state git reset --hard ./fix_cross_references.sh ``` The generated HTML output is stored in `_build/html`. You can go to that folder and publish the content locally with a Simple HTTP Server in Python. Loading fix_cross_references.sh 0 → 100755 +10 −0 Original line number Diff line number Diff line #!/bin/bash # # This is needed to fix a bug in sphinx # Otherwise, cross-references in html will point to a .md file # for file in $(find _build -name "*.html") do sed -r -E -i "s/href=\"(.*)\.md\#/href=\"\1.html#/g" ${file} done upload-doc.sh +35 −10 Original line number Diff line number Diff line #!/bin/bash # # Script to upload documentation to ETSI site # SERVER="ftp://osm-download.etsi.org" FOLDER="user-guid" FTP_OPTS="" # # Generate Statit Site # make clean for i in [0-1]*.md; do sed -i "s/\.md\#/\.html\#/g" $i; done make html read -p "Please enter your username for FTP server (ETSI On Line account): " USER_INPUT read -sp "Please enter your password for FTP server: " PASSWORD_INPUT echo lftp -u $USER_INPUT,$PASSWORD_INPUT ftp://osm-download.etsi.org << ! # # Fix cross-references # ./fix_cross_references.sh # # Get credentias (file or interactive) # if [ local/.credentials ]; then source local/.credentials echo SERVER=${SERVER} echo USERNAME=${USERNAME} else echo "Enter credentials for ${SERVER} (ETSI On Line account)" read -p "Username: " USERNAME read -sp "Password: " PASSWORD fi lftp ${FTP_OPTS} -u ${USERNAME},${PASSWORD} ${SERVER} << ! set ftp:ssl-allow no lcd _build cd Documentation mirror -R html user-guide-new rm -r user-guide mv user-guide-new user-guide mirror -R html ${FOLDER}-new rm -r ${FOLDER}-old mv ${FOLDER} ${FOLDER}-old mv ${FOLDER}-new ${FOLDER} bye ! git reset --hard Loading
README.md +1 −6 Original line number Diff line number Diff line Loading @@ -24,14 +24,9 @@ Before proceeding, **make sure that there are no uncommitted changes in your wor Then run: ```bash # Clean previous html make clean # Fix references to sections in other docs for i in [0-1]*.md; do sed -i "s/\.md\#/\.html\#/g" $i; done # Build html documentation make html # Restore the markdown files to their previous state git reset --hard ./fix_cross_references.sh ``` The generated HTML output is stored in `_build/html`. You can go to that folder and publish the content locally with a Simple HTTP Server in Python. Loading
fix_cross_references.sh 0 → 100755 +10 −0 Original line number Diff line number Diff line #!/bin/bash # # This is needed to fix a bug in sphinx # Otherwise, cross-references in html will point to a .md file # for file in $(find _build -name "*.html") do sed -r -E -i "s/href=\"(.*)\.md\#/href=\"\1.html#/g" ${file} done
upload-doc.sh +35 −10 Original line number Diff line number Diff line #!/bin/bash # # Script to upload documentation to ETSI site # SERVER="ftp://osm-download.etsi.org" FOLDER="user-guid" FTP_OPTS="" # # Generate Statit Site # make clean for i in [0-1]*.md; do sed -i "s/\.md\#/\.html\#/g" $i; done make html read -p "Please enter your username for FTP server (ETSI On Line account): " USER_INPUT read -sp "Please enter your password for FTP server: " PASSWORD_INPUT echo lftp -u $USER_INPUT,$PASSWORD_INPUT ftp://osm-download.etsi.org << ! # # Fix cross-references # ./fix_cross_references.sh # # Get credentias (file or interactive) # if [ local/.credentials ]; then source local/.credentials echo SERVER=${SERVER} echo USERNAME=${USERNAME} else echo "Enter credentials for ${SERVER} (ETSI On Line account)" read -p "Username: " USERNAME read -sp "Password: " PASSWORD fi lftp ${FTP_OPTS} -u ${USERNAME},${PASSWORD} ${SERVER} << ! set ftp:ssl-allow no lcd _build cd Documentation mirror -R html user-guide-new rm -r user-guide mv user-guide-new user-guide mirror -R html ${FOLDER}-new rm -r ${FOLDER}-old mv ${FOLDER} ${FOLDER}-old mv ${FOLDER}-new ${FOLDER} bye ! git reset --hard