Made encode_datalist CLI-friendly