1213 ddg import
--- /dev/null
+++ b/admin/fixcsv.sh
@@ -1,1 +1,3 @@
+# http://stackoverflow.com/questions/11290616/sed-conditional-merge-of-multiple-lines
+sed ':a;$!N;s/\n[a-zA-Z]//;ta;P;D'
--- a/admin/importdatagov.php
+++ b/admin/importdatagov.php
@@ -59,11 +59,12 @@
//"t" mode string translates windows line breaks to unix
$datamapping0712 = array(
+ "_id" => "",
"Agency Name" => "agencyName",
"Parent Contract ID" => "parentCN",
"Contract ID" => "CNID",
"Publish Date" => "publishDate",
- "Amendment Date" => "amendDate",
+ "AmendmentDate" => "amendDate",
"Start Date" => "contractStart",
"End Date" => "contractEnd",
"Value" => "value",
@@ -72,7 +73,7 @@
"UNSPSC Code" => "categoryUNSPSC",
"Title" => "category",
"Procurement Method" => "procurementMethod",
- "ATM ID" => "atmID",
+ "TenderNumber" => "atmID",
"SON ID" => "SONID",
"Confidentiality Contract Flag" => "confidentialityContract",
"Confidentiality Contract Reason" => "confidentialityContractReason",
@@ -82,8 +83,8 @@
"Consultancy Reason" => "consultancyReason",
"Amendment Reason" => "amendmentReason",
"Supplier Name" => "supplierName",
- "Supplier Address" => "supplierAddress",
- "Supplier Suburb" => "supplierCity",
+ "SupplierAddress" => "supplierAddress",
+ "SupplierSuburb" => "supplierCity",
"Supplier Postcode" => "supplierPostcode",
"Supplier Country" => "supplierCountry",
"Supplier ABN Exempt" => "supplierABNExempt",