Generate candidates-generic.csv files based on fuzzy match with LGA/Ward.
This commit is contained in:
20
csv-generic/csv-to-json.php
Normal file
20
csv-generic/csv-to-json.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
require_once("parse_generic_csv.php");
|
||||
|
||||
$options = getopt("", ["generic-csv:"]);
|
||||
|
||||
if (isset($options['generic-csv'])) {
|
||||
$generic_csv = $options['generic-csv'];
|
||||
} else {
|
||||
error_log("Error: Missing required option '--generic-csv'.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$candidate_data = parse_generic_csv($generic_csv);
|
||||
|
||||
$json_data = json_encode($candidate_data);
|
||||
|
||||
print_r($json_data);
|
||||
|
||||
exit(0);
|
||||
Reference in New Issue
Block a user