First attempt to port txt2crd.py to Javascript