rh12503 / triangula

Generate high-quality triangulated and polygonal art from images.
MIT License
3.85k stars 123 forks source link

CLI and file extensions #10

Closed jojomi closed 3 years ago

jojomi commented 3 years ago

I am doing this:

IN=schach.jpg
JSON=fitness
SVG=schach

triangula run -img "${IN}" -out "${JSON}"
triangula render -in "${JSON}.json" -img "${IN}" -out "${SVG}"

It is a bit weird to me that "-out" on run is adding a .json file extension even if I put in "fitness.json" already. A fallback for adding the extension is nice, but imho it should check if it is supplied already (strings.HasSuffix). That way I could use $JSON for both commands in the above example.

rh12503 commented 3 years ago

Thanks for bringing this up, I've added this feature into the latest CLI update!