code cleanup. missing headers added. hopefully did not break anything.

master
Sam Hunter 1 year ago
parent 1128583370
commit 78af763006

4
Shl

@ -1,6 +1,7 @@
#! /bin/bash
# Simple browser/viewer for RTC shlog
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
# Keys:
# Esc | Ctrl-q | Ctrl-g: exit
@ -11,6 +12,9 @@
# Enter: open current shlog entry in $EDITOR
# virtually any other: search/filtering
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
cd /home/papa/share/plshlog
if [ -f "$1" ]; then
cat "$1" <(ls -l "$(readlink "$1")"|\

5
box

@ -1,5 +1,8 @@
#! /bin/bash
# a crude box-around-the-text utility
# A crude box-around-the-text utility
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME=${0##*/}
readonly VERSION="1.0"

@ -1,4 +1,11 @@
#! /bin/bash
# Shell Challenge 2021 configurator
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME=${0##*/}
readonly VERSION="1.0"
CHALLENGE="The Bare Necessities of Life 2021"
declare -i SCRIPT=0
CHALLENGEBIN="$HOME/shell2021"

@ -1,4 +1,10 @@
#! /bin/bash
# Animated coffee mug
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME=${0##*/}
readonly VERSION="1.0"
while : ; do

@ -1,4 +1,8 @@
#! /bin/bash
# DOPE - Dartmouth Oversimplified Programming Experiment
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"

@ -1,6 +1,11 @@
#! /bin/bash
readonly PROGNAME="${0##*/}"
readonly VERSION="1.2"
# edlog - an ed(1)/mail(1) inspired shlog reader/editor
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
declare -i ST=0
declare -i PTR=0
declare -i SCR=$((LINES-1))

@ -1,10 +1,12 @@
#! /bin/bash
# fred - FRiendly ED
# Author: samhunter@rawtext.club
readonly PROGNAME=${0##*/}
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
ed -v -p "ED
rlwrap ed -v -p "ED
(a)ppend, (i)nsert, (c)hange. Finish with '.' in a separate line.
(d)elete, (,p)rint lines, (,l)ist special chars, print with (,n)umbers
(w)rite file, (r)ead file, (e)dit file. /search. s/ubsti/tute/. (q)uit

@ -1,9 +1,11 @@
#! /bin/bash
# gemini - Gemini updates selector
# Author: samhunter@rawtext.club
#
readonly PROGNAME=${0##*/}
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##*/}"
readonly VERSION="1.0.0"
GMIUSER="${1:?"$PROGNAME {user} [{file age in min}]"}"
GMIAGE="${2:-60}"

7
jot

@ -1,5 +1,4 @@
#! /bin/bash
#
# jot - distributed note-taker
# Syntax:
# jot
@ -10,6 +9,12 @@
# jot "something noteworthy with #tag1 #tag2 #tag3"
# - take note
#
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
readonly JOTFILE="$HOME/.jot"
readonly PAT1='\/(.*)'

@ -1,8 +1,12 @@
#!/bin/bash
# alternative library script for rawtext.club by samhunter
# https://git.rawtext.club/samhunter/rtc-shell-scripts/src/branch/master/library
# dependencies: epy
#! /bin/bash
# Alternative library script for rawtext.club by samhunter
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
# Dependencies: epy
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
[ ${COLUMNS:-80} -lt 70 ] && PREVIEWOPTS="down,80%" || PREVIEWOPTS="right,66%"
EBOOK=$(find /home/*/books -type f -readable -iname "*.epub" 2>/dev/null |\
fzf \

@ -1,4 +1,11 @@
#! /bin/bash
# Simple on-screen ruler
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
RULER=""
for ((i=0;i<$COLUMNS;i+=10)) ;do
RULER+="$(printf "%10.10d" $((i/10+1))|sed -e 's+^00000+0000:+g;s+0+.+g')"

@ -1,9 +1,11 @@
#! /bin/bash
# runurl - "uNiVeRsAl" URL handler
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##*/}"
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
FULLURL="${1:?"$PROGNAME requires one URL as a parameter"}"
SCHEME="${FULLURL%%://*}"

@ -1,4 +1,11 @@
#! /bin/bash
# Usage stats at a glance
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
CACHE=$(mktemp "$HOME/tmp/starsXXXX")
declare -gA GAB=()
declare -gA IRIS=()

@ -1,4 +1,11 @@
#! /bin/bash
# Teletype welcome message
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
trap ctrlC INT
ctrlC () {

@ -1,4 +1,11 @@
#! /bin/bash
# A silly screensaver
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
trap ctrlC INT
ctrlC () {
#reset colour and cursor

@ -1,4 +1,11 @@
#! /bin/bash
# typewriter - the silliest `cat(1)` replacement possible
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
trap ctrlC INT
ctrlC () {

Loading…
Cancel
Save