Commit graph

627 commits

Author SHA1 Message Date
Damien Elmes
a33a02f3de update if a compatible branch is found, even if mtime is wrong
https://anki.tenderapp.com/discussions/ankiweb/4668-addon-auto-update-problems
2020-04-15 18:47:04 +10:00
Damien Elmes
8dafa8bce5 move autoplay() into card 2020-04-13 09:04:30 +10:00
Damien Elmes
6bef493aa5 fix replay audio again, and decouple the code from the reviewer 2020-04-13 08:59:36 +10:00
Damien Elmes
79a50ffb91 use isolation characters instead of direction markers in cloze handling
https://anki.tenderapp.com/discussions/ankidesktop/40443-improper-location-of-c1foo-on-ltr-text-in-an-rtl-cloze-field
2020-04-13 08:34:17 +10:00
Damien Elmes
25789e14ef avoid adjusting position if selected row is visible
https://anki.tenderapp.com/discussions/beta-testing/1868-anki-2124-beta#comment_48227037
2020-04-11 15:54:52 +10:00
Damien Elmes
4509a8c494 Merge pull request #550 from BlueGreenMagick/debugDiag-contextMenu
add clear actions to context menu in debug console
2020-04-11 14:19:46 +10:00
Damien Elmes
e1a0646d56 Update main.py 2020-04-11 14:19:27 +10:00
Damien Elmes
23c02f0a85 fix error when replaying audio in preview screen 2020-04-10 20:33:48 +10:00
Damien Elmes
c3f149ab94 make sure preview window is closed when browser closed 2020-04-10 20:32:48 +10:00
Damien Elmes
4da189a48c grey out spinner if max=0
https://anki.tenderapp.com/discussions/ankidesktop/32710-custom-study
2020-04-10 20:32:48 +10:00
Damien Elmes
79bcba0e52 Merge pull request #549 from BlueGreenMagick/debug-resizable
Allow changing height of debug console text edit boxes
2020-04-10 19:46:13 +10:00
BlueGreenMagick
4b63d598af add clear actions to context menu in debug console 2020-04-10 15:45:25 +09:00
BlueGreenMagick
2e44724e23 put debug textedits in a splitter 2020-04-10 13:50:09 +09:00
Damien Elmes
2723a03294 make sure progress stops when collection corrupt message shown 2020-04-09 14:19:20 +10:00
Damien Elmes
a1b1b7e428 fix deck_browser_did_render hook 2020-04-09 13:40:19 +10:00
Damien Elmes
896b798f12 Merge pull request #542 from BlueGreenMagick/addcards-cloze-warning
detect cloze cards with other filters
2020-04-08 16:30:00 +10:00
Damien Elmes
6f7b4191a3 Merge pull request #545 from BlueGreenMagick/draggable-field-pos
allow dragging fields to change its position
2020-04-08 16:22:27 +10:00
Damien Elmes
6fa53fa734 fix preview closing
https://anki.tenderapp.com/discussions/beta-testing/1868-anki-2124-beta#comment_48228480
2020-04-08 16:21:20 +10:00
Damien Elmes
83e988ce94 print exception on close 2020-04-08 10:05:33 +10:00
BlueGreenMagick
e7dba3709b allow dragging fields to change its position 2020-04-07 16:42:33 +09:00
BlueGreenMagick
50ae0bed3f use model type to detect cloze notes 2020-04-07 14:02:53 +09:00
Damien Elmes
f8f00f9d21 Merge pull request #543 from Arthur-Milchior/sort_according_to_path
Sort according to path
2020-04-07 14:44:53 +10:00
Damien Elmes
668bd25568 Merge pull request #541 from BlueGreenMagick/tmpNote-cloze
detect renamed cloze fields in note type preview
2020-04-07 14:17:44 +10:00
Damien Elmes
12e9293f60 avoid unnecessary work in 'make build' 2020-04-07 10:59:14 +10:00
BlueGreenMagick
e9929f84af detect renamed cloze fields in note type preview
and cloze fields that is also other special field type
such as '{{cloze:hint:Text}}'
2020-04-07 08:56:54 +09:00
Arthur Milchior
d095b017e4 _basename to basename, since it's not private in use 2020-04-06 23:51:50 +02:00
Arthur Milchior
859178c113 _basename used where possible 2020-04-06 23:51:42 +02:00
Arthur Milchior
e6024d4d3d replace _path by path (because it's not private here) 2020-04-06 23:50:43 +02:00
Arthur Milchior
8962194dcb uses _path where possible 2020-04-06 23:50:37 +02:00
Arthur Milchior
7bef7ef8ec Sort decks according to their paths
Currently it's sorted alphabetically. Because of this, "A::B" appears
between "A9" and "AA" in list of decks.
2020-04-06 22:49:25 +02:00
Damien Elmes
b5022ad354 store config in separate DB table
- mtime is tracked on each key individually, which will allow
merging of config changes when syncing in the future
- added col.(get|set|remove)_config()
- in order to support existing code that was mutating returned
values (eg col.conf["something"]["another"] = 5), the returned list/dict
will be automatically wrapped so that when the value is dropped, it
will save the mutated item back to the DB if it's changed. Code that
is fetching lists/dicts from the config like so:

col.conf["foo"]["bar"] = baz
col.setMod()

will continue to work in most case, but should be gradually updated to:

conf = col.get_config("foo")
conf["bar"] = baz
col.set_config("foo", conf)
2020-04-06 15:39:47 +10:00
Damien Elmes
d5200974f8 omit period in steps when possible 2020-04-06 15:39:47 +10:00
Damien Elmes
3c7eabc51e add flag to skip downgrade on collection close
Disabled for now; when enabled it will allow faster collection
open and close in the normal case, while continuing to downgrade
when exporting or doing a full sync.

Also, when downgrading is disabled, the journal mode is no longer
changed back to delete.
2020-04-04 17:21:45 +10:00
Damien Elmes
ac54f85840 update tag handling
- tag list stored in a separate DB table
- non-wildcard searches now do full unicode case folding
(eg tag:masse matches 'Maße')
- wildcard matches do simple unicode case folding
- some functions haven't been updated yet, so ascii folding will
continue to be used in some operations
2020-04-03 19:34:46 +10:00
Damien Elmes
07c414692e preserve mtime/usn when syncing deck config, and add snake_case names 2020-04-03 19:34:46 +10:00
Damien Elmes
6a7a18126f Merge pull request #537 from Arthur-Milchior/add_card_did_init
hook add_card_did_init
2020-04-03 19:34:33 +10:00
Arthur Milchior
952d943440 hook add_card_did_init 2020-04-03 11:03:08 +02:00
evandrocoan
b879c4a951 Fixed double python version check for python_requires=">=3.7" 2020-04-02 22:56:53 -03:00
evandrocoan
2cc12313dd Deprecated sdist wheels and pyqtwebengine as dependency 2020-04-02 22:56:48 -03:00
evandrocoan
e613e0dcbd Set the minimum python version required by anki on qt/setup.py 2020-04-02 22:56:44 -03:00
evandrocoan
7d1c5140a8 Set to build a source distribution instead of build distribution
for aqt on qt/Makefile, because .whl files are just zip simple
zip files and do not support dynamic versioning. Also, there is no
restriction for aqt to be shipped as source tarball because it does
not ship any binaries.
2020-04-02 22:56:37 -03:00
evandrocoan
745371f510 Fixed setup.py installing pyqtwebengine on older versions of pyqt 2020-04-02 22:56:33 -03:00
evandrocoan
4f591235c7 Set to checks.yml install and import anki wheels
# Conflicts:
#	.github/workflows/checks.yml
2020-04-02 22:56:13 -03:00
Damien Elmes
1f64059897 add type checking to previewer 2020-04-03 09:13:33 +10:00
Damien Elmes
da55f82619 add missing license header 2020-04-03 09:05:32 +10:00
Damien Elmes
3f965f5534 use old name for preview dialog to avoid breaking add-ons 2020-04-03 09:00:18 +10:00
Damien Elmes
8eca40dab8 fix some errors in the previewing code 2020-04-03 09:00:08 +10:00
Damien Elmes
d7edbedac0 Merge pull request #535 from evandroforks/upload_wheels_to_pypi
Created the GitHub Actions step Upload to PyPi
2020-04-03 08:40:17 +10:00
Damien Elmes
3959f7dcb8 render() conflicts with Qt method 2020-04-03 08:29:35 +10:00
Damien Elmes
c74cf44e90 be explicit that the method is a no-op 2020-04-03 08:27:56 +10:00