So when you want to check if you have enough lesser gems to craft a specific greater one, you can just tell it what you currently have and what is your desired final gem. Then you can see if you have enough and how many more you are missing:
C:\...\> python d3gem.py 1fst -s 20fsq,1st
You DON'T have enough lesser gems to make 1 Flawless Star gem(s).
The equivalent of 34 Flawless Square gem(s) is missing for that.
Here fst, fsq, st are symbols for gem classes. You can see all of them by running the script with --help flag. They should be pretty easy to figure out, though.
Only Flawless Square or better gems are supported, since no one cares about smaller ones
On Windows you will need to have Python installed. Other systems should have it bundled by default.