| Revision 317,
529 bytes
checked in by jdalbey, 7 years ago
(diff) |
|
Move csv and json files to data layer folder
|
| Line | |
|---|
| 1 | # Convert a csv with cctv location data to a json file |
|---|
| 2 | # This was used for a one-off task to convert the static csv file we manually produced into json |
|---|
| 3 | # Sample invocation: awk -F',' -f awkpgm1 filename |
|---|
| 4 | //{printf " {\n \"cctv\":\n {\n \"index\": \"%s\",\n \"location\":\n {\n \"locationName\": \"%s\",\n \"longitude\": \"%s\",\n \"latitude\": \"%s\",\n \"nearVDS\": \"%s\"\n }\n }\n },\n", $7, $6,$4,$5,$8 } |
|---|
| 5 | # |
|---|
| 6 | # When finished prepend: |
|---|
| 7 | #{ |
|---|
| 8 | # "data": |
|---|
| 9 | # [ |
|---|
| 10 | # |
|---|
| 11 | # and Append: |
|---|
| 12 | # ] } |
|---|
| 13 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.