add img
This commit is contained in:
24
scpt/ascii.zsh
Executable file
24
scpt/ascii.zsh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/zsh
|
||||
|
||||
d=${0:a:h:h}
|
||||
ascii-image-converter -h
|
||||
|
||||
if [ $? -eq 1 ];then
|
||||
echo https://github.com/TheZoraiz/ascii-image-converter
|
||||
echo install ascii-image-converter
|
||||
exit
|
||||
fi
|
||||
|
||||
t=`ls $d/icon`
|
||||
n=`echo $t|wc -l`
|
||||
for ((i=1;i<=$n;i++))
|
||||
do
|
||||
tt=`echo $t|awk "NR==$i"`
|
||||
name=${tt%%.*}
|
||||
echo $i
|
||||
echo $tt
|
||||
ascii-image-converter $d/icon/$tt -C -W 80 -b --threshold 120 >! $d/ascii/${name}_color.txt
|
||||
ascii-image-converter $d/icon/$tt -W 80 -b --threshold 120 >! $d/ascii/${name}.txt
|
||||
echo ---
|
||||
done
|
||||
|
Reference in New Issue
Block a user