Damien Elmes
d32e2fe6eb
add extract_latex to backend; use it for latex build
2020-02-17 08:40:17 +10:00
Damien Elmes
2c634f5163
stripLatex() does not appear to be used anywhere
2020-02-17 08:40:17 +10:00
Damien Elmes
790f3c9f72
plug new media check in
2020-02-17 08:40:17 +10:00
Damien Elmes
edf60b10d4
backend stores media folder/db locations; don't need to pass them in
2020-02-17 08:40:17 +10:00
Damien Elmes
ef14b1a96b
simplify code by accumulating stats at the source
2020-02-17 08:40:17 +10:00
Damien Elmes
77158760ff
use enums for some common errors
2020-02-17 08:40:16 +10:00
Damien Elmes
ecab2da99e
remove unused code
2020-02-17 08:40:16 +10:00
Damien Elmes
738e415463
connect media sync progress to Python, add a progress dialog
2020-02-17 08:40:16 +10:00
Damien Elmes
804432fb3e
use separate fn to init backend, for future pyo3 0.9 release compat
2020-02-17 08:40:16 +10:00
Damien Elmes
1acb3b86b9
backend init can now fail, and update media db when file is added
...
- Adding files inside Anki now updates the media DB, so a full file
scan at sync time is no longer required if no other changes have been
made.
- Use a protobuf message for backend initialization, and return a
string error if initialization fails.
2020-02-17 08:40:16 +10:00
Damien Elmes
9a280897d3
drop support for vfat
2020-02-17 08:40:16 +10:00
Damien Elmes
c8ea895cae
drop support for the early 2.0 release media db format
2020-02-17 08:40:16 +10:00
Damien Elmes
1102983a4e
drop the clean* funcs
2020-02-17 08:40:16 +10:00
Damien Elmes
c9a5ed3cc6
add add_file() and write_data()
2020-02-17 08:40:16 +10:00
Arthur Milchior
16f40c9a01
Hook card_is_being_flushed
...
It often arrives that I want to know when a card is going to be
flushed and in this case change it.
This could be the case if I want to change the scheduler without
implementing a whole scheduler. It simply reads the card history and
change interval and due date.
It's also the case for the "'trigger -> action' rules", which apply
some coded actions when some event occurs. E.g. suspend/unsuspend a
sibling when card become mature/is forgotten.
2020-02-14 00:59:32 -08:00
Arthur Milchior
347523b442
Factorizing card's flush
2020-02-14 00:59:32 -08:00
Arthur Milchior
4b632b398e
hook note_is_being_flushed
...
I created multiple add-ons which want to transform a note before it is
being saved. For example, one add-on trim it, and remove useless line
break which arrived by accident.
Another add-on want to compile LaTeX as soon as the note is done, and
warn the user if LaTeX can't be compiled.
Having a hook in pre-flush would be useful here
2020-02-14 00:57:27 -08:00
Damien Elmes
3d1e89f014
Merge pull request #433 from Arthur-Milchior/ints
...
Constants
2020-02-14 08:37:31 +10:00
Damien Elmes
5e44fb0304
remove redundant declaration
2020-02-12 08:06:35 +10:00
Arthur Milchior
48339784cc
deckIds return deck of selected cards
2020-02-11 10:50:59 -08:00
Arthur Milchior
ad4b04bf81
ofCids: returns did of all cids
2020-02-11 10:50:59 -08:00
Arthur Milchior
0cace50f00
inverse if/else in deckIds
2020-02-11 10:50:59 -08:00
Arthur Milchior
ea0a509372
cardIds return cids if it is set
2020-02-11 10:50:59 -08:00
Arthur Milchior
17610d4c01
anki.exporter takes extra argument cids
2020-02-11 10:50:58 -08:00
Arthur Milchior
d1183df830
aqt.exporter takes extra argument cid
2020-02-11 10:49:13 -08:00
Damien Elmes
7bfcc8b079
pylint fix
2020-02-08 15:49:41 +10:00
Damien Elmes
4fb9e15201
formatting
2020-02-08 15:48:42 +10:00
Damien Elmes
391a58077a
show which side the template error occurred on
2020-02-08 11:54:08 +10:00
Damien Elmes
43b7f28417
fix rendering of question/answer column in browse screen
2020-02-08 09:29:34 +10:00
Arthur Milchior
769c806c2d
correct missing french translation
2020-02-05 20:48:30 -08:00
Arthur Milchior
538d5bd76a
remove "typing.FOO" and import foo
...
According to grep, they were the only two instances
2020-02-04 08:49:53 -08:00
Arthur Milchior
607bcc55c2
Reformatting through black
2020-02-04 08:47:36 -08:00
Arthur Milchior
611ce618a8
QUEUE and TYPE day learn, relearn
2020-02-04 08:47:36 -08:00
Arthur Milchior
abea523ffa
QUEUE_TYPE_PREVIEW
2020-02-04 08:47:36 -08:00
Arthur Milchior
41ffdbd504
QUEUE_TYPE_REV and CARD_TYPE_REV
2020-02-04 08:47:36 -08:00
Arthur Milchior
6d204a23ac
QUEUE_TYPE_SUSPENDED
2020-02-04 08:47:36 -08:00
Arthur Milchior
49b091b3ae
QUEUE_TYPE_SIBLING_BURIED
2020-02-04 08:47:36 -08:00
Arthur Milchior
dc4e48dee8
QUEUE_USER_BURIED
2020-02-04 08:47:36 -08:00
Arthur Milchior
44368caf55
CARD_TYPE_LRN and QUEUE_TYPE_LRN
2020-02-04 08:47:35 -08:00
Damien Elmes
7552b87357
Merge pull request #434 from Arthur-Milchior/didInExport
...
anki.exporting.AnkiExporter.deckIds
2020-02-04 16:59:39 +10:00
Arthur Milchior
e27b2ff554
QUEUE_TYPE_NEW and CARD_TYPE_NEW
2020-02-03 02:24:37 -08:00
Arthur Milchior
a0bbc3dc97
Card and queue type
2020-02-03 02:24:37 -08:00
Arthur Milchior
799ef6c90c
PERIOD_LIFE
2020-02-03 02:24:37 -08:00
Arthur Milchior
886fbc0e28
PERIOD_YEAR
2020-02-03 02:24:37 -08:00
Arthur Milchior
21d2549b28
PERIOD_MONTH
2020-02-03 02:24:37 -08:00
Arthur Milchior
0ec7f82790
REVLOG_CRAM
2020-02-03 02:24:37 -08:00
Arthur Milchior
fdb8a8a966
REVLOG_RELRN
2020-02-03 02:24:37 -08:00
Arthur Milchior
381699cae4
REVLOG_REV
2020-02-03 02:24:37 -08:00
Arthur Milchior
8c3f73c423
REVLOG_LRN
2020-02-03 02:24:37 -08:00
Arthur Milchior
27af916078
Add revlog constants
2020-02-03 02:24:37 -08:00