This is how you use Scratch TTN.
If the IDE you are using has a built in packager, search scratch-text-to-nums
. If otherwise, open your shell and run pip install scratch-text-to-nums
import scratch_text_to_nums
ttn = scratch_text_to_nums
To encode a string, simply use this code: ttn.encode('example')
. Replace example
with your own text.
Note: You can ONLY use lowercase letters and numbers.
To decode a string, use ttn.decode('example')
, and replace example
with your own text.
Again, You can ONLY use lowercase letters and numbers.
To decode encoded items in Scratch, export this project, load it in Scratch, and backpack the custom block definitions. Then go to the project that you want the blocks to be in, open your backpack, and drag-n-drop the two custom block definitions to your project.
Report bugs to me! -Joecooldoo on Github!