diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2022-04-17 10:46:59 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2022-04-17 10:46:59 -0500 |
commit | 35a2dd3734f1d31060fe28837cf0e1d947c8d6f4 (patch) | |
tree | 5fcb17f0849b520417ac0f29b94879f3e359ef43 /old/lipsumsh | |
parent | 3d3d79a57fb6d0a5728e0070475f05d1699f0818 (diff) | |
download | scripts-35a2dd3734f1d31060fe28837cf0e1d947c8d6f4.tar.xz scripts-35a2dd3734f1d31060fe28837cf0e1d947c8d6f4.zip |
reorganize all scripts
Diffstat (limited to 'old/lipsumsh')
-rwxr-xr-x | old/lipsumsh | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/old/lipsumsh b/old/lipsumsh deleted file mode 100755 index d229877..0000000 --- a/old/lipsumsh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh - -dictionary=/home/timmy/.local/share/lorem-ipsum-dictionary - -shuf -r -n$1 $dictionary | awk -f- hi hello yolo <<'AWKSCRIPT' -BEGIN { for(i = 1; i < ARGC; i++) print ARGV[i] } -AWKSCRIPT -echo -#shuf -r -n$1 $dictionary | tr '\n' ' ' - - - - - -exit - -#genipsums() { shuf -r -n$1 $dictionary | tr '\n' ' ' | sed 's/.$//'; } -genipsums() { shuf -r -n$1 $dictionary; } -gensentence() { genipsums $1 | sed ':a;N;$!ba; s/\n/ /g; s/.$//; s/\(^\| \)\([a-z]\)/\1\u\2/'; } - -genparagraph() { - sentences=`shuf -n1 -i 4-12` - echo -n '\t' - - for i in `seq $sentences`; do - words=`shuf -n1 -i 1-10` - [ "$loremipsumtext" = '1' ] && echo -n "Lorem ipsum " && genipsums $words && loremipsumtext=0 || gensentence $words - [ "$words" -le 4 ] || [ `shuf -n1 -i 0-2` = 1 ] && echo -n ', ' && genipsums `shuf -n1 -i 3-10` # make more complex - echo -n '. ' - done - echo -} - -loremipsumtext=1 - -genparagraph - - - -#exit -# -#dictionary=/home/timmy/.local/share/lorem-ipsum-dictionary -# -#ipsums=$1 -# -##set -- `tr '\n' ' ' < $dictionary` -#set -- `cat $dictionary` -# -##rand=`od -An -N$ipsums /dev/urandom` -# -#shuf -r -n$ipsums -i 1-$# | while read line; do -# eval echo -n \${$line} -# echo -n ' ' -#done -# -#echo -# -#exit -# -# -# -#words=`wc -w $dictionary | cut -d' ' -f1` -# -#echo -n '\tLorem ipsum ' -# -#shuf -r -n$1 -i 1-$words | while read line; do -# #cut -z -d' ' -f$line $dictionary && echo -n ' ' -# head -n$line $dictionary | tail -n1 | tr -d '\n' -# num=`shuf -n1 -i 1-100` -# ([ "$num" -lt 10 ] && echo -n '. ') || ([ "$num" -gt 90 ] && echo -n ', ') || ([ "$num" = '50' ] && echo -n '.\n\t') || echo -n ' ' -#done -#echo |