glutanimate / anki-addons-misc Goto Github PK
View Code? Open in Web Editor NEWVarious add-ons I've written for Anki
Home Page: https://ankiweb.net/shared/addons/
License: GNU Affero General Public License v3.0
Various add-ons I've written for Anki
Home Page: https://ankiweb.net/shared/addons/
License: GNU Affero General Public License v3.0
Please update for Anki 2.1
https://ankiweb.net/shared/info/153603893
It was one of must have add-ons for me on Anki 2.0
Edition:
I forgot that I used a modified version of your add-on that worked for all cards, not only for new:
steveaw/anki_addons#2
I reqested update in April but no result, maybe it was abandoned.
steveaw/anki_addons#5
Below I insert code of _More_Answer_Buttons_for_ALL_Cards.py with my custom settings.
I hope you can implement it in your original add-on for Anki 2.1.
It could be nice if your add-on could somehow cooperate with Large and Colorful Buttons add-on or incorporate its feature to have all buttons large and colourful:
https://ankiweb.net/shared/info/1829090218
There is similar add-on:
More Answer Buttons (with colors!)
https://ankiweb.net/shared/info/1550991760
But it doesn't work and it has different intervals, so I will not use it. The author doesn't reply to emails.
# -*- coding: utf-8 -*-
"""
Adds extra buttons to the Reviewer window for new cards
https://ankiweb.net/shared/info/468253198
Copyright: Steve AW <[email protected]>
License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
Modified by Glutanimate, 2016
WARNING: this addon uses private methods to achieve its goals. Use at your
own risk and keep backups.
What it does: Adds anywhere between 1 to 4 new buttons to the review window
when reviewing a new card. The new buttons function like the existing "Easy"
button, but in addition, they reschedule the card to different interval, which
is randomly assigned between a lower and upper limit that is preset
by the user (see below).
By default 3 buttons are added, with intervals: "3-4d" , "5-7d" , "8-15d"
This can be changed below.
I wanted this addon because many of my new cards do not need to be
"Learned" as I created and added them myself, typically an hour or so before
my first review session. I often add around 100-200 new cards per day, all on
a related topic, and this addon allows me to spread the next review of the new
cards that don't need learning out in time.
How it works: This addon works by intercepting the creation of the reviewer buttons
and adds up to 4 extra buttons to the review window. The answer function
is wrapped and the ease parameter is checked to see if it one of the new
buttons. If it is, the standard answer function is used to add the card
as an easy card, and then the browser 'reschedCards' function is used
to reschedule it to the desired interval.
In summary, this functions as if you click the "Easy" button on a new card,
and then go to the browser and reschedule the card.
Warning: This completely replaces the Reviewer._answerButtons fn, so any changes
to that function in future updates will be lost. Could ask for a hook?
Warning: buyer beware ... The author is not a python, nor a qt programmer
Support: None. Use at your own risk. If you do find a problem please email me
at [email protected]
Setup data
List of dicts, where each item of the list (a dict) is the data for a new button.
This can be edited to suit, but there can not be more than 4 buttons.
Description ... appears above the button
Label ... the label of the button
ShortCut ... the shortcut key for the button
ReschedMin ... same as the lower number in the Browser's "Edit/Rescedule" command
ReschedMax ... same as the higher number in the Browser's "Edit/Rescedule" command
"""
import os, sys, datetime
#Anki uses a single digit to track which button has been clicked.
# We will use shortcut number from the first extra button
# and above to track the extra buttons.
INTERCEPT_EASE_BASE = 6
extra_buttons = [ # should start from 6 anyway
{"Description": "5-7d", "Label": "!!!", "ShortCut": "6", "ReschedMin": 5, "ReschedMax": 7},
{"Description": "8-15d", "Label": "Veni", "ShortCut": "7", "ReschedMin": 8, "ReschedMax": 15},
{"Description": "3-4w", "Label": "Vidi", "ShortCut": "8", "ReschedMin": 15, "ReschedMax": 30},
{"Description": "2-3mo", "Label": "Vici", "ShortCut": "9", "ReschedMin": 31, "ReschedMax": 90},
]
#Must be four or less
assert len(extra_buttons) <= 4
SWAP_TAG = False
#SWAP_TAG = datetime.datetime.now().strftime("rescheduled::re-%Y-%m-%d::re-card")
#SWAP_TAG = datetime.datetime.now().strftime("re-%y-%m-%d-c")
from aqt.reviewer import Reviewer
from anki.hooks import wrap
from aqt.utils import tooltip
#todo: brittle. Replaces existing function
def _answerButtons(self):
times = []
default = self._defaultEase()
def but(i, label):
if i == default:
extra = "id=defease"
else:
extra = ""
due = self._buttonTime(i)
return '''
<td align=center>%s<button %s title="%s" onclick='py.link("ease%d");'>\
%s</button></td>''' % (due, extra, _("Shortcut key: %s") % i, i, label)
buf = "<center><table cellpading=0 cellspacing=0><tr>"
for ease, label in self._answerButtonList():
buf += but(ease, label)
#swAdded start ====>
#Only for cards in the new queue
if self.card.type in (0, 1, 2, 3): # New, Learn, Day learning
#Check that the number of answer buttons is as expected.
#assert self.mw.col.sched.answerButtons(self.card) == 3
#python lists are 0 based
for i, buttonItem in enumerate(extra_buttons):
buf += '''
<td align=center><span class=nobold>%s</span><br><button title="Short key: %s" onclick='py.link("ease%d");'>\
%s</button></td>''' % (buttonItem["Description"], buttonItem["ShortCut"], i + INTERCEPT_EASE_BASE, buttonItem["Label"])
#swAdded end
buf += "</tr></table>"
script = """
<script>$(function () { $("#defease").focus(); });</script>"""
return buf + script
#This wraps existing Reviewer._answerCard function.
def answer_card_intercepting(self, actual_ease, _old):
ease = actual_ease
was_new_card = self.card.type in (0, 1, 2, 3)
is_extra_button = was_new_card and actual_ease >= INTERCEPT_EASE_BASE
if is_extra_button:
#Make sure this is as expected.
#assert self.mw.col.sched.answerButtons(self.card) == 3
#So this is one of our buttons. First answer the card as if "Easy" clicked.
ease = 3
#We will need this to reschedule it.
prev_card_id = self.card.id
#
buttonItem = extra_buttons[actual_ease - INTERCEPT_EASE_BASE]
#Do the reschedule.
self.mw.checkpoint(_("Reschedule card"))
self.mw.col.sched.reschedCards([prev_card_id], buttonItem["ReschedMin"], buttonItem["ReschedMax"])
tooltip("<center>Rescheduled:" + "<br>" + buttonItem["Description"] + "</center>")
SwapTag = SWAP_TAG
if SwapTag:
SwapTag += unicode(self.mw.reviewer.card.ord+1)
note = self.mw.reviewer.card.note()
if not note.hasTag(SwapTag):
note.addTag(SwapTag)
note.flush() # never forget to flush
self.mw.reset()
return True
else:
ret = _old(self, ease)
return ret
#Handle the shortcut. Used changekeys.py addon as a guide
def keyHandler(self, evt, _old):
key = unicode(evt.text())
if self.state == "answer":
for i, buttonItem in enumerate(extra_buttons):
if key == buttonItem["ShortCut"]:
#early exit ok in python?
return self._answerCard(i + INTERCEPT_EASE_BASE)
return _old(self, evt)
Reviewer._keyHandler = wrap(Reviewer._keyHandler, keyHandler, "around")
Reviewer._answerButtons = _answerButtons
Reviewer._answerCard = wrap(Reviewer._answerCard, answer_card_intercepting, "around")
This would be perfect for a complete fullscreen.
Hello. Please, can you give advise how to turn off button bar? I want fullscreen mode only with card content. Thank you.
On Anki 2.1 when I check for updates for addons, i'm getting the error
"Please check your internet connection.
'<' not supported between instances of 'int' and 'NoneType'"
I disabled the addon and the error disappeared.
Thanks for everything!
Customize Editor Stylesheet
[ Please enter an [ x ] character to confirm the points below: ]
The add-on is incompatible with editor: apply font color, background color, custom class, custom style. At least if I understand "editor"'s readme correctly. You may want to put that in "Customize"'s readme.
nevermind
Hint Hotkeys
'G' not working but 'H' works.
G not working
Expected behavior: [ show all hints ]
Actual behavior: [ nothing happens ]
Reproducible?: [ Yes ]
Anki
Version 2.1.21
Qt 5.13.1 PyQt 5.14.1
System
We currently overwrite CollectionStats.todayStats
in order to allow users to define a custom maturity ivl. This can cause conflicts with other add-ons that patch the same method.
We should investigate if this approach is actually still necessary. For starters, we should look into conditionally overwriting CollectionStats.todayStats
only if a non-defaut MATURE_IVL
is set.
(Thanks to Gustaf on tenderapp for the report)
Mac OS X 10.11.6
Anki Version 2.0.50
Qt 4.8.2 PyQt 4.9.4
When trying to invoke the field history add on with the command-O shortcut I get the below error
Incidentally, and perhaps related, none of the other shortcut keys do anything
An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons
Traceback (most recent call last):
File "/Users/chris/Library/Application Support/Anki2/addons/Field_History.py", line 149, in
t.activated.connect(lambda a=self: restoreEditorFields(a, "history"))
File "/Users/chris/Library/Application Support/Anki2/addons/Field_History.py", line 127, in restoreEditorFields
res = historyRestore(self, mode, sorted_res, model)
File "/Users/chris/Library/Application Support/Anki2/addons/Field_History.py", line 68, in historyRestore
if html.strip():
UnboundLocalError: local variable 'html' referenced before assignment
[ Please mention the add-on in the issue title as follows: "[Add-on name] My issue" ]
[ Please enter an [ x ] character to confirm the points below: ]
I was trying to create a custom filtered deck with NEW cards with two specific tags, but it keeps pulling cards that are due in the future and only a couple new cards. For ex: I set it to "is:new", 100 cards, but it will show me 80 review cards and 20 new ones only. The number varies, ex: 51, 49, etc.
[ Please be as specific as possible. Provide screenshots if you think they can help. ]
Not sure, but this problem occurs when I select two tags. If I select one tag to make a filtered deck and want 100 cards, I have no problem getting 100 new cards. The problem is when I select two tags.
[ What were you doing when the problem occurred? ]
Expected behavior: [ What you expected to happen ]
Since I limited my cards to 100 and typed "is:new" I expected 100 new cards, not 80 review cards and 20 new cards. This combination of review and new cards will vary with the limit I set.
Actual behavior: [ What actually happened ]
See above. I don't get the new cards I asked for
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
Yes
Anki 2.1.22
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
Version 2.1.22 (0ecc189a)
Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
System
[True Retention by Card Maturity (923360400)] Retention stats show up as N/A
[ What were you doing when the problem occurred? ]
Expected behavior: [ Percentage values given instead of N/A ]
Actual behavior: [ Ad on shows N/A instead of percentage values ]
Reproducible?: [ Yes ]
Anki
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
[ Version 2.1.22 ]
[ Qt 5.14.1 PyQt 5.14.1 ]
System
how can I hide that toolbar while doing reps? https://i.imgur.com/uO5wRPJ.png it's only 1 thing not going even with full screen and https://ankiweb.net/shared/info/1999609504
Puppy Reinforcement
[ Please mention the add-on in the issue title as follows: "[Add-on name] My issue" ]
[ Please enter an [ x ] character to confirm the points below: ]
[ Please be as specific as possible. Provide screenshots if you think they can help. ]
As you can see from the images (if you are able to see them), I have only studies 19 cards so far today, but my puppy encouragement is congratulating me on "225" cards done so far. It is counting cards done from previous days.
Add into the code for the reinforcement card number count to refresh each day along with anki.
[ What were you doing when the problem occurred? ]
Starting a new day's cards.
Expected behavior: [ What you expected to happen ]
Card count to refresh.
Actual behavior: [ What actually happened ]
Card count included yesterday's cards.
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
2.1
Anki
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
[ Version 2.0.47 ] Version 2.1 newest version
[ Qt 4.8.1 PyQt 4.9.1 ]
System
[ Please mention the add-on in the issue title as follows: "[Add-on name] My issue" ]
[ Please enter an [ x ] character to confirm the points below: ]
[ I study from a large Anki deck that has multiple subdecks and subsubdecks. I am sure I know what the problem is and would like to know if there is a work around. So all the subdecks in my card deck are under the following settings: new cards / day = 9999, reviews / day = 9999. And the parent deck has the following settings: new cards / day = 1000, reviews / day 9999. I do this so that I don't have to change the options settings on each sub deck because there are many. Now, the progress bar is calculating that I have more new cards to do than I actually do.
I believe it does this because every subdeck gives me the opportunity to complete 100 cards. So progress bar is adding up all of these potential new cards and saying that I have many more new cards to do.]
[ What were you doing when the problem occurred? ]
Expected behavior: [ What you expected to happen ]
Actual behavior: [ What actually happened ]
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
Anki
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
[ Version 2.0.47 ]
[ Qt 4.8.1 PyQt 4.9.1 ]
System
[ Please mention the add-on in the issue title as follows: "[Add-on name] My issue" ]
[ Please enter an [ x ] character to confirm the points below: ]
In the Reviewer, with only the Question visible, neither "H" nor "G" work. There's no visible response.
Present only a Question in the Reviewer.
[ What were you doing when the problem occurred? ]
1 With any Question visible, press H or G.
2. Repeat 1 several times, with same result.
Expected behavior: [ What you expected to happen ]
With H, I expected a single character to be presented.
Actual behavior: [ What actually happened ]
No visible response.
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
Yes.
Anki
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
Version 2.1.13 (3ba55990)
Qt 5.12.1 PyQt 5.11.3
System
FURTHER INFO
Your addon also does not work in Anki 2.0, when no other add-ons are enabled. Today is the first time that I tried it. I didn't know it existed in the online list of addons. According to the online reviews, it looks as if I'm the only user who can't get it to work.
My own 20-line Mickey Mouse version for Anki 2.0 works OK. This is a direct descendant of the simple BLickly original. You helped me to modify this from 1.9 to 2.0 on the Anki Addons forum.
So, I can continue with Anki 2.0 plus Mickey Mouse, but it would be nice if your latest version worked (for me) in 2.1.
Thanks.
Thank you very much to react so quickly. This add-on should be a default Anki behaviour. So, I am very grateful and a lot of other users will be.
Refocus Card when Reviewing
When I use this add-on Enter function is disabled. Show answer and answer default proceeding to next card by hitting Enter both in main keyboard area and numeric keyboard area doesn't work. Only Space does that.
Expected behaviour: [ What you expected to happen ]
Both Enter keys should work normally with this add-on.
Actual behavior: [ What actually happened ]
Enter doesn't work.
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
Always. I disabled add-on, restarted Anki and Enter worked. I enabled add-on and Enter didn't work again.
Maybe it conflicts with other add-ons. I don't know. I can provide you with a list of add-ons that I use. But Enter worked normally until I installed this add-on.
Anki Version 2.1.4, Qt 5.9.2 PyQt 5.9 on Manjaro Linux Plasma 5.13.5, QT 5.11.1
[ Please mention the add-on in the issue title as follows: "[Add-on name] My issue" ]
[ Please enter an [ x ] character to confirm the points below: ]
[ The addon appears to work fine but the sidebar it generates it too narrow. There is also no option to expand the sidebar. I have added an image below. ]
Hey,
I've been using the "more answer buttons" 2.1 port and have noticed that when I use the additional buttons (higher than my easy interval of 5), the card gets the easy interval (5 days) instead.
I could be incorrect, but i'm going off what I see in "Extended card stats during review", which shows "Interval 5d" under "Last"
I am using the V2 scheduler. Perhaps this is the issue?
I've added some tag to my notes that is not useful, So I tried to delete them by replacing them with "null", But it doesn't work?May I have some suggestion? Thanks!
Hey man,
I just thought it would be a good idea to add the option to show tags in the addon.
Quick Field Navigation
[ Please enter an [ x ] character to confirm the points below: ]
I open the editor while reviewing in Anki 2.1 and then use i.e. ctrl+1 for your Quick-Field-Navigation-Addon. That also works. But I have the impression that it accidentally also adds a red flag (new in Anki 2.1) to the card. That effect only happens sometimes.
Expected behavior: the first field of the note is selected.
Actual behavior: the first field of the note is indeed selected. On top of it, the card is flagged red (new Anki 2.1-flags).
Reproducible?: Not reliably, it only seems to happen sometimes. Nevertheless that's very annoying as I use the red flag to flag certain cards and this adds random cards to this flagged collection.
As it only happens sometimes, I'm not entirely sure of it. But it seems logical, as ctrl+1 is a shortcut for your Quick Field Navigation Addon and in Anki 2.1 for flagging cards red.
Anki
Version 2.1.22 (0ecc189a)
Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
System
[ Please mention the add-on in the issue title as follows: "[Add-on name] My issue" ]
[ Please enter an [ x ] character to confirm the points below: ]
[ Please be as specific as possible. Provide screenshots if you think they can help. ]
There is no handle to resize the window, and the window is too narrow. No alternative way to resize window anywhere to be found either. Window cannot therefore be resized.
Install the app normally on Linux Debian (Anki installed via Snap).
[ What were you doing when the problem occurred? ]
Expected behavior: [ What you expected to happen ]
Some way to resize window, e.g. handle on line between flashcard and stats window.
Actual behavior: [ What actually happened ]
No handle between lines (and no alternative anywhere to be found).
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
Yes.
Anki
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
[ Version 2.0.47 ]
[ Qt 4.8.1 PyQt 4.9.1 ]
Version 2.1.16 (dev)
Qt 5.9.5 PyQt 5.10.1
System
[ Batch Remove Formatting (e.g. bold, italics, etc.) ]
[ Please enter an [ x ] character to confirm the points below: ]
[ Please be as specific as possible. Provide screenshots if you think they can help. ]
Addon not working. Throws this error:
An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons
Traceback (most recent call last):
File "D:\OSCAR\PortableApps\AnkiPortable\Data\ankidata\addons\Batch_Remove_Formatting_eg_bold_italics_etc.py", line 76, in
a.triggered.connect(lambda _, b=browser: onClearFormatting(b))
File "D:\OSCAR\PortableApps\AnkiPortable\Data\ankidata\addons\Batch_Remove_Formatting_eg_bold_italics_etc.py", line 99, in onClearFormatting
note.fields = stripFormatting(note.fields)
File "D:\OSCAR\PortableApps\AnkiPortable\Data\ankidata\addons\Batch_Remove_Formatting_eg_bold_italics_etc.py", line 60, in stripFormatting
soup = BeautifulSoup(html, "html.parser")
File "thirdparty\BeautifulSoup.py", line 1521, in init
File "thirdparty\BeautifulSoup.py", line 1146, in init
File "thirdparty\BeautifulSoup.py", line 1188, in _feed
File "sgmllib.py", line 104, in feed
File "sgmllib.py", line 138, in goahead
File "sgmllib.py", line 296, in parse_starttag
File "sgmllib.py", line 338, in finish_starttag
File "thirdparty\BeautifulSoup.py", line 1343, in unknown_starttag
AttributeError: 'unicode' object has no attribute 'text'
[ Version 2.0.36 portable ]
[ Qt 4.8.1 PyQt 4.9.1 ]
System
Progress Bar
The bar is not going to 100%. I finish all my cards after I reached around 60%.
In #33 there is a suggestion to set L34 to false. Nothing changed after doing this.
Expected behavior:
After going through all decks 100% should be reached
Actual behavior:
Only can reach around 60%
Reproducible?:
Yes
Anki
Version 2.1.8
Qt 5.11.3 PyQt 5.11.3
System
I've been using the "More answer buttons" port for 2.1 for a few days without any issues. However, just today out of nowhere there's a strange bug where whenever I select one of the extra buttons, my reviewer shows the "Waiting for editing to finish" with the "resume now button" as if I was editing a card. However, the editor is not open, just the aformentioned screen.
I can click resume now to resume my study, but it happens every time I select any of the new buttons now.
For https://ankiweb.net/shared/info/1604562448 on Anki 2.0.43.
(I couldn't find the addon here)
This is about tag entry enhancements.
I wish I could list all tags. For example, lets say I have the following tags in my collection:
I add the "programming" tag and I get a space at the end. I then have to remember the letter that the next tag starts with, rather than listing them all.
I don't have to remember the available tags to select them. I would want to be able to trigger the listing of ALL tags while there is "programming " in the textbox, without typing in the first letter. Is that possible?
I will have a go, but I have hardly touched python.
Duplicate Selected Notes
The newly duplicated note should belong to the same note type as the source.
Expected behavior: [ What you expected to happen ]
A duplicate note is created with the same field content, deck and note type.
Actual behavior: [ What actually happened ]
If the last active note type has the same number of fields as the note type of the duplication source, the newly duplicated note receives the last active note type, rather than the note type of the source note.
Consecutive invocations of "Create Duplicate" on notes with varying number of fields causes Anki to crash.
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
Yes.
Anki
Version 2.1.0beta41
Qt 5.9.2 PyQt 5.9
System
Linux
Ubuntu 18.04
The help page for Browser Search Hotkeys says the following:
Hotkeys follow this scheme: Ctrl+S –> (Modifier) + Key. I.e.: hit Ctrl+S to start the key sequence, let go of Ctrl+S, then hit the key assigned to your search, plus an optional modifier.
'F': {'search': 'card:1'}, # First
Pressing CTRL on Mac doesn't seem to work.
If I press CMD + S and then F, it works and the content of the browser is replaced with "card:1". However, I would like to add "card:1" to the existing browser contents rather than replacing it.
The instructions say to press CTRL + S and then CTRL +F. How do I make this work on Mac?
If I press CMD+ S and then CMD + F, nothing happens, other than the existing browser contents becoming highlighted.
If I press CMD+ S and then CTRL + F nothing happens at all.
[ Please mention the add-on in the issue title as follows: "[Add-on name] My issue" ]
[ Please enter an [ x ] character to confirm the points below: ]
[ Please be as specific as possible. Provide screenshots if you think they can help. ]
[ What were you doing when the problem occurred? ]
Expected behavior: [ What you expected to happen ]
Actual behavior: [ What actually happened ]
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
Anki
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
[ Version 2.0.47 ]
[ Qt 4.8.1 PyQt 4.9.1 ]
System
If I click a tag in the left hand column, get tag:tex
, hit ⌘A, and then Tags → Replace Tag …, I'd assume the “original tag” would be auto-filled with tex
.
Is this something you could easily add?
(Heh, I keep finding myself typing the replacement name as soon as I hit “replace tag” — over and over; somehow it's permanently burned into my muscle memory, just assuming that it's ‘replacing’ the currently-selected tag!)
The "h" hotkey in your add-on [Hint Hotkeys] stops working during a review when I use the add-on called [Life Drain] (found here: https://ankiweb.net/shared/info/715575551), which draws a bar on the review screen similar to your add-on [Progress Bar].
Specifically, the "h" hotkey works until I do something that stops displaying a card during my review, such as editing a card or adding a card or switching decks. I can only get the "h" hotkey working again by closing and reopening Anki. Rebinding "h" does not fix the issue.
Any ideas for a workaround to keep the "h" hotkey working despite this conflict while using the [Life Drain] add-on?
And thanks for making so many useful add-ons. I'm using 6 or so of your add-ons and they are tremendously helpful.
Anki
Version 2.1.5
Qt 5.9.2 PyQt 5.9
System
Customize Editor Stylesheet
[ Please enter an [ x ] character to confirm the points below: ]
You said "Create an _editor.css file in your media collection", but there is no such button in menu to open "media collection" or "Create an _editor.css file"
Expected behavior: [ What you expected to happen ]
Create an _editor.css file in your media collection by clicking a button.
Anki
Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Mac 10.14.6
Flags: frz=True ao=True sv=1
System
Select a deck on which your add-on applies (in anki 2.1. I.e. in the port I made). Synchronize
Expected behavior: [ What you expected to happen ]
Synchronization
Actual behavior: [ What actually happened ]
Anki state my collection is an inconsistent state.
Elmes explained that I regularly have an incorrect number of card to review in my current deck. And actually, now that I recall that I use this add-on, it makes perfect sens. It means that this add-on should not be activated during synchronization.
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
Yes
Anki 2.1.12
System
[ Please mention the add-on in the issue title as follows: "[Add-on name] My issue" ]
[ Please enter an [ x ] character to confirm the points below: ]
In regards to this message, i followed these steps, and found it did not fix the problem by selectively disabling the browser. I then disable scroll bars styling as well. Unticking the style dialogs did fix it.
Expected behavior: Sidebar should take a reasonable amount of width
Actual behavior: side bar shows about 3 char width
Reproducible?: It's not consistent
Anki
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
[ Version 2.1.15 ]
[ Qt 5.9.2 PyQt 5.9 ]
System
Hint Hotkeys (https://ankiweb.net/shared/info/1844908621)
[ Please enter an [ x ] character to confirm the points below: ]
Addon treats every link with href=#
as hint fields. Unfortunately, this may not be the case when being used with other addons. Related codes here.
// var arr = document.getElementsByTagName('a');
for (var i=0; i<arr.length; i++) {
var l=arr[i];
if (l.style.display === 'none') {
continue;
}
if (l.href.charAt(l.href.length-1) === '#') {
l.dispatchEvent(customEvent);
if ('%s' === 'True') {
break;
}
}
}
Specific conflicting addon is Remaining Time addon. This addon adds following HTML for reset buton.
<a href="#" onclick="pycmd('_rt_pgreset');return false;" title="Reset progress bar for this deck">[⥻]</a>
I think Hint Hotkey addon needs to be more specific on what hint tag is.
This issue is related to https://github.com/phu54321/anki_plugins/issues/30
Install both Hint Hotkeys
addon and Remaining times
addons. Press 'g'.
Expected behavior: Only hints should be revealed
Actual behavior: Card reset button will trigger.
Reproducible?: Y
Anki 2.1.21 (not really related to anki version)
System
When hiding the menu bar, Qt's default behaviour will disable all main window hotkeys that have been assigned through menu QAction's. While most of them are not that important, it would make sense to at least rebind Ctrl+Z and other hotkeys that are essential to reviewing (if possible).
It would be neat if users could add predefined PDF files (e.g. a reference work / book) as look-up targets in the context menu. However, to implement this we would have to find a way to make it work across all platforms Anki supports (and identify PDF readers that actually support programmatic search term look-ups).
Let It Snow
[ Please enter an [ x ] character to confirm the points below: ]
After pressing undo or editing a card, the snow disappears shortly after falling from the top of the screen.
GIF of the bug: https://imgur.com/CcJDiPI
Expected behavior: Snow falls all the way down the screen like normal
Actual behavior: Snow disappears after falling down a certain height (as seen in linked GIF above)
Reproducible?: Yes
Anki
Version 2.1.7 (a6c34fd7)
Qt 5.12.0 PyQt 5.11.3
System
Hint Hotkeys "h" replaying audio instead of showing hints
For the hotkeys the "h" key is replaying audio instead of revealing hints. The "g" key works though and will reveal what I have in a hint field but it will also replay the audio of the card.
Expected behavior: I expected the hint to be shown
Actual behavior: The audio of the card replayed
Reproducible?: It does this to every card in my deck
**Notes: I messed around a little bit. "h" will show the hint if the hint field is above the audio field but it will also replay the audio and not just show the hint. "g" works no matter where the hint is on the card but will also replay the audio.
Anki
Version 2.1.20 (47a1bf8b)
Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
System
Windows 10
Hi Glutanimate,
Does using "search and replace" working with Hierarchical tags? I tried to replace a "master" tag, but it doesn't work.
Any help offered would be greatly appreciated
Thank you very much
This add-on has a side effect: after the synchronization to the ankidroid, the new line introduced will be interpreted by ankidroid as <br>
, so once we edit and save cards on ankidroid, every <br>
will be added to our card and become a truly visible new line (not only in HTML code), which may not be what we want.
Hope @glutanimate will find a way to solve this problem. Anki Windows Version 2.0.47 & Ankidroid v2.8.2
Cheers
[ Please mention the add-on in the issue title as follows: "[Add-on name] My issue" ]
[ Please enter an [ x ] character to confirm the points below: ]
[ Please be as specific as possible. Provide screenshots if you think they can help. ]
[ What were you doing when the problem occurred? ]
Expected behavior: [ What you expected to happen ]
Actual behavior: [ What actually happened ]
Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]
Anki
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
[ Version 2.0.47 ]
[ Qt 4.8.1 PyQt 4.9.1 ]
System
Hi, thanks for this awesome addon.
Can you add a option to search in multisites in the same time?
thanks
Quick Field Navigation
[ Please enter an [ x ] character to confirm the points below: ]
Porting to anki 2.1, or having fields shortcuts in anki 2.1 in anyway whatsoever.
[ Please be as specific as possible. Provide screenshots if you think they can help. ]
Anki
[ Please head to Help → About Anki and Paste the version string here, e.g.: ]
Versione 2.1.15 (442df9d6)
Qt 5.12.1 PyQt 5.11.3
System
Any way to make this work with a different key as command+1,2,3,4 are now to flag cards?
In the "Change tag" dialog, the auto-complete feature only shows the tags of the selected card (or of the card that was first selected when dealing with multiple cards). If I try to type the name of another tag in my collection, it doesn't show up in the list. This behaviour differs from Anki's tag inputs (e.g. in the "Add tags" dialog).
Edit: This is a well known problem and there is a fix, see the my first answer below.
media.collection
folder with this content:.field {
background: #cad7ff ! important;
}
If I don't use ! important
the styling is not applied. I can reproduce the bug with the general background
and the more special background-color
. I can reproduce this bug with different background color combinations. If I use #ffffff
the span element is not added and there is no bug. But even #fffffe
triggers this bug.
5. Restart Anki and go to the Add window. Enter the html source code a<div>b</div>
into an empty field (type "a", press "Enter", type "b").
6. Put the cursor behind "a" and press "del" or put the cursor before "b" and press "backspace".
7. Now the html source code looks like this:
a<span style="background-color: rgb(255, 255, 255);">b</span>
Reproducible?: YES
Anki: Version 2.1.11 (3cf770c7), Qt 5.12.1 PyQt 5.11.3
System Windows 10(1809)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.