Much better docs Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Anirudh Oppiliappan x@icyphox.sh
Mon, 03 Feb 2020 00:39:41 +0530
5 files changed,
81 insertions(+),
7 deletions(-)
M
example/1-hi.txt
→
example/1-hi.txt
@@ -1,8 +1,8 @@
HI THERE -Welcome to ${GRN}shlide${RST}. ${YLW}Here${RST} are a few bullet points: +Welcome to ${GRN}shlide${RST}. ${STR}Here${RST} are a few bullet points: - first point - second point - * sub point - * ${RED}another${RST} sub point + * ${ITA}sub point${RST} + * ${BLD}another${RST} sub point
A
license
@@ -0,0 +1,12 @@
+ + +The MIT License (MIT) + +Copyright (c) Anirudh Oppiliappan <x@icyphox.sh> + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. +
M
readme.md
→
readme.md
@@ -7,5 +7,58 @@ ## Features
- All slides are plain-text files. - Navigation using `j` / `k` or `n` / `p` -- [WIP] Colors and bold/italic formatting using terminal escape sequences. +- Colors and bold/italic formatting using terminal escape sequences. - Pure bash. + +## Usage + +Create a directory for your slides. Name each slide starting with +a number and a hyphen, like so: + +```shell +$ mkdir deck +$ touch deck/1-first-slide.txt +$ touch deck/2-another.txt + +# so on +``` + +### Formatting + +Slide content can be formatted like so: + +```txt +Welcome to ${GRN}shlide${RST}. ${STR}Here${RST} are a few bullet points: + +- first point +- second point + * ${ITA}sub point${RST} + * ${BLD}another${RST} sub point +``` + +**Note**: Make sure to `${RST}` (reset) at the end. + +A full list of formatting options are below: + +**Colors** + +`BLK` black +`RED` red +`GRN` green +`YLW` yellow +`BLU` blue +`PUR` purple +`CYN` cyan +`RST` reset + +**Styles** + +`BLD` bold +`DIM` dim +`ITA` italics +`UND` underline +`FLS` flashing +`REV` reverse +`INV` invert +`STR` strikethrough +
M
shlide
→
shlide
@@ -3,8 +3,7 @@ #
# Usage: shlide path/to/slides/ # Each slide is a textfile under path/to/slides -# Color definitions - +# Color definitions. BLK="\e[38;5;30m" RED="\e[38;5;31m" GRN="\e[38;5;32m"@@ -13,6 +12,16 @@ BLU="\e[38;5;34m"
PUR="\e[38;5;35m" CYN="\e[38;5;36m" RST="\e[0m" + +# Other formatting. +BLD="\e[1m" +DIM="\e[2m" +ITA="\e[3m" +UND="\e[4m" +FLS="\e[5m" +REV="\e[7m" +INV="\e[8m" +STR="\e[9m" lines() { mapfile -tn 0 lines < "$1"