Skip to content

Add job to import alt text spreadsheet #2917

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

taylor-steve
Copy link
Contributor

This adds a job to import the AI Alt Text Experiment spreadsheets.

Why are we doing this?

In summary I was told:

  • We need a way to import these sheets
  • A developer will be doing the imports, not the end-users
  • We might do these imports periodically for a while, but if AI alt text proves useful we would be moving away from spreadsheets to some more streamlined (in-app?) process.

Given that, and that I don't know of any other good ways to inject Sir Trevor data, I felt a self-contained job would be a fine method.

What does this actually do?

In short it:

  • tries to pluck an ID from the image URL from the sheet (e.g., druid for solr docs, relative URL for uploaded images)
  • tries to find the exhibit and the page
  • looks at every item in each Sir Trevor block on the page and matches the image ID
  • If there is a singular match, it updates the alt text for that particular image based on the spreadsheet logic

Notes

  • This doesn't cover all block cases. For example, Spotlight/Exhibits can use the solr document blocks with uploaded files but none of the current spreadsheets are targeting this case. Nothing bad would happen if somebody ran one later, it would fail to match.
  • Manipulating the Sir Trevor data is not fun.

@taylor-steve taylor-steve marked this pull request as ready for review May 29, 2025 23:48
@jcoyne
Copy link
Contributor

jcoyne commented May 30, 2025

Do we really want to merge this? It feels like a one time thing.

@taylor-steve
Copy link
Contributor Author

Yeah I think it's fine not to merge. I have no idea what is happening next.

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