From 6159664a2d180f8d1bed2f708ae8ae8aae81ee81 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 9 Oct 2022 14:43:43 +1100 Subject: [PATCH 1/2] change ILS for East Gippsland --- website/data/library_services_information.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/data/library_services_information.csv b/website/data/library_services_information.csv index c9b7cfb..b373d12 100644 --- a/website/data/library_services_information.csv +++ b/website/data/library_services_information.csv @@ -257,7 +257,7 @@ Central Highlands Libraries,Central Highlands VIC,vic,by_lga,4,SirsiDynix Sympho City of Melbourne Libraries,Melbourne,vic,yes,3,Civica Spydus,https://www.melbourne.vic.gov.au/community/libraries/Pages/libraries.aspx, Corangamite Regional Library Corporation,Corangamite,vic,adults,3,Civica Spydus,https://www.crlc.vic.gov.au/, Darebin Libraries,Darebin,vic,yes,3,Civica Spydus,https://www.darebinlibraries.vic.gov.au/default.aspx, -East Gippsland Shire Library,East Gippsland,vic,yes,4,OCLC Amlib,https://www.eastgippsland.vic.gov.au/leisure/libraries, +East Gippsland Shire Library,East Gippsland,vic,yes,4,SirsiDynix Symphony,https://www.eastgippsland.vic.gov.au/leisure/libraries, Eastern Regional Libraries Corporation,Eastern,vic,no,3,Civica Spydus,https://www.yourlibrary.com.au/, Frankston City Libraries,Frankston,vic,no,3,Civica Spydus,https://library.frankston.vic.gov.au/Home, Gannawarra Library Service,Gannawarra,vic,?,4,SirsiDynix Symphony,https://www.gannawarra.vic.gov.au/Community-Services/Libraries, -- 2.39.5 From 57a1a0c7df744ba73e314b96a61e1296bd3abbc2 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 9 Oct 2022 14:47:32 +1100 Subject: [PATCH 2/2] remove csv-topo merging action This has been playing up and relies on GH Actions. Now runs on the web server. --- .github/scripts/merge_csv_to_topojson.py | 30 ------------------- .github/workflows/update-topo-on-push.yml | 36 ----------------------- 2 files changed, 66 deletions(-) delete mode 100644 .github/scripts/merge_csv_to_topojson.py delete mode 100644 .github/workflows/update-topo-on-push.yml diff --git a/.github/scripts/merge_csv_to_topojson.py b/.github/scripts/merge_csv_to_topojson.py deleted file mode 100644 index bd73eba..0000000 --- a/.github/scripts/merge_csv_to_topojson.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python3 -import csv -import json - -# files to merge -csv_file = './website/data/library_services_information.csv' -topojson_file = './website/data/boundaries.topo.json' - -geo = open(topojson_file, 'r') # open the topo.json file -json_data = json.loads(geo.read()) # read the file and load into a dict - -# for each feature, if the name in the json matches the name in the csv, add new properties to the json -for feature in json_data['objects']['boundaries.geo']['geometries']: - with open(csv_file, newline='') as f: - # use DictReader so we can use the header names - reader = csv.DictReader(f) - for row in reader: - # look for match - if row['name'] == feature['properties']['name']: - # create new properties in topojson - for k in row: - if k != "long_name" and k != "": # ignore long_name and any blank column names - feature['properties'][k] = row[k] - f.close() # close csv -geo.close() # close geo and flush - -# open topojson file again and overwrite it -with open(topojson_file, 'w') as newfile: - json.dump(json_data, newfile, separators=(',', ':')) - newfile.close() diff --git a/.github/workflows/update-topo-on-push.yml b/.github/workflows/update-topo-on-push.yml deleted file mode 100644 index 5cbf22a..0000000 --- a/.github/workflows/update-topo-on-push.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: topo update (push) - -on: - push: - branches: - - master - - main - paths: - - 'website/data/library_services_information.csv' - - workflow_dispatch: - -jobs: - auto-topo-updater: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 - - - name: Merge CSV to TopoJSON - run: | - python3 ./.github/scripts/merge_csv_to_topojson.py - - - name: Update contributors - run: | - npm install cheerio - npm install pretty - node ./.github/scripts/contributors.js - - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: merge csv data to topo - commit_author: Library Map Bot -- 2.39.5