codeforsanjose / city-agenda-scraper

9 stars 16 forks source link

Update Gdrive_upload_methods.py to upload to proper city #38

Open krammy19 opened 3 years ago

krammy19 commented 3 years ago

The Gdrive_upload_methods currently uploads only to the "San Jose" folder on our Google Drive. We'd like to update it to instead take a {city} string and upload to the matching folder name.

dntrply commented 3 years ago

It is possible to find the folder by city name (rather than the hard coded 'San Jose').

However - it seems the name of the city provided when invoking the python code - example 'sanjose' in the invocation below: Legistar_Selenium.py sanjose "This Week" "City Council - Study Session" is not the same as the name of the city on Google Drive (where the csv is uploaded) In this instance - the name of the city is 'San Jose'

We either need mapping code that maps the city name as used in the invocation with the city name in Google Drive; else, the name of the city in Google Drive should be the same characters as used in the invocation. For the latter approach, there should be a folder 'san jose' under the 'Cities' folder

If indeed the folders under 'Cities' should be the name of the city, then we would need a mapping function. The mapping function would need to ensure how each city is represented in Legistar. For instance, Sunnyvale seems to be registered as 'sunnyvaleca'