Feature idea: extract text
I am playing with the idea of extracting the texts from the SVG file to provide glossaries for language learners. We might also use this as an accessibility feature here. So, I have started writing a python script.
For dictionary access, we could simply add a Wordlink button, and presto pronto, instantly clickable text with a dictionary! It looks like this:
If there is no interest for this feature here, I can always host a copy of the Gaelic files on my own page - I am running a Gaelic Learner's site and I think that it would be a fun resource.
Now to the technical bits:
I can't get who is speaking and the order of elements from the SVG, neither can I guess how to combine multiple text elements for sounds etc. So, I have come up with the idea of creating a reference file for the
en locale. So, for the English reference file
Pepper|1|1|...and the last touch Pepper|3|1|"...mmm probably not strong enough" Sound|2|2|SHH SHH Sound|4|2|PLOP PLOP
I am getting
Pepper|1|1| ...agus beagan gleus oirre Pepper|3|1| ...cha chreid mi nach eil i caran lag fhathast Sound|2|2| SSS SSS Sound|4|2| PLUB PLUB
File format is:
Speaker|display order|segments combined|text
Now, all I need to do is to parse the LibreOffice Calc file to get the names translations, and then the result still needs to be reparsed for whatever output we want.