When I try to sync my images and audio it keeps all the audio just fine but deletes every image. Probably because it doesnt recognize that I am using the images.
My image field is filled like this:
LuckyStar_3_0.06.20.070.jpg
(Show name, episode, timestamp.jpg)
The formatting looks like this:
<img src="{{Snapshot}}"
I have over 120k cards so what do I have to find and replace to update all the cards so they don’t delete on sync?
As always, back up your collection before messing with things!
Also don’t forget to change the <img src="{{Snapshot}}" block in your template to {{Snapshot}} after using find and replace.
I think this a misunderstanding. The add-on is for replacing Anki tags, not HTML tags.
I build it because Anki doesn’t support regex replacing in this case. But since the problem here is with the content of fields, you can just use Anki’s built-in feature to follow @abdo’s instructions.
For recent Anki versions, the back reference syntax is ${1}, though, as you can read here.
If you have image references in a lot of different fields and/or other content in the same fields as well, you will need to use a more complex regex to match the image file names and replace only them.
Oops, I didn’t actually pay much attention to the “Tags” part of the add-on name
I remember that the regex crate supports this but used the wrong syntax and was confused why it’s not working.
Rumo: Regarding the description on that add-on - you’re probably already aware of this at this point, but you can reference match groups in the replacement string. What Rust’s regex crate does not allow is referencing a group from within the search string, due to the performance issues it can cause.
Anki’s tag replacement code supports a regex option, but it is not yet exposed by the UI.
You’re exactly right. I noticed my mistake afterwards but didn’t get to updating the description since there doesn’t seem to be much demand for this functionality anyway.