ohare93 / brain-brew

Automated Anki flashcard creation and extraction to/from Csv
The Unlicense
89 stars 5 forks source link

Media Filenames and Cleanup #8

Open ohare93 opened 4 years ago

ohare93 commented 4 years ago

Anki shortens filenames that are too long in the latest versions, but only when a user runs Check Media. If they have already created a repo using Brain Brew then their old media will still be there. Seems to me there are a few issues here:

Warn users about long filenames

Make sure people are not caught out by this by detecting when a media filename is too long. Then users know what to do after that, and can delete the redundant files manually themselves if they wish to.

Find non-referenced media

There should be a keyword that can be run in a builder file where Brain Brew can check Deck Part Notes for their media references and then compare that to a specified folder. Deleting those that are not found, or perhaps moving them somewhere else for user confirmation?

Rename files

Long filenames is an issue on it's own, but tbh some filenames are just shit. Users should have the option to rename references media files found in a Note to the field / column that the media is found in. Adding a # for each after the 1st. One issue there is what if the media is references in multiple notes? Just use the first one found?