Closed mjordan closed 7 years ago
Because our CSV parser creates an object for each row, we can't use simple beginning-of-line pattern matching to allow commenting out of records. Instead, we need to add the commenting character (e.g. #
to the beginning of the column configured to be the record_key
of the row:
"#postcard_100","Waterfront and Shipping Vancouver, B.C.","1907","Vancouver, BC","Waterfronts; Vessels; Shipping","A waterfront and shipping scene in Vancouver, B.C. Several vessels are shown along the waterfront.","postcard_20.jpg"
The record key is not necessarily the first column in the CSV file:
"Waterfront and Shipping Vancouver, B.C.","#postcard_100","1907","Vancouver, BC","Waterfronts; Vessels; Shipping","A waterfront and shipping scene in Vancouver, B.C. Several vessels are shown along the waterfront.","postcard_20.jpg"
This "feature" will need to be documented.
This has been addressed in pull-request https://github.com/MarcusBarnes/mik/pull/390 (merged with commit https://github.com/MarcusBarnes/mik/commit/f2cbdec527fe8a15e6488503f09f2496a8deb725). Thank you @mjordan.
It would be useful to be able to comment out a row in a CSV input file, during troubleshooting, for example. A
#
would make a suitable comment marker, e.g.,#"I am","a commented","row"