Is it a question you’d accept to tackle, or do you consider that this is such a niche problem that you wont spend time on it ? In the first case, I’d be willing to help, of course, and to port teh decided solution to ankidroid.
The simplest solution I can imagine would be simply to check, for all medias m, for all exported text file f, check if m’s path appears in f, if so export m. We may export too much media. We may even miss some media if the name does not appear as a litteral but is computed, but it would solve my problem.
Otherwise, having a specific syntax to indicate all medias used by a card type may be a working solution too…
Related: would you accept to add automated code coloration in anki the same way that you added mathjax in anki. Up to now, the only code coloration tools I’ve seen used in anki required the field content to be colored. This is very bad because it makes it hard to modify the code later if it is required. I’ve finally been able to use highlight.js with anki, and I’m going to make a post on reddit and elsewhere explaining how to do it, however, having it natively in anki would make it far more easier. I would be more than willing to do the work if so.