Comments (4)
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.
Any reason not to add this to the main branch?
from quick_tagging.
Hi can i ask you a question? i hope i don't bother you.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quick_tagging.