|
||
---|---|---|
.gitignore | ||
LICENSE | ||
README.md | ||
example.py | ||
smidge.py |
README.md
SMIDGE
A simple function to encode an integer into a large-radix alphabet-encoded string. The alphabet omits easily visually confused characters such as Il1i and O0.
This piece of code was originally written in the early days of twttr (twitter) where you would send and receive text messages from 40404 and only had 140 characters to represent a large URL. You might also want to type the URL into a browser by reading it off of your flip phone, so it was important that the characters were unambiguous.
Basic Usage
from smidge import smid
from uuid import uuid4
print(smid(uuid4().int))
Result
; python3 example.py
FJ2SweD8htTWQQULtq5a4E