Skip to content

Conversation

@caro401
Copy link
Collaborator

@caro401 caro401 commented Dec 19, 2023

Forum post: https://forums.tropy.org/t/import-metadata-from-csv/2784/5

Things that were broken

  • plugin didn't handle files with BOM at all. This is just an option in the CSV parsing library I'd forgotten to add
  • plugin broke when there was a missing value in a TROPY/#path column (corresponding to a missing photo filename) because it couldn't get the file extension of undefined. This is fixed by checking the path is defined when trying to construct a photo
  • plugin broke when some columns were empty, fixed by returning an empty object in these cases, rather than undefined (Plugin fails when first column of row contains no data #23)

I'm sure there's better ways to handle at least the last 2 issues, but this was the best I could think of now.

@caro401 caro401 requested a review from inukshuk December 19, 2023 18:39
@caro401 caro401 linked an issue Dec 19, 2023 that may be closed by this pull request
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.

Plugin fails when CSV has BOM

2 participants