Author: The Free Thinker


Youtube Browser in ELinks
===========================

$ ytb (){ [ "${1##*[!0-9]*}" ] && $YTBD --playlist-end $1 "$2"|$YTBE|$YTBS
  || $YTBD "$1"|$YTBE|$YTBS;elinks $YTBF;rm -f $YTBF; }

Usage: ytb [MAX RESULTS] URL

Comment: In ELinks: "<" ">" to change tabs/results, "W" to wrap text.
Enable option "document.plain.display_links" in ELinks config. for
download/viewable video/image URLs. "less" could be used instead of
ELinks, with navigation between results using the ":n" and ":p"
commands. Some X terminal programs can detect URLs by themselves.


Gophernicus trick
===================

$ sed '2i # \x00' script.sh > script

Explanation: Inserts a null byte at the second line to trick
Gophernicus into thinking it's a binary file. This still won't work if
a text extension is used such as ".sh" or ".txt".


Phlog Index Gophermap
=======================

$ cp phloghead gophermap; for i in `ls -r *.txt`; do echo -e "0$i\t"; \
  done >> gophermap

Explanation: Make a gophermap index for a series of phlogs

Comment: Only works if you begin all of your phlog post filenames with a
Y-M-D formatted date, like me.

Example:
 $ echo "Welcome to the phlogging a dead horse phlog" > phloghead
 $ echo "First post - not much to say so far..." > 2020-10-23First_Post.txt
 $ cp phloghead gophermap; for i in `ls -r *.txt`; do echo -e "0$i\t"; \
   done >> gophermap