-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write npm script to ingest Jackson property list #66
Comments
From Basecamp:
So we'll need to run this again with an updated xlsx before we release |
So my preliminary questions are basically: "How do I post something to Contentful?" which it looks like @replygirl will give me the rundown, and what schemes are needed, which will probably be evident from the answer to the above. |
This is provided by Cooperation Jackson folks, we can reformat it and migrate it to anywhere we please--in other words, there isn't a hard spec for the input format other than what we see in the data |
I'm going to start with a class that can consume an XLSX and extract the fields needed to build the types in types/db/contentful.d.ts |
I didn't get as far as I wanted to over this weekend (my Typescript is rustier than I thought) but I've pushed some work to a branch in my fork and I'll pick it back up if I have any free time this week (he won't) or next weekend, otherwise. |
Progress Update: I've gotten the script to the state where you should be able to run Sorry about the slow progress. One of the speedbumps was getting ts-node to run in script mode with the main tsconfig.json file specifying edit: I made sure |
I got a little further this weekend. Next run, I'm going to see if I can get lat & long from the Google Maps API without registering api keys 🤞 |
I have an update! So there doesn't appear to be an API that will convert an address string to latitude and longitude without registering with mapquest or Google or something. We can come back to that at a later time if we need to. What I currently have is a class that will scan through the worksheets of an XLSX file looking for something defined as 'content' (which I've currently defined as a header cell containing the text, "Address," non-case-sensitive, and then the data ). |
I've made progress yet again! I just need to finish it off with the post to Contentful. |
I am like 1/2 step away from successfully posting to Contentful, but I have to go to bed, so I will pick up later. |
adding class XlsxImporter add scripts/ with tsconfig override, update file path in package.json exclude scripts/ from build add scripts/ with tsconfig override, update file path in package.json run 'yarn import-xlsx <relative path to spreadsheet>' to identify sheet, column, and row of cell containing header 'Address' (not case sensitive) TS compatible regex matcher function add readme instructions for running script
Test Sample Buildings.xlsx |
* first draft for initial PR, addresses issue #66 adding class XlsxImporter add scripts/ with tsconfig override, update file path in package.json exclude scripts/ from build add scripts/ with tsconfig override, update file path in package.json run 'yarn import-xlsx <relative path to spreadsheet>' to identify sheet, column, and row of cell containing header 'Address' (not case sensitive) TS compatible regex matcher function add readme instructions for running script * typo in readme & remove unused class property * another README typo * tiny bug fix * add Google Apps Script instructions for parsing lat/lon from text address in a Google Sheet * newlines in MD * README typos Co-authored-by: brownc08 <[email protected]>
This script should take in an Excel sheet (the property list) and add the items to Contentful
The property list: https://public.3.basecamp.com/p/5Y3wNeeDbJmqGXtGr3UU9Ud1
Fields of interest:
The text was updated successfully, but these errors were encountered: