Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Implement right-click menu! #4

Open
ELLIOTTCABLE opened this issue Aug 31, 2017 · 0 comments
Open

Request: Implement right-click menu! #4

ELLIOTTCABLE opened this issue Aug 31, 2017 · 0 comments

Comments

@ELLIOTTCABLE
Copy link

I see the TODOs in the source; so I thought I'd just throw a “hey, somebody out there is excited about this!” into the aether.

In particular, I understand how much work is involved in updating root-tags. One user provided a SQL statement that helps, but I'd love to see it integrated first-class:

This is a really great addon, but it misses some kind of batch edit function. I mean, you can't simply rename a root tag, you have to do it manually for every subtag. I found a way to solve this but I've done little testing (anyways, it works) so:

  • back up your collection

  • open the collection.anki2 file in a SQLite editor

  • execute the following commands on the database (while anki is closed):

    UPDATE col SET tags = replace( tags, 'oldTag', 'newTag' ) WHERE tags LIKE '%oldTag%';
    UPDATE notes SET tags = replace( tags, 'oldTag', 'newTag' ) WHERE tags LIKE '%oldTag%';
    

    (replace oldTag and newTag with your tags)

!!!WARNINGS!!!

  • little testing was done (backup!)
  • every ' and % is important, do not delete
  • not working with accent characters (because of character coding)
  • it will replace evrything containing the oldTag (example: replacing "it" with "asd" also alters "italian" to "asdalian") (if you know what you are doing you can edit the regExp part to avoid this)
  • I'm just a random comment guy, I don't take any responsibility, but hope it helps someone ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants