Skip to content

Conversation

@eddierubeiz
Copy link
Contributor

@eddierubeiz eddierubeiz commented Dec 15, 2025

Ref #2903
Just as a convenience, it would be nice to be able for a user to automatically create a Google Spreadsheet of the Google Arts and Culture metadata, suitable for import using Advanced Import.
(In the meantime, the spreadsheet can be downloaded from the user's cart.)

For this proof of concept we assume two env vars: :test_google_project_user_id ( a user associated with a Google Cloud Project) and :test_google_project_credentials (the JSON credentials for that user and project).

Assuming you have a valid Google Cloud project, with oauth credentials and a user with appropriate permissions, you can do the following to upload the metadata from the exporter into a new Google Sheet:

scope =  Work.all.includes(:leaf_representative)
metadata = GoogleArtsAndCulture::Exporter.new(scope).metadata
GoogleArtsAndCulture::SpreadsheetCreator.new.create_google_sheet(metadata)

Not much UI for right now, but we should be able to drop the three lines above into a controller method whenever we're ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants