···11HI THERE
2233-Welcome to ${GRN}shlide${RST}. ${YLW}Here${RST} are a few bullet points:
33+Welcome to ${GRN}shlide${RST}. ${STR}Here${RST} are a few bullet points:
4455- first point
66- second point
77- * sub point
88- * ${RED}another${RST} sub point
77+ * ${ITA}sub point${RST}
88+ * ${BLD}another${RST} sub point
+12
license
···11+22+33+The MIT License (MIT)
44+55+Copyright (c) Anirudh Oppiliappan <x@icyphox.sh>
66+77+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
88+99+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1010+1111+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1212+
+54-1
readme.md
···7788- All slides are plain-text files.
99- Navigation using `j` / `k` or `n` / `p`
1010-- [WIP] Colors and bold/italic formatting using terminal escape sequences.
1010+- Colors and bold/italic formatting using terminal escape sequences.
1111- Pure bash.
1212+1313+## Usage
1414+1515+Create a directory for your slides. Name each slide starting with
1616+a number and a hyphen, like so:
1717+1818+```shell
1919+$ mkdir deck
2020+$ touch deck/1-first-slide.txt
2121+$ touch deck/2-another.txt
2222+2323+# so on
2424+```
2525+2626+### Formatting
2727+2828+Slide content can be formatted like so:
2929+3030+```txt
3131+Welcome to ${GRN}shlide${RST}. ${STR}Here${RST} are a few bullet points:
3232+3333+- first point
3434+- second point
3535+ * ${ITA}sub point${RST}
3636+ * ${BLD}another${RST} sub point
3737+```
3838+3939+**Note**: Make sure to `${RST}` (reset) at the end.
4040+4141+A full list of formatting options are below:
4242+4343+**Colors**
4444+4545+`BLK` black
4646+`RED` red
4747+`GRN` green
4848+`YLW` yellow
4949+`BLU` blue
5050+`PUR` purple
5151+`CYN` cyan
5252+`RST` reset
5353+5454+**Styles**
5555+5656+`BLD` bold
5757+`DIM` dim
5858+`ITA` italics
5959+`UND` underline
6060+`FLS` flashing
6161+`REV` reverse
6262+`INV` invert
6363+`STR` strikethrough
6464+
+11-2
shlide
···33# Usage: shlide path/to/slides/
44# Each slide is a textfile under path/to/slides
5566-# Color definitions
77-66+# Color definitions.
87BLK="\e[38;5;30m"
98RED="\e[38;5;31m"
109GRN="\e[38;5;32m"
···1312PUR="\e[38;5;35m"
1413CYN="\e[38;5;36m"
1514RST="\e[0m"
1515+1616+# Other formatting.
1717+BLD="\e[1m"
1818+DIM="\e[2m"
1919+ITA="\e[3m"
2020+UND="\e[4m"
2121+FLS="\e[5m"
2222+REV="\e[7m"
2323+INV="\e[8m"
2424+STR="\e[9m"
16251726lines() {
1827 mapfile -tn 0 lines < "$1"