bin/wordcloud: create wordcloud_cli helper

This commit is contained in:
xeruf 2021-11-11 20:48:32 +01:00
parent 831cfcc4e7
commit 4681fc47ef
1 changed files with 10 additions and 0 deletions

10
.local/bin/scripts/wordcloud Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# Generate a wordcloud for printing
# https://amueller.github.io/word_cloud/cli.html
in=$1
out=${2:-$in-cloud.png}
scale=$3
words=${4:-2000$scale}
shift $(expr 4 \& $# \> 4 \| $#)
wordcloud_cli --background white --text $in --imagefile $out --width 841$scale --height 594$scale --min_font_size 5$scale --max_font_size 120$scale --max_words $words "$@"
timg -g 50x100 $out