Giter Club home page Giter Club logo

anki-search-inside-add-card's People

Contributors

akiira avatar arthur-milchior avatar aviral-batra avatar burke avatar dependabot[bot] avatar fonol avatar glutanimate avatar ijgnd avatar p4nix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anki-search-inside-add-card's Issues

Keywords

I've included my list of Keywords, but some of them appear in the list below:

image

image

Exclude some field in the search

Hi, truly impressed by the addon. Can you add the possibility to exclude a field in the json file. I have a "Audio" filed with some crazy name from google translator and the search matches random letters in the audio file name. It would be nice if I could exclude the "Audio" field from the search. Thanks!

Keywords

My Anki is in PT-BR. We use ç, á, ô, ã, etc ...
It looks like the keywords screen is deleting these letters. They do not appear.

image

Throwing error message at launch with 2.1.17

Anki 2.1.17 (81bdd860) Python 3.8.0 Qt 5.14.0 PyQt 5.13.2
Platform: Windows 10
Flags: frz=True ao=True sv=?

C:\Users\John Smith\AppData\Roaming\Anki2\addons21\1781298089\src\notes.py:207: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
conn.execute("delete from marks where nid = %s and page %s and marktype = %s" (nid, page, mark_type))

indexing on demand

Index is build every Anki start. Normally it takes for my deck about 1 minute, with FTS option true, about 15 seconds.

But I don't add cards every Anki session or even when I add or do some editing, not always it is very important.
Although this add-on is wonderful and very useful, its usage doesn't justify being forced to wait a minute every time I want to do my Anki session or perhaps only add some cards when I read something on the Internet.

Would it be possible to disable indexing at every start and add button, so that users can decide when it is convenient for them to rebuild index?

printOutput / printSearchResults

This is shown since I have modified the add-on's "settings" in the edit window, particularly "render immediately", "left side width" and "hide sidebar".

Error 
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. 
If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. 
When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site. 
Debug info:
Anki 2.1.15 (6661ba8a) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=1

Caught exception:
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\1781298089\fts_index.py", line 233, in printOutput
    self.output.printSearchResults(result["results"], stamp, logging = self.logging, printTimingInfo = True, query_set=query_set)
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\1781298089\output.py", line 187, in printSearchResults
    cmd = "setSearchResults(`%s`, ``, page=%s , pageMax=%s, total=%s);" % (html, page, page_max, len(db_list))
<class 'NameError'>: name 'page_max' is not defined

Error in function "(WIP) Infobox"

This error occurred while trying to use this function. When you press CTRL + SPACE

Anki 2.1.10 (22d6feed) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=2

Caught exception:
  File "aqt\webview.py", line 27, in cmd
  File "aqt\webview.py", line 85, in _onCmd
  File "aqt\webview.py", line 360, in _onBridgeCmd
  File "D:\Anki\Anki.2.1.z\addons21\1781298089\__init__.py", line 126, in myOnBridgeCmd
    setWikiSummary(getWikipediaSummary(cmd[5:]))
  File "D:\Anki\Anki.2.1.z\addons21\1781298089\__init__.py", line 275, in setWikiSummary
    output.editor.web.eval(cmd)
<class 'AttributeError'>: 'NoneType' object has no attribute 'editor'

Error leaving and returning

When I leave and return, the error below occurs.

example

Anki 2.1.11 (3cf770c7) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=2

Caught exception:
  File "D:\Anki\Anki.2.1.z\addons21\1781298089\db.py", line 109, in printOutput
    self.output.printSearchResults(result["results"], stamp)
  File "D:\Anki\Anki.2.1.z\addons21\1781298089\output.py", line 51, in printSearchResults
    self.editor.web.eval(cmd)
<class 'AttributeError'>: 'NoneType' object has no attribute 'eval'

error: QWidget has been deleted

I get the following error while editing card. I edit and close edit window and error show up.

It happened twice and doesn't happen when I disable this add-on.

Debug info:
Anki 2.1.12 (eef86bf3) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Linux
Flags: frz=True ao=True sv=2

Caught exception:
  File "aqt/progress.py", line 72, in handler
  File "aqt/editcurrent.py", line 72, in _saveAndClose
  File "aqt/editor.py", line 384, in cleanup
  File "aqt/editor.py", line 309, in setNote
<class 'RuntimeError'>: wrapped C/C++ object of type QWidget has been deleted

Operating System: Manjaro Linux
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3
Kernel Version: 5.0.9-2-MANJARO
OS Type: 64-bit

Option to disable timeline

Can you please add option in config to disable timeline?

04-07-19: + added a small timeline to the bottom, which displays each day of the year in a color depending on how many cards where added that day, still a bit rough, but it works. You can hover to see the cards on each given day.

Bug - last update

When loading 'Searching PDF reading note-taking in Add dialog':
Traceback (most recent call last):
File "aqt/addons.py", line 80, in loadAddons
File "/Users/cassiouitalo/Library/Application Support/Anki2/addons21/1781298089/init.py", line 4, in
from . import src
File "/Users/cassiouitalo/Library/Application Support/Anki2/addons21/1781298089/src/init.py", line 322, in
initAddon()
File "/Users/cassiouitalo/Library/Application Support/Anki2/addons21/1781298089/src/init.py", line 120, in initAddon
aqt.editor._html += getScriptPlatformSpecific(config["addToResultAreaHeight"], delayWhileTyping)
File "/Users/cassiouitalo/Library/Application Support/Anki2/addons21/1781298089/src/web/web.py", line 40, in getScriptPlatformSpecific
script = f.read()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 46019: ordinal not in range(128)

Preparing index

I have about 50,000 cards and always enter the Anki, apparently it recalculates the indexes, not even creating any new cards. this process is time consuming.

Is this step really necessary? should not occur only once and then be just incremental?

image

Keywords 2

I do not know if it is a bug, but there is a word that I added in the "stopwords"
and continued to appear: "Resposta"

image

Results:
image

I investigated why only these words kept coming and I realized that it always comes with two points (punctuation)

image

I did a test and I added that word with the colon (punctuation) and it worked.

image

Result:

image

Because I opened this issues. The first term "Resposta" should not have ignored the term "Resposta:" with the colon?

Feature suggestion: Narrow down results

We already have filtering in the bottom-left corner, e.g. Remove Unreviewed.

This filtering feature is powerful and can be further inforced if we could narrow down the results, i.e. make search (only) with the results from the previous search.

It would be similar to when, in the normal browser search, you search for

shiny happy people

and narrow it down like:

shiny happy people r.e.m.

Feature Request: Default sort order

Hi! Thanks for an absolutely amazing add-on.

I'd love to set a default sort order.
I'm on my last year of med school, so I typically have a ton of flashcards on the same subject. As I'm adding, I'm most interested in modifying my most recent cards, so I'd like them to be on top (or at least heavily weighted).

I see you already have a "Sorting & Filtering" field, so I imagine it'd be possible to add a check-box about whether that's default behaviour?

Anywho, thanks a lot!
Martin

Error: <class 'NameError'>: name 'rerenderInfo' is not defined

Hi there!
This occurs regularly since the most recent update:

Error 
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. 
If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. 
When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site. 
Debug info:
Anki 2.1.15 (6661ba8a) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=1

Caught exception:
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\1781298089\src\__init__.py", line 318, in <lambda>
    tagEditTimer.timeout.connect(lambda: rerenderInfo(searchIndex.output.editor, text, searchByTags = True))  # connect it to your update function
<class 'NameError'>: name 'rerenderInfo' is not defined

The message makes it impossible to add new cards.

search-data.db

Just informative. I do not know if I have to do anything about it. You decide.
I was testing your addon on a deck of mine of 40,000 cards.

But I started using it effectively in an empty deck in another profile.
As I copied the add-on folder from the old profile, search-data.db contained the old data.

I am using it normally and it works (I opened and closed the Anki, several times), however I realized that search-data.db had 40Mb.

Delete the file (later I tested with the Vacuum command in SQLite) and the file decreased to 24kb.

I think it's trash from the previous profile.
Do you think that action is necessary?

GIF animate:

example

numberOfResults

This variable is not respected when the search is done by this field:

Correct
image

Not Correct
image

Button RANDOM

Let's go another one. 👍

What is the function of the RANDOM button? Is randomizing other results limited by "numberOfResults" = 100, and showing other cards initially skipped?
If so, by clicking this button, it ignores the text entered in the search field on all cards in the deck.

example3

freeze by field

Is possible freeze by field? since sometimes we are interested in the result of a specific field, besides making the search faster.

Generating Text(not cloze) and change page number of an pdf fast

I love your add-on. It will be great if you add the following feature:

  • I like to jump to the page as I wish. e.g: I am in page 1 and now I want to go to page 100
  • A button for "Generating Text" by the side of "Generating Cloze"

I hope what I am requesting is not impossible for you.
I must say you have done a great job.

anyways
thanks a lot,
Sami

Image selector not adding pictures

Just wanted to say that the send to edit field of the last couple add ons is incredible! It is such a great time saver.
I did notice that when I send text to the edit field that unless I click in the field to add changes it will not read as any text being there (I get an "empty front field" notice). With your Cloze generator I almost never need to edit the field with text I pretty much just add pictures in the extra field.
The other issue I've noticed is when I add a picture using the image snipping tool that it will not save when I add the card unless I edit the field after I add the card (ie add Cloze deletion around it or text below it. Since I normally do not do this it is prohibiting me from using this function.

Thank you for all your hard work and I hope that this helps to improve this awesome add on.

Search for numbers?

The add-on excludes numbers (1234…) from the search, am I right?
I study law and thus I often use numbers of section from legal codes as an abbreviation for a bigger concept.
Would searching for numbers be hard to implement?

Is it possible to make the addon compatible with version 2.0.X?

Hello, I saw the addon on reddit and found it very interesting, but I can not use it for incompatibility... (many addons I use are still restricted to version 2.0.X so I opted not to upgrade the program)

Anyway, congratulations to the initiative, I hope you succeed in this project. and thank you for sharing with the community!

Drag and drop image from the right column

One of the main reasons I use this add-on is to reuse previous images. If I could simply drag and drop and image from the right to a field on the left, that would be great.

Side notes:

  • Currently when you right click on the image and select copy it doesn't copies.
  • If you highlight the image then copy works as it should.
    • It copies the URL of the image file and doesn't reimports a new file into media folder which is great

Question about profiles

I have about 4 profiles in Anki.
How does it index when between accounts? Does it erase everything and start again?

Field: pasting text

"Search on typing" is triggered when typing some text, but not when we paste a text from a document. you must type anything to trigger the search. Could be triggered if I paste a text too.

decks/subdecks

I use about 300 decks / subdecks in up to 5 depth levels.

Could not this screen use the concept of hierarchy?
As it does not hierarchize in nodes, alphabetic ordering means you have to keep looking for the subdeck between 300 decks.

image

VS

image

Feature suggestion: Show deck

As far as I know, there is no way to see in your add-on which deck a card belongs to.

I can think of 3 ways. One would be sufficient for me personally.

  1. In the "info" pop-up
  2. somewhere around the border of the cards in the add-on's panel (where you have info, tags, edit, magnifying glass, etc.)
  3. upon clicking "edit" in the add-on's panel, there could be buttons to change the deck and the note type. like in the normal primary edit window

Search for an Exact Phrase

Is possible add an option for search for an exact phrase? similar to the use of quotes in google...

Or, an option for the first results be exacts.

image

Save preferences

It would be helpful if my preferences were saved when I left the screen.

example

image

Search for morphemes instead of words

Hi, one suggestion for the search in add-on mode.

I see from you screenshots in the description that you know German. The add-on mode works magnificently in English where you don't have a lot of suffixes or prefixes. When you search for "Buch" however, it won't show you "Bücher". I hope it can be modified so as to take into account grammatical inflections and then show all forms related to a morpheme. Preferably, ignoring similar morphemes' forms – in our case, "Buchen" for example.

Maybe it can be done through modifying the synonyms function. Manually entering a list of all inflections of all words would of course take more than a lifetime.

A few days ago, I saw on GitHub that someone had implemented some third person's software in their program. He seemed to use it to take into account inflections. However, I don't remember the name and can't find it again. The software's name began with "morph"…, I think.
It was not MorphMan. The Morphman documentation on GitHub however talks about "morpheme-splitting-tools" (which I've not read before but just discovered today). Maybe we can follow that trace.

Enhancement suggestion for Cloze generator

When adding cards it automatically selects the deck that is in the add card window. It would be great if it did this with the tags and note type fields as well. This would make adding the Cloze cards much more efficient.

The other option that I was thinking is that the Cloze generator could have an option to send to text field for adding B,I,U words. Similar to how you have it set for the IMG capture tool. Then I could grab the text I need and it would already have all of its Cloze deletions and the pictures and then hit add.

Selections jump around

When selecting one or two words it is accurate most of the time but when trying to select a full sentence it often jumps around and selects other words or lines entirely.

Error: no such table: notes_content

I downloaded the last update and received this when I tried to add a note:

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site.
Debug info:
Anki 2.1.15 (6661ba8a) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=1

Caught exception:
File "aqt\webview.py", line 322, in handler
File "C:\Users\Jo\AppData\Roaming\Anki2\addons21\516643804\main.py", line 177, in oncallback
runHook("loadNote", self)
File "anki\hooks.py", line 29, in runHook
File "C:\Users\Jo\AppData\Roaming\Anki2\addons21\1781298089_init_.py", line 602, in onLoadNote
printStartingInfo(editor)
File "C:\Users\Jo\AppData\Roaming\Anki2\addons21\1781298089\web.py", line 635, in printStartingInfo
html += "
Index contains %s notes." % searchIndex.get_number_of_notes()
File "C:\Users\Jo\AppData\Roaming\Anki2\addons21\1781298089\fts_index.py", line 417, in get_number_of_notes
res = conn.cursor().execute("select count(*) from notes_content").fetchone()[0]
<class 'sqlite3.OperationalError'>: no such table: notes_content

remember state of show - hide

I start new issue because I can't reopen the last one.

Sorry to bother you again, but consider this:
would it be possible for this add-on (hide / show) to somehow save its window state?

Check this:
Click on Add card. Add card window opens with this add-on visible, press Ctrl+F, it hides. Click again Add card to open another Add window. Add-on part will be visible.

The same in edit: edit card, press Ctrl+F to hide, close window, go to next card in review, press edit and add-on part will be visible.

Would it be possible for this add-on to remember its state, so that it stays hidden until I press Ctrl+F again, at least until Anki cloze.

The add-on that I linked to:
Browser Maximize/Hide Table/Editor
https://ankiweb.net/shared/info/1819291495
remembers its state (even after Anki restart).

That would be very convenient.

Suggestion for improvement: Link to edit the card

I noticed with your addon that sometimes I do not need to create a new card, but could add or update information to an existing card.

There could be a shortcut (similar to the image below) where I clicked and it displays the filtered card in the panel.

image

image

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.