Giter Site home page Giter Site logo

untagging about quick_tagging HOT 4 OPEN

cayennes avatar cayennes commented on August 20, 2024
untagging

from quick_tagging.

Comments (4)

timokau avatar timokau commented on August 20, 2024

def addTags(note, tagString):
# add tags to card
tagList = mw.col.tags.split(tagString)
statusString = ''
for tag in tagList:
if note.hasTag(tag):
note.delTag(tag)
statusString += ('Removed tag "%s"\n' % tag)
else:
note.addTag(tag)
statusString += ('Added tag "%s"\n' % tag)
note.flush()
tooltip(statusString)

If someone is still interested: You can replace the addTags method with this one. It will toggle tags instead of adding them. You should also remove the other tooltips, since they are handled in the addTags method (to have different tooltips for adding and removing).

from quick_tagging.

Arthaey avatar Arthaey commented on August 20, 2024

Any reason not to add this to the main branch?

from quick_tagging.

KIMYONGUP avatar KIMYONGUP commented on August 20, 2024

Hi can i ask you a question? i hope i don't bother you.

#1

you taught how to untag. I pasted the code, but the error occured.

how should i fix it? can you help me?

from quick_tagging.

timokau avatar timokau commented on August 20, 2024

Sorry, I haven't been using this plugin (or anki in general) for a while and don't remember much about how anki plugins work. I can't help without seeing the actual error message either way.

from quick_tagging.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.