Add ANSI color output, set that as the default
ANSI-based color output is available and now the default. Add a -y / --output-type argument to select SVG or ANSI output. Also update tools/genexamples.sh to use the SVG output type. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -11,9 +11,12 @@ find "examples" -type f -name '*.in' | \
|
||||
while read infile; do
|
||||
for hash in "${hashes[@]}"; do
|
||||
for matrix in "${matrices[@]}"; do
|
||||
outfile="examples/$(basename -s .in "$infile")-$hash-$matrix.svg"
|
||||
echo "Generating $outfile"
|
||||
python3 -m colorhash "$infile" --out "$outfile" --hash "$hash" --matrix "$matrix"
|
||||
svgfile="examples/$(basename -s .in "$infile")-$hash-$matrix.svg"
|
||||
pngfile="examples/$(basename -s .in "$infile")-$hash-$matrix.png"
|
||||
echo "Generating $svgfile"
|
||||
python3 -m colorhash "$infile" --output-type svg --out "$svgfile" --hash "$hash" --matrix "$matrix"
|
||||
echo "Generating $pngfile"
|
||||
convert "$svgfile" "$pngfile"
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user