1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #1891 from holta/holta-lokole-pdf

Take 2: Add Lokole PDF (User's Guide) to http://box/info offline docs
This commit is contained in:
A Holt 2019-07-20 14:07:37 -04:00 committed by GitHub
commit 05fab8a6f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 9 deletions

View file

@ -1,17 +1,23 @@
#!/bin/bash -x
# Pull down repo's entire wiki (and similar) to create offline docs
# This /opt/iiab/iiab/roles/httpd/templates/refresh-wiki-docs.sh becomes
# /usr/bin/iiab-refresh-wiki-docs during IIAB's install.
set -e
source {{ iiab_env_file }}
# This pulls down iiab/iiab repo's entire Tech Docs Wiki (and scrapes/downloads
# other docs!) to create IIAB's offline docs collection: http://box/info
set -e # Exit on error (avoids snowballing)
source {{ iiab_env_file }} # /etc/iiab/iiab.env
INPUT=/tmp/iiab-wiki
OUTPUT=/tmp/iiab-wiki.out
DESTPATH=/library/www/html/info
DESTPATH={{ doc_root }}/info # /library/www/html/info
DOCSPATH=$DESTPATH/docs # /library/www/html/info/docs
rm -rf $INPUT
rm -rf $OUTPUT
mkdir -p $INPUT
mkdir -p $OUTPUT
mkdir -p $DOCSPATH
git clone https://github.com/iiab/iiab.wiki.git $INPUT
@ -38,12 +44,15 @@ lynx -reload -source https://github.com/XSCE/xsce/blob/release-6.2/ReleaseNotes6
lynx -reload -source https://github.com/XSCE/xsce/blob/release-6.2/ReleaseNotes6.1.md > $DESTPATH/ReleaseNotes6.1.html
# Download Raspberry Pi guides
wget -nc -P $DESTPATH https://www.raspberrypi.org/magpi-issues/Beginners_Guide_v1.pdf
wget -nc -P $DESTPATH https://dn.odroid.com/IoT/other_doc.pdf
wget -nc https://www.raspberrypi.org/magpi-issues/Beginners_Guide_v1.pdf -O $DOCSPATH/Raspberry_Pi_Beginners_Guide_v1.pdf || true # Overrides set -e
wget -nc https://dn.odroid.com/IoT/other_doc.pdf -O $DOCSPATH/Raspberry_Pi_User_Guide_v4.pdf || true
cp -p "{{ iiab_dir }}/roles/lokole/Lokole-IIAB_Users_Manual.pdf" $DOCSPATH # /opt/iiab/iiab
# Update Raspberry Pi guide links on main page (http://box/info)
sed -i -r "s|https://www.raspberrypi.org/magpi-issues/Beginners_Guide_v1.pdf|Beginners_Guide_v1.pdf|g" $DESTPATH/index.html
sed -i -r "s|https://dn.odroid.com/IoT/other_doc.pdf|other_doc.pdf|g" $DESTPATH/index.html
sed -i -r "s|https://www.raspberrypi.org/magpi-issues/Beginners_Guide_v1.pdf|docs/Raspberry_Pi_Beginners_Guide_v1.pdf|g" $DESTPATH/index.html
sed -i -r "s|https://dn.odroid.com/IoT/other_doc.pdf|docs/Raspberry_Pi_User_Guide_v4.pdf|g" $DESTPATH/index.html
sed -i -r "s|https://github.com/iiab/iiab/blob/master/roles/lokole/Lokole-IIAB_Users_Manual.pdf|docs/Lokole-IIAB_Users_Manual.pdf|g" $DESTPATH/index.html
# Make links refer to local items
for f in $DESTPATH/*.html; do

View file

@ -80,7 +80,7 @@ Lokole and Internet-in-a-Box would welcome a business plan (whether volunteer-ba
Troubleshooting
---------------
For further usage information and troubleshooting, refer to the `Lokole user manual <https://github.com/iiab/iiab/raw/master/roles/lokole/The%20Lokole-IIAB%20User's%20Manual.pdf>`_.
For further usage information and troubleshooting, refer to the `Lokole user manual <Lokole-IIAB_Users_Manual.pdf>`_.
Known Issues
------------

View file

@ -1,3 +1,6 @@
# Lokole PDF (User's Guide) gets copied for offline use (http://box/info) here:
# https://github.com/iiab/iiab/blob/master/roles/httpd/templates/refresh-wiki-docs.sh#L47
- name: "Install 7 packages for Lokole: python3, python3-pip, python3-venv, python3-dev, libffi-dev, libssl-dev, bcrypt"
apt:
name: