askrobots / dbbasic-manx
Public
manx.py: man pages in BBS style, with ANSI colours and syntax highlighting, using only the Python standard library.
demo.sh · 1.1 KB · 44 lines
| 1 | #!/bin/bash |
| 2 | # Demo script for manx.py |
| 3 | |
| 4 | echo "================================" |
| 5 | echo "MANX.PY - BBS Manual Viewer Demo" |
| 6 | echo "================================" |
| 7 | echo "" |
| 8 | |
| 9 | echo "1. Viewing the main menu:" |
| 10 | echo " $ python manx.py" |
| 11 | echo "" |
| 12 | python manx.py 2>&1 | head -15 |
| 13 | echo "" |
| 14 | echo "Press Enter to continue..." |
| 15 | read |
| 16 | |
| 17 | echo "2. Viewing a specific page:" |
| 18 | echo " $ python manx.py dbbasic-tsv" |
| 19 | echo "" |
| 20 | python manx.py dbbasic-tsv 2>&1 | head -50 |
| 21 | echo "" |
| 22 | echo "Press Enter to continue..." |
| 23 | read |
| 24 | |
| 25 | echo "3. With NO_COLOR environment variable:" |
| 26 | echo " $ NO_COLOR=1 python manx.py dbbasic-tsv" |
| 27 | echo "" |
| 28 | NO_COLOR=1 python manx.py dbbasic-tsv 2>&1 | head -30 |
| 29 | echo "" |
| 30 | echo "Press Enter to continue..." |
| 31 | read |
| 32 | |
| 33 | echo "4. Viewing syntax-highlighted code sections:" |
| 34 | python manx.py dbbasic-tsv 2>&1 | grep -A 25 "QUICK START" |
| 35 | echo "" |
| 36 | |
| 37 | echo "================================" |
| 38 | echo "Demo complete!" |
| 39 | echo "================================" |
| 40 | echo "" |
| 41 | echo "Try it yourself:" |
| 42 | echo " python manx.py # View menu" |
| 43 | echo " python manx.py dbbasic-tsv # View dbbasic-tsv manual" |
| 44 | echo " NO_COLOR=1 python manx.py dbbasic-tsv # Disable colors" |