Damien Elmes
27e605e9eb
move the remaining exports from _backend
2021-01-31 18:56:16 +10:00
Damien Elmes
e5f9e4c5e4
embed BuiltinSortKind
2021-01-31 18:56:16 +10:00
Damien Elmes
1b4106dbf0
embed kind enum in StockNoteType and remove prefix
2021-01-31 18:56:16 +10:00
Damien Elmes
7325d0e0d4
add back basic rsbackend.py for compatibility
2021-01-31 18:55:45 +10:00
Damien Elmes
ff19818097
remove template_legacy.py
2021-01-31 18:55:45 +10:00
Damien Elmes
ebfc9d1915
move rsbridge into _backend
2021-01-31 18:55:45 +10:00
Damien Elmes
a6be0f493b
start work on more clearly defining backend/protobuf boundaries
...
- anki._backend stores the protobuf files and rsbackend.py code
- pylib modules import protobuf messages directly from the
_pb2 files, and explicitly export any will be returned or consumed
by public pylib functions, so that calling code can import from pylib
- the "rsbackend" no longer imports and re-exports protobuf messages
- pylib can just consume them directly.
- move errors to errors.py
Still todo:
- rsbridge
- finishing the work on rsbackend, and check what we need to add
back to the original file location to avoid breaking add-ons
2021-01-31 18:55:45 +10:00
RumovZ
ea73d1f39d
Remove unused BackendNoteTypeID
2021-01-31 08:57:10 +01:00
Damien Elmes
9a697fd843
Merge branch 'more-backend-search' into main
2021-01-31 14:21:51 +10:00
Damien Elmes
5710e4bbd0
move drag/drop deck logic to backend
2021-01-31 13:46:31 +10:00
RumovZ
0374e8f4fe
Revert addition of pb.NoteIDs
2021-01-30 12:59:18 +01:00
RumovZ
8033cc6784
Remove redundant docstring
2021-01-30 10:37:46 +01:00
Damien Elmes
2f1bbd44d2
simplify nid/nids searches, and ditch helper function
...
- IdList could be re-used for a cids: search in the future if required.
- Embedding the message means it's easy to access from Python as
an attribute of SearchTerm.
2021-01-30 11:37:00 +10:00
Damien Elmes
f6f537e89f
simplify Dupe message and ditch helper function
...
Calling code doesn't need to know about the existence of such helpers;
it can just rely on code completion to discover the required arguments.
2021-01-30 11:10:26 +10:00
Damien Elmes
cf1e2a2c0d
export SearchTerm from collection.py, and avoid exporting embedded items
2021-01-30 11:01:11 +10:00
Damien Elmes
b34d128560
rename FilterToSearchIn in backend to match frontend
2021-01-30 10:54:21 +10:00
RumovZ
c7365abc9e
Refactor search_string() and FilterToSearchIn
...
See #955 .
2021-01-29 18:27:33 +01:00
Damien Elmes
34c53aafb4
add getter/setter for boolean config values
2021-01-29 21:03:19 +10:00
RumovZ
9cf02efd20
Use proper docstrings
2021-01-29 09:40:21 +01:00
RumovZ
12c97442c9
Rename filters added_in etc. to added_in_days
2021-01-29 09:38:13 +01:00
Damien Elmes
137679a1a1
remove unused set_all_config; expose .all_config().
2021-01-29 16:30:42 +10:00
RumovZ
df1d059128
Use backend filter for findDupes and handle excep.
2021-01-28 19:49:16 +01:00
RumovZ
d3d34bd9b3
Add backend filter for field name
2021-01-28 19:48:01 +01:00
RumovZ
cd9a3734c3
Use backend nid filter in browser
2021-01-28 16:21:56 +01:00
RumovZ
5af4b9f2a4
Add helper functions for search strings in col
2021-01-28 11:13:57 +01:00
Maksim Abramchuk
abd2f1a712
Remove unused variable
2021-01-26 21:37:16 +00:00
Damien Elmes
08f6ec649c
fix finished screen not showing when learning cards due later
2021-01-25 21:12:57 +10:00
Damien Elmes
a6a4c0032d
Merge pull request #934 from hgiesel/graphprefs
...
Add GraphsPreferences API to graphs for setting persistent preferences
2021-01-23 21:24:41 +10:00
Damien Elmes
387be76c00
minor wording tweak: GraphsPreferences -> GraphPreferences
2021-01-23 20:47:45 +10:00
Damien Elmes
fd6465c460
refresh new/rev counts when fillNew/fillRev() fails
...
This was the behaviour before, but got lost when ._reset_counts() was
added. Also added the check back to schedv2:fillRev(), which also
appears to have gotten lost in the move to ._reset_counts()
Just a stop-gap fix until this code can get a proper rewrite.
2021-01-23 14:02:05 +10:00
Damien Elmes
6329824e25
remove "invalid current deck"
...
This should resolve itself when a user clicks on a deck.
2021-01-23 13:04:58 +10:00
Henrik Giesel
25eee0e704
Change the function name in genbackend.py
2021-01-22 20:05:28 +01:00
Henrik Giesel
1516f5c37e
Add GraphsPreferences endpoint to backend
2021-01-22 13:13:48 +01:00
abdo
4dfaf06308
Use new backend filters in rename_tag()
2021-01-16 18:49:48 +03:00
abdo
112aa44c90
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-15 01:12:01 +03:00
abdo
53736b7b9d
Pass escaped name to bulk_update in rename_tag
2021-01-14 18:38:46 +03:00
abdo
4911945b9b
Refactor code for clearing unused tags and saving collapse state
2021-01-14 07:04:14 +03:00
RumovZ
895b3a0b6f
Use backend to set dupe filter
2021-01-14 10:42:37 +10:00
Damien Elmes
6cc58451b1
add local sync server frontend
2021-01-13 11:42:00 +10:00
abdo
c423e8d7bb
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-12 23:31:58 +03:00
Damien Elmes
48892e588b
tidy up UTC offset handling/timing calculations
...
- use the TimestampSecs newtype instead of raw i64s
- use FixedOffset instead of a minutes_west offset
- check localOffset each time the timing is calculated, and set it
if it's stale - even for v1.
- check for and fix missing rollover when calculating timing
- stop explicitly passing localOffset in the sync/start call
2021-01-12 21:32:56 +10:00
Damien Elmes
5e34168f7f
remove temporary sync/dbcheck logging
2021-01-12 18:47:08 +10:00
Damien Elmes
0accefcd94
drop basicCheck()
...
It can considerably slow down syncing on large collections
2021-01-12 18:47:08 +10:00
Damien Elmes
4b98ce0145
Merge pull request #917 from hgiesel/querynozero3
...
Coerce added/edited:0 to 1, Constrain rated:n to 1-365
2021-01-11 16:24:12 +10:00
Henrik Giesel
3d2fcb6215
Adjust pyblib test_find
2021-01-10 16:25:52 +01:00
RumovZ
3d93d440c9
Also add FilterToSearch to want_release_gil()
2021-01-10 11:31:00 +01:00
RumovZ
02837ebbef
Use explicit wrapper functions to get filters
2021-01-09 16:48:47 +01:00
abdo
a17d309ed3
Move tag collapse method to the backend
2021-01-09 17:10:16 +03:00
abdo
a18227acc4
Do not check for missing tag parents at registration time
2021-01-09 17:10:16 +03:00
abdo
a30a2638ce
Hierarchical tags
2021-01-09 17:10:13 +03:00