script to parse card dump