Added initial code, from my experimental scripting. This needs some fixups to work in a package like this - also discoverycard have just changed their website so that code doesn't work at all...
Made into proper entry points
Refactor to have entry point etc