Damien Elmes
8dcb7fd2ba
check for empty cloze cards when rendering as well
2020-05-14 21:56:45 +10:00
Damien Elmes
6dd31341f8
add "fill empty" checkbox
2020-05-14 20:58:45 +10:00
Damien Elmes
4c52d41632
use group box instead of tabs in card layout screen
2020-05-14 17:26:40 +10:00
Damien Elmes
4a00ad075c
drop availOrds(), and use backend for getting cloze numbers
2020-05-14 12:14:00 +10:00
Damien Elmes
257e893d95
update the card layout screen
...
- changes are now committed in bulk when closing the dialog,
and can be canceled
- it's not necessary to save the note to the database to preview it
- duplicate fields are now shown as duplicates in the top list
- redraw preview more quickly
- use + instead of _ when deduplicating names, as the latter is a
glob character
2020-05-13 17:24:49 +10:00
Damien Elmes
4815010da0
don't hide static template text when card is empty
2020-05-13 11:17:44 +10:00
Damien Elmes
14c0a5891b
fetch template and note fields in backend during normal card render
...
Saves having to serialize the note fields and q/a templates, which
is particularly a win when rendering question/answer in the browse
screen.
Also some work towards being able to preview notes without having to
commit them to the database.
2020-05-13 10:38:49 +10:00
Damien Elmes
a95fbe73c3
handle decks set to random new order
...
It probably makes more sense to randomize on queue build in the future,
but for now this imitates the previous Anki behaviour.
2020-05-12 21:13:34 +10:00
Damien Elmes
9c3f982c3b
return resolved deck to facilitate random order mode
2020-05-12 21:13:34 +10:00
Damien Elmes
21ac2c14a7
handle scheduling preferences in the backend
2020-05-12 21:13:34 +10:00
Damien Elmes
2eaa759478
fetch timing_today() params in backend
2020-05-12 21:13:34 +10:00
Damien Elmes
1018204e4f
switch server back into a bool and rely on config
2020-05-12 21:13:34 +10:00
Damien Elmes
befa66fb27
fix default rollover
2020-05-12 21:13:34 +10:00
Damien Elmes
dc9200e639
add tests for the other checks, and fix new card due limiting
2020-05-12 21:13:34 +10:00
Damien Elmes
c77bc74a2b
rename SortMode arg to match enum
2020-05-12 21:13:34 +10:00
Damien Elmes
bdf5daa422
add tests for card fixes; implement deck recovery
2020-05-12 21:13:34 +10:00
Damien Elmes
c227298565
stop using memory for sqlite temp store
...
On large collections this can end up consuming hundreds of megabytes
of RAM on operations like a vacuum.
2020-05-12 21:13:34 +10:00
Damien Elmes
d7f9bccd1e
rewrite DB check
...
- notes with wrong field count are now recovered instead of
being deleted
- notes with missing note types are now recovered
- notes with missing cards are now recovered
- recover_missing_deck() still needs implementing
- checks required
2020-05-12 21:13:34 +10:00
Damien Elmes
b03dcd2643
fetch notes in nid order
...
May reduce the amount of seeking on conventional disks. Chunking and
fetching batches of notes at once would improve things further, at the
cost of more memory use.
2020-05-12 21:13:34 +10:00
Damien Elmes
667f9e6554
bulk tag add/remove/update; canonify on note save
...
also remove the tag list updated hook - we'll need a better solution in
the future than having the library code call back into the GUI code
2020-05-12 21:13:34 +10:00
Damien Elmes
5d493b6ab8
add the Extra field back to cloze deletions as "Back Extra"
...
Originally removed because some users were adding cloze deletions to
it, but removing it just replaced that problem with a new problem where
users add the field but don't add it to their card templates.
2020-05-12 21:13:34 +10:00
Damien Elmes
0a87b1ef2c
support disabling unicode normalization in notes
2020-05-12 21:13:34 +10:00
Damien Elmes
85528cabc5
use backend for genCards() and updateFieldCache()
2020-05-12 21:13:34 +10:00
Damien Elmes
8c04718541
update find&replace in browser
...
sadly the UI still stutters on large selections - the calls
to get the selected rows from Qt are really slow.
2020-05-12 21:13:34 +10:00
Damien Elmes
ad1c519d1c
move find&replace to backend
2020-05-12 21:13:34 +10:00
Damien Elmes
2e971da79e
properly handle negated conditionals outside of req generation
2020-05-12 21:13:34 +10:00
Damien Elmes
2d0a6283e4
add an index on notes(mid) so we can avoid the tablescan
2020-05-12 21:13:34 +10:00
Damien Elmes
3abd72564a
fix sort field check on save
2020-05-12 21:13:33 +10:00
Damien Elmes
e32be05451
catch attempts to overwrite notetype with older version
2020-05-12 21:13:33 +10:00
Damien Elmes
7ef72aba04
use the backend for the deck due tree
...
- approx 3x faster on a large test deck
- counts are no longer capped to 1000 in the tree
2020-05-12 21:13:33 +10:00
Damien Elmes
267be1b050
add missing decks in backend
...
- need to compare parents with unicode case folding
- duplicate check enforced by the DB
2020-05-12 21:13:33 +10:00
Damien Elmes
97e857a41c
add browserCollapsed as part of tree build
2020-05-12 21:13:33 +10:00
Damien Elmes
13d23cd24b
speed up browser load by rendering deck tree in Rust and skipping counts
2020-05-12 21:13:33 +10:00
Damien Elmes
611959e5a8
switch primary key to deck id
2020-05-12 21:13:33 +10:00
Damien Elmes
46e0469991
rework aux table sorting
...
Instead of inserting text into the aux table and sorting on the fly
(which does a binary sort), we insert the ids in unicase-sorted order,
and then sort based on the automatically assigned rowids - giving
us faster sorts, and proper unicase folding.
2020-05-12 21:13:33 +10:00
Damien Elmes
c727a9e3f1
fix case sensitivity of notetype/template searches
2020-05-12 21:13:33 +10:00
Damien Elmes
c9db36bc82
update searching code to use decks table
2020-05-12 21:13:33 +10:00
Damien Elmes
87551574c0
add partial index on odid, and search odid as well
...
the odid != 0 check in cards_for_deck.sql is necessary for sqlite
to be able to take advantage of the index
2020-05-12 21:13:33 +10:00
Damien Elmes
24ef0cc6f1
add separate decks table, and start on moving deck handling to Rust
...
The Python tests are passing, but there are still a number of issues
to work through, and the table/protobuf schema is not yet finalized.
2020-05-12 21:13:33 +10:00
Damien Elmes
cbfe20712e
add (currently disabled) check for missing/empty decks on card add
2020-05-12 21:13:33 +10:00
Damien Elmes
082f9c95fd
split decks into module
2020-05-12 21:13:33 +10:00
Damien Elmes
8481d224d6
remove notetype from cache when removing
2020-05-12 21:13:33 +10:00
Damien Elmes
2a17f99eaa
remove unused _updateRequired and associated code
2020-05-12 21:13:33 +10:00
Damien Elmes
22440f32d7
remove :{} and leading/trailing whitespace from field names on save
2020-05-12 21:13:33 +10:00
Damien Elmes
d1cc4684d2
hook the empty cards code up to the GUI
2020-05-12 21:13:33 +10:00
Damien Elmes
d812853656
sort empty cards by notetype name
2020-05-12 21:13:33 +10:00
Damien Elmes
ed4c75c6c1
don't include non-empty notes in the list
2020-05-12 21:13:33 +10:00
Damien Elmes
c989e23012
handle negative due numbers when gathering existing cards
2020-05-12 21:13:33 +10:00
Damien Elmes
21d7df9473
empty card handling
2020-05-12 21:13:33 +10:00
Damien Elmes
4edeca6ed9
fix use counts not including unused note types
2020-05-12 21:13:33 +10:00