So I have created this plugin, with grammar and mapping for user code
tables from/to csv files.
Usage is simple, you just create a csv file with the name of the user
code table. It has up to 10 columns corresponding to leftcode,
rightcode, and attr1-8. (example included in plugin)
Put this file in botssys/infile/UserCodes and Bots engine will import it
to a corresponding table. Records are only updated or added, deletions
must still be done manually. You can use it to add just a few rows or
the whole table. Rows with no differences are not updated.
to export your table without importing anything create a single record
csv file containing only 2 blank fields...
--- begin file ---
"",""
--- end file ---
Once your updates are imported, the entire table is exported again to
botssys/outfile/UserCodes. You can then edit this file and repeat the
process as needed.
I have found Libre Office (formerly OpenOffice) best for editing csv
files, as MS Excel can mess up numeric columns, removing leading zeros etc.
--
Kind Regards,
Mike
Kind Regards,
Mike
The original reads fine and after I correct the paths (I'm on a LAMP system) it gives one file in and one out but the output file looks empty.
Input file:
"Leftcode","Rightcode","Attr1","Attr2","Attr3","Attr4","Attr5","Attr6","Attr7","Attr8" "Line01","This is myUserCodes test","Attribute 1","Attribute 2","Attribute 3","Attribute 4","Attribute 5","Attribute 6","Attribute 7","Attribute 8" "Line02","import from infile/UserCodes","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday" "Line03","export to outfile/UserCodes","January","February","March","April","May","June","July","August" "Line04","leftcode must be unique",,,,,,,, "Line05","rightcode must not be empty",,,,,,,, "Line06","csv data updates or adds to table",,,,,,,, "Line07","deletes must be done in Bots GUI",,,,,,,,
Output file:
"Leftcode","Rightcode","Attr1","Attr2","Attr3","Attr4","Attr5","Attr6","Attr7","Attr8"