Henrik Giesel
c84a75b4a5
Implement functioning prop:rated
2021-01-16 12:42:08 +01:00
Henrik Giesel
6da38dc719
Add nonfunctional "prop:rated" as possible search query
2021-01-16 12:42:06 +01:00
Damien Elmes
b3f57754df
use of 'self' in function name was confusing
2021-01-16 21:14:55 +10:00
Damien Elmes
ff8c8a3bca
simplify unused tags and DB check
...
- backend routines should contain minimal logic, and should call
into a routine on the collection
- instead of copying the giant-string approach the Python code was taking,
we use a HashSet to keep track of seen tags as we loop through the
notes, which should be more efficient
2021-01-16 20:38:16 +10:00
Damien Elmes
7f4850659d
no need for separate all_tags_sorted()
...
tag is the primary key, so sqlite will give it back to us in
sorted order already.
2021-01-16 19:46:58 +10:00
Damien Elmes
f41eb90c21
custom ord/partialeq is not required; fix clippy lint
2021-01-16 19:44:37 +10:00
Damien Elmes
1288191743
handle missing parent names with varying case
...
Also convert to \x1f before sorting, so that numbers (with have a lower
ascii order than '::') don't mess up the sort.
2021-01-16 19:42:25 +10:00
Damien Elmes
82f9143171
add a (currently failing) test for duplicate parent names
2021-01-16 19:04:25 +10:00
Damien Elmes
96bd39f13e
search error tweaks
...
- use markdown instead of HTML, to make editing and translating easier
- use a shared prefix
- a few very minor wording tweaks
- we don't need to translate undocumented command errors
- share a string for positive number of days
- share a string for invalid property and state arguments, and avoid
listing them out
Related discussion: https://github.com/ankitects/anki/pull/922
2021-01-16 15:59:19 +10:00
RumovZ
bdb7948406
Add resched error tests
2021-01-15 10:57:55 +01:00
RumovZ
b9f7643100
Merge branch 'master' into search-errors
...
Add error support for new resched node, update rated error.
2021-01-15 10:50:02 +01:00
RumovZ
9d641bcb76
Include context in search error test
2021-01-15 09:09:54 +01:00
abdo
112aa44c90
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-15 01:12:01 +03:00
RumovZ
e0168c8216
Encode HTML entities in search errors
2021-01-14 23:02:39 +01:00
RumovZ
6f8a9ba2ff
Add search context for certain error kinds
2021-01-14 22:40:07 +01:00
RumovZ
74c2ce8df1
Rename ParseErrorKind to SearchErrorKind
2021-01-14 22:00:52 +01:00
RumovZ
6cbb4b48b2
Add errorkind test
2021-01-14 19:10:12 +01:00
RumovZ
8c6fbd828d
Add FailKinds for unopened/unclosed groups
2021-01-14 19:09:31 +01:00
RumovZ
ae22b78534
Make AnkiError::SearchError work with ParseError
...
Use mock ftl strings for now.
2021-01-14 11:14:55 +01:00
RumovZ
5e971759cf
Fix text node parsers, add FailKind alias
2021-01-14 11:10:33 +01:00
abdo
b3b6351f74
Fix unicode tag sorting
2021-01-14 07:04:55 +03:00
abdo
dd3f0d44fe
Remove Default impl of Tag
2021-01-14 07:04:55 +03:00
abdo
4911945b9b
Refactor code for clearing unused tags and saving collapse state
2021-01-14 07:04:14 +03:00
RumovZ
cbb9bb96a7
Add pb message for dupe filter
2021-01-14 10:42:37 +10:00
RumovZ
6c66da5578
Expect backslashes to be escaped in dupe: text
2021-01-14 10:42:37 +10:00
RumovZ
530cfebe19
Fix writing dupe nodes
...
Rename comments and dupe functions on the backend accordingly to avoid
further confusion.
2021-01-14 10:42:37 +10:00
Damien Elmes
9f3959ccad
Merge pull request #918 from hgiesel/ratedflags
...
Introduce `resched:n` instead of `rated:n:0`
2021-01-14 10:19:10 +10:00
RumovZ
97ed75a322
Optimise term parsers
2021-01-13 14:15:57 +01:00
RumovZ
5fc24ddfde
Move parse errors, add helper func for parse fail
2021-01-13 13:23:25 +01:00
Henrik Giesel
42b10e5a12
Change "between 1 and 4" to "> 0"
2021-01-13 11:44:54 +01:00
Henrik Giesel
28c53a410a
Rename EaseKind values
2021-01-13 11:41:48 +01: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
abdo
e3c873fb32
Keep tags in human form and update the tags table structure
...
See https://github.com/ankitects/anki/pull/900#issuecomment-758284016
- Leave tag names alone and add the collapsed and config columns to the tags table.
- Update The DB check code to preserve the collapse state of used tags.
- Add a simple test for clearing tags and their children
2021-01-12 23:12:35 +03:00
RumovZ
c9b9c73f5e
Fix top-level search errorkinds
2021-01-12 17:32:26 +01: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
RumovZ
c95a592891
Switch parser to custom erros and results
2021-01-12 10:43:12 +01:00
Damien Elmes
1f7faa8bc2
add .clang-format so VS Code preserves formatting style on .proto save
2021-01-12 18:47:08 +10:00
Damien Elmes
f1fd6df0a6
move sync JSON into separate file; add enum wrapper
2021-01-12 18:47:08 +10:00
Damien Elmes
e89d02433d
allow normal sync tests to run offline
2021-01-12 18:47:08 +10:00
Damien Elmes
1cef09b2fa
use '<=' when merging UnchunkableChanges
...
Prevents current tests from failing when testing locally, due the current
second not changing between syncs.
2021-01-12 18:47:08 +10:00
Henrik Giesel
1e74e79a1f
Coerce resched:days as well
2021-01-11 17:25:42 +01:00
Henrik Giesel
00acdd3bf7
Satisfy rslib unit tests
2021-01-11 17:18:40 +01:00
Henrik Giesel
fc52046808
Remove EaseKind impl in favor of transforming to sql in function
2021-01-11 17:10:17 +01:00
Henrik Giesel
fe15df1c4f
Introduce "resched:n" instead of 0 and a flag for "rated"
2021-01-11 16:40:30 +01:00
Henrik Giesel
08e6f5982e
Modify default behavior of rated searches to exclude manual
2021-01-11 16:40:30 +01:00
Damien Elmes
43e05aff6c
update Rust deps; add async_trait
2021-01-11 19:19:45 +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
5b1bf8a10e
Fix formatting
2021-01-10 16:38:20 +01:00
Henrik Giesel
40ab80f70e
Add a few rslib unit tests
2021-01-10 16:29:10 +01:00
Henrik Giesel
027677ac6d
Remove coercion in write_rated
2021-01-10 16:23:53 +01:00
Henrik Giesel
d7513fd33d
Coerce added/edited:0 to 1, constrain rated:n to 1 <= 365
2021-01-10 16:16:17 +01:00
Damien Elmes
eda1fb49fd
favour readability over brevity in filter conversion
2021-01-10 09:19:33 +10:00
Damien Elmes
cbd4439f30
Merge pull request #913 from RumovZ/fix-write-template
...
Fix ordinal case in write_template
2021-01-10 08:58:00 +10:00
Damien Elmes
6fecea257b
Merge pull request #911 from RumovZ/backend-filters
...
Backend filters
2021-01-10 08:56:57 +10:00
Damien Elmes
9d95e11505
fix protobuf formatting adding carriage returns on Windows
2021-01-10 08:48:20 +10:00
RumovZ
8798d84cfd
Format backend.proto
2021-01-09 20:09:47 +01:00
RumovZ
0bf7ad0951
Merge branch 'master' into backend-filters
...
Adapt new formatting.
2021-01-09 19:03:43 +01:00
RumovZ
4911757177
Fix ordinal case in write_template
...
Internal card ordinals start at 0, so add 1 again when writing a
template search string from a parsed ordinal.
2021-01-09 17:30:12 +01:00
abdo
12c09d7f80
Remove unused backend methods & formatting
2021-01-09 17:48:34 +03:00
abdo
26d595b428
Fix tag collapse state not getting updated
2021-01-09 17:46:52 +03:00
abdo
68dfbed55f
sql formatting
2021-01-09 17:38:16 +03:00
abdo
a17d309ed3
Move tag collapse method to the backend
2021-01-09 17:10:16 +03:00
abdo
931fa31178
Move sql code for upgrading to schema 17 to a separate file
2021-01-09 17:10:16 +03:00
abdo
6c9a94851c
fill_missing_tags's input should be sorted
...
I assumed that fill_missing_tags will work correctly with un unsorted
tag list previously so I replaced the all_tags_sorted call, but take the following the list for example:
["foo::bar", "foo"]
This will cause "foo" to be counted like a missing tag, since it's
encountered the first time when looking at "foo::bar"", and its config
and other associated data will be lost.
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
RumovZ
455b693623
Provide filter searches through backend
2021-01-09 10:50:08 +01:00
Damien Elmes
e9dee35885
add clang-format for backend.proto formatting
2021-01-09 17:08:50 +10:00
Damien Elmes
4fe0401d43
format backend.proto with standard Google style
2021-01-09 15:50:24 +10:00
Damien Elmes
ca8b18c5f2
fix some comments in wrong position after format
2021-01-09 14:26:51 +10:00
Damien Elmes
b43515ceff
add .sql file formatter
...
Uses the logic from the sqltools VSCode add-on, with a workaround
for the use of 'type' in some table columns.
By detecting the presence of 'BUILD_WORKSPACE_DIRECTORY' we can tell
if the rule is running in test mode or was run directly, avoiding the
need for separate check and fix rules. It might be nice to extend this
to other formatting rules in the future as well.
2021-01-09 14:22:49 +10:00
Damien Elmes
a055663046
reformat .sql files
2021-01-09 14:08:55 +10:00
Henrik Giesel
e9e8adec9b
Don't import now unused INITIAL_EASE_FACTOR_THOUSANDS
2021-01-08 19:32:36 +01:00
Henrik Giesel
27dfb57ce7
Reset ease to 0 for after rescheduling cards as new
2021-01-08 18:15:24 +01:00
Damien Elmes
61583aae03
fix reposition not honoring provided order, and add unit test
2021-01-08 20:38:49 +10:00
Damien Elmes
4b9e5f425b
Merge pull request #904 from hgiesel/propdue
...
Streamlining `is:due`, `prop:due`, and the FutureDue graph
2021-01-08 16:34:53 +10:00
Damien Elmes
ba665b0e02
handle SortOrderProto conversion separately, and use enum getter
...
In most cases we can just fall back on the default enum value instead
of caring if it's missing/invalid.
2021-01-08 15:56:20 +10:00
Damien Elmes
f20a8f71b7
convert sort_kind_from_pb into from impl
2021-01-08 09:42:54 +10:00
Damien Elmes
336cb3595b
convert from protobuf enum, rather than the underlying i32
2021-01-08 09:24:03 +10:00
Henrik Giesel
66da8549cd
Add comment about integer division
2021-01-07 20:10:25 +01:00
Henrik Giesel
6f9adbe8fd
Restate rslib unit test
2021-01-07 19:56:36 +01:00
Henrik Giesel
8fcf88e606
Search for Learn and PreviewRepeat cards when using prop:due
2021-01-07 19:01:10 +01:00
Henrik Giesel
0d02b1f2f0
Include PreviewRepeat cards in is:due
2021-01-07 17:24:10 +01:00
RumovZ
991a3c1596
Add native enum for concatenate_search's separator
2021-01-07 12:50:57 +01:00
RumovZ
b8f7bb8807
Add Position in PropertyKind match of writer.rs
2021-01-06 23:29:09 +01:00
RumovZ
ac4d254793
Merge branch 'master' of https://github.com/ankitects/anki into norm-search
2021-01-06 20:57:24 +01:00
RumovZ
0b1eec9cd8
Add tests for writer.rs
...
Also minor adjustments to concatenate_searches.
2021-01-06 19:39:34 +01:00
RumovZ
f061ccfb02
Implement search replacing via Ctrl+Shift combo
...
Also switch to using the new backend functions for concatenating and
negating searches.
2021-01-06 18:32:29 +01:00
RumovZ
1c257047b6
Implement replace_search_term
2021-01-06 14:03:43 +01:00
RumovZ
5a9e905b22
Implement concatenate_searches
...
Fix minor stuff in writer.rs.
2021-01-06 14:00:47 +01:00
RumovZ
576ffc2b0a
Implement negate_search
2021-01-06 13:57:35 +01:00
Damien Elmes
e62201c621
Merge pull request #895 from hgiesel/newlearn
...
Change meaning of "is:learn" to filter on type, not queue
2021-01-06 19:13:59 +10:00
Henrik Giesel
453dad18fe
Change meaning of "is:learn" to filter on type, not queue
2021-01-05 17:36:55 +01:00
Damien Elmes
ceca13516b
no need to log card resets when exporting
2021-01-05 11:11:37 +10:00
abdo
85a1c732db
Rename prop:order to prop:pos
2021-01-02 13:35:10 +03:00
abdo
ab8736b37f
Support prop:order to search for new cards by order
2021-01-01 04:36:51 +03:00
Damien Elmes
4b70dc287e
Merge pull request #879 from Arthur-Milchior/Tex_keep_alt
...
Add Alt text to latex image
2020-12-31 12:02:40 +10:00
Damien Elmes
5a87175127
fix clippy error in unit test
2020-12-31 09:48:05 +10:00
Arthur Milchior
f19592b27f
Add Alt text to latex image
...
I'm trying to go over accessibilities issues in AnkiDroid. Since we'll use rust backend, I thought I might as well go
over it in rust directly. The only side effect in anki is that, if you copy a text with the image, you'll get the LaTeX
copied instead of nothing. Alas, it seems qt does not show alt text.
2020-12-30 18:00:06 +01:00
Damien Elmes
26c13f6dba
add aarch64 Linux to cargo; update deps
2020-12-30 13:33:16 +10:00
RumovZ
6ad500db55
Make function names more explicit and add docs
2020-12-29 11:18:49 +01:00
RumovZ
6a2f1fc6aa
Make normalized search syntax more explicit
...
Also fix a bug with NoCombining and WordBoundary searches.
2020-12-29 11:06:53 +01:00
Arthur Milchior
98276f1e71
NF: test # / and ^ can remains at end of string
2020-12-28 07:58:15 +01:00
Damien Elmes
e2be0c2cbd
simplify NoteField init in test; add other bad chars
2020-12-28 13:19:37 +10:00
Damien Elmes
e14198fad7
fix comment and add basic unit test
2020-12-28 13:14:49 +10:00
Damien Elmes
ed32a66a6b
Merge pull request #870 from Arthur-Milchior/trim_start_field_name
...
Trim the start of field name if it is #, /, ^ or a whitespace
2020-12-28 13:06:57 +10:00
Arthur Milchior
98d0136921
Trim the start of field name if it is #, /, ^ or a whitespace
...
I actually need to trim whitespace again to deal with a field name of the form "# foo"
2020-12-28 03:32:05 +01:00
Damien Elmes
2074bb03b6
update prost to new 0.7 release+auto stage changes
...
Allows us to drop slow git repo.
2020-12-28 10:12:35 +10:00
RumovZ
54964c5fa6
Don't escape isolated -
2020-12-22 11:52:17 +01:00
RumovZ
08c77107a0
Fix format and tests
2020-12-22 11:32:53 +01:00
RumovZ
b7d49d26d2
Expose search writer
2020-12-22 11:06:55 +01:00
RumovZ
37c4ac6524
Add search writer
2020-12-22 11:04:38 +01:00
Damien Elmes
8ebd2073a8
fix sync indicator turning blue after startup sync
...
https://forums.ankiweb.net/t/why-is-my-sync-button-blue/2078/26?u=dae
2020-12-22 10:46:50 +10:00
Damien Elmes
004078e59e
don't pass BUILDINFO into build script
...
It was causing the build script to be recompiled each time a commit was
made, even though buildinfo.txt was not changing.
2020-12-21 16:04:29 +10:00
Damien Elmes
2f4ebe11e5
add some code editing/completion docs
2020-12-16 14:16:08 +10:00
Damien Elmes
94ff0f53b1
fix reposition not being applied in browser sort order
...
https://forums.ankiweb.net/t/reposition-function-not-working/5817
Also changed id->cid in the non-sorting case, as otherwise when
using all_searched_cards() on a sorted list, the results will be wrong.
2020-12-16 10:58:46 +10:00
Damien Elmes
7ebedb26c9
Merge pull request #848 from cecini/rslibdep
...
Update Rust deps, and nom to v6
2020-12-15 20:04:02 +10:00
cecini
77a94c8a45
Update rslib dep nom
2020-12-15 08:19:52 +00:00
abdo
45d07275e5
Fix duplicate check not decoding entities
...
This is a regression introduced in 35bfd20240
See https://forums.ankiweb.net/t/bug-duplicates-not-detecting-on-paste/5753
2020-12-14 15:13:00 +03:00
Damien Elmes
3973266596
plural rules and decimal separator should use bundle's language
...
Instead of providing the list of languages in preferred order, when
creating a bundle we need to specify the bundle language as the first
language, so that the correct plural rules are used. Fluent's docs
are misleading here; I will submit a PR to fix them.
The old behaviour caused:
https://forums.ankiweb.net/t/bug-in-review-intervals-for-some-languages-in-number-of-cards/5744
2020-12-14 14:23:49 +10:00
Damien Elmes
f7b87bb716
minor doc updates
2020-12-11 22:37:12 +10:00
Damien Elmes
ae742417a1
fix filtered decks not honoring sort order
...
https://forums.ankiweb.net/t/2-1-36-filtered-decks-bug/5649/
2020-12-09 22:50:49 +10:00
Damien Elmes
15f697aa30
bump rust deps
2020-12-09 15:34:43 +10:00
Damien Elmes
46bd8fb341
update rules_rust for separate compile_data arg
2020-12-01 16:48:45 +10:00
Damien Elmes
1315d8b3c1
update Rust deps incl. Pyo3
...
This includes the refcount bug fix from pyo3 0.12.4
2020-12-01 16:48:45 +10:00
Damien Elmes
3d0b4b4446
deck renaming tweaks
...
- normalize name prior to creating parents
- always mark modified
https://github.com/ankitects/anki/pull/831#issuecomment-730064858
2020-11-30 10:09:23 +10:00
Damien Elmes
00f827f976
fix duplicate search not checking first field
...
Thanks to abdo for the initial solution. Closes #838
2020-11-30 09:27:10 +10:00
RumovZ
6c3c617b64
Comment fix
2020-11-27 22:12:36 +01:00
RumovZ
59bbbd53b8
Revert implementation of r: prefix
2020-11-27 22:10:37 +01:00
Damien Elmes
775dae874d
fix new Clippy lints
2020-11-25 09:12:19 +10:00
Damien Elmes
29b3ee13e8
fix clippy lints
2020-11-24 20:13:05 +10:00
Damien Elmes
dc810c7339
manual tag on rslib was preventing clippy lints
2020-11-24 20:10:16 +10:00
Damien Elmes
4c7c78a2f1
fix compilation of rslib outside Bazel
...
fixes code completion
2020-11-24 18:51:19 +10:00
Damien Elmes
2f9ddadf2c
switch to workspace for Rust code
2020-11-24 18:41:03 +10:00
RumovZ
2cf97dc554
Add tests for conversion functions in text.rs
2020-11-20 09:45:53 +01:00
RumovZ
ab2cf9f457
Replace text.rs/text_to_re with text.rs/to_re
2020-11-20 09:23:25 +01:00
Damien Elmes
4043bd90bb
Merge pull request #823 from RumovZ/rework-search-parser
...
Rework search parser
2020-11-20 16:22:12 +10:00
Damien Elmes
717969862b
mark created deck parents as modified
...
Thanks to cecini for the original report. Closes #831 :
https://github.com/ankitects/anki/pull/831
2020-11-19 08:48:43 +10:00
RumovZ
a6fe08f662
Revert changes to normalisation handling
...
Handle norm calls individually in write_search_node_to_sql again.
2020-11-18 23:46:27 +01:00
RumovZ
6290e09b89
Implement the prefix r: to search for raw input
2020-11-18 22:26:51 +01:00
RumovZ
f05e70a03e
Merge branch 'master' into rework-search-parser
...
Conflicts:
rslib/src/search/sqlwriter.rs
2020-11-18 09:04:04 +01:00
Damien Elmes
2f1d5cd38b
move ftl into top level ftl/ folder; make it source of truth for aqt
...
This avoids the need to modify the external repo before new strings
can be used in aqt.
2020-11-18 16:20:58 +10:00
Damien Elmes
d1a23fd65a
fix browser updateTitle()
2020-11-18 13:40:21 +10:00
Damien Elmes
7e655614b2
fix remaining _() references; remove unused imports
2020-11-18 12:43:46 +10:00
RumovZ
add3fea6c3
Make - escapable
...
Treat unescaped - as before but make it escapable with \ to distinguish
the literal from the negator.
2020-11-17 18:38:27 +01:00
RumovZ
96845421d8
Fix RE in to_custom_re of text.rs
...
Match every single (potentially escaped) character of the string, so
they can be escaped properly.
2020-11-17 15:39:54 +01:00
Damien Elmes
dac8daf113
begin plural string migration
2020-11-17 23:29:08 +10:00
RumovZ
64bf14f1e9
Split unescaping between parser and writer
...
* Unescape wildcards in writer instead of parser.
* Move text conversion functions to text.rs.
* Implicitly norm when converting text.
* Revert to using collection when comparing tags but add escape support.
2020-11-17 12:49:37 +01:00
Damien Elmes
1781e83252
merge pylib references
2020-11-17 19:23:06 +10:00
Damien Elmes
066b1498ae
merge bulk of qt/ - designer files still to do
2020-11-17 17:42:43 +10:00
abdo
35bfd20240
Make dupe search operate on non-stripped text
...
See https://github.com/ankitects/anki/pull/822/
2020-11-16 04:01:04 +03:00
RumovZ
c4bea9e3c0
Use enforced re to parse deck
...
Fix write_deck not recognising escaped deck name separators:
\:\: -> ::
2020-11-15 21:32:36 +01:00
RumovZ
065d9e939b
Annotate RegEx for invalid-escape check
2020-11-15 14:22:16 +01:00
RumovZ
e1ddc3d63a
Extend tests for new search parsing
...
(Also fix indentation)
2020-11-15 12:00:20 +01:00
RumovZ
6d4d1369d4
Fix escape check for escaped backslash
2020-11-15 11:57:11 +01:00
RumovZ
2e54817870
Move whitespace check for tags from to sqlwriter
...
Instead of not parsing a tag containing whitespace, check for spaces
when writing sql and if there are any, explicitly match nothing.
2020-11-15 11:54:21 +01:00
RumovZ
022efd5956
Always use regex for tag search
...
Don't distinguish between the glob and no-glob cases when comparing
tags but always use regexp. Thus, avoid problems with SQL wildcards in
registered tags.
2020-11-15 09:52:00 +01:00
Damien Elmes
fd4c1edc7f
add native-tls in preparation for Linux-only ring
2020-11-15 14:02:53 +10:00
RumovZ
d65b1f96f7
Fix tests for new search parsing (and reformat)
2020-11-14 19:13:09 +01:00
RumovZ
59f0010783
Fix whitespace in write_tag and parser/whitespac0
2020-11-14 19:10:56 +01:00
RumovZ
baf3dd9dde
For deck searches, unescape quotes only
...
For now, revert to the old handling of deck names using text_to_re from
text.rs and have parser.rs only unescape quotes.
2020-11-14 19:06:37 +01:00
RumovZ
c27175238c
Fix 'escaped' parser for empty string
...
Fix a bug where 'escaped' parsers (nom) accepted the empty
string by wrapping them in 'verify' parsers.
2020-11-14 18:28:24 +01:00
RumovZ
e09486d088
Fix bugs and inconsistencies in the search parser
2020-11-12 17:27:50 +01:00
Damien Elmes
a4af59fc4d
format_fix -> format; rename svelte-check for consistency
2020-11-12 20:19:32 +10:00
Damien Elmes
f83f0f08e2
drop El Capitan support
2020-11-12 20:03:41 +10:00
Damien Elmes
5ab4cbfd63
prep for i18n updates
...
Update scripts will be split into separate repo
2020-11-11 16:18:28 +10:00
Damien Elmes
8147c9996a
Merge pull request #793 from nwwt/object-audio-tags-support
...
Audio & object tag support
2020-11-11 10:33:31 +10:00
Andreas Reis
81d6d21ae3
cleanup / renames
...
・ soundRegexps → sound_regexps
・ htmlRegexps → html_media_regexps
・ HTML_TAGS → HTML_MEDIA_TAGS
・ escapeImages → escape_media_filenames + alias
・ strip_html_preserving_image_filenames → strip_html_preserving_media_filenames
2020-11-10 14:53:04 +01:00
Damien Elmes
434fdae4f0
Merge pull request #805 from cecini/duecounts
...
align rslib get_subnode impl with anki pythonapi find_deck_in_tree
2020-11-06 10:57:49 +10:00
Damien Elmes
aaa950f66c
handle notes with invalid utf8
2020-11-06 10:21:51 +10:00
Damien Elmes
e049062147
fix missing buildinfo on Windows
2020-11-05 11:21:27 +10:00
Damien Elmes
f738053c35
fixes for consuming rust lib from external repo
2020-11-04 19:20:49 +10:00
Damien Elmes
f24d80bac5
update to latest fluent libs, and integrate maximum digit handling
...
We now limit number of digits in our formatter, instead of relying
on an upstream patch.
2020-11-03 14:10:45 +10:00
Damien Elmes
a001029961
add shallow_since to a bunch of git deps
2020-11-03 11:42:11 +10:00
Damien Elmes
6cde50e475
ues native roots with rustls
2020-11-03 10:42:20 +10:00
Damien Elmes
c6e6c8a54d
update env_logger, and minor dep updates
2020-11-03 09:04:57 +10:00
Damien Elmes
c62e2e1e58
reqwest was missing default-features = false
...
Still needed until we fix OpenSSL compilation on Linux
2020-11-02 21:53:24 +10:00
Damien Elmes
f620bfc3bf
update rusqlite and pin-project
...
Thanks to Alan for the heads up
2020-11-02 18:26:19 +10:00
Damien Elmes
db0e0e78f8
update cargo deps; add script to copy them from rslib/
2020-11-02 18:17:26 +10:00
Damien Elmes
7c27c4b9a0
move backend.proto into rslib/
2020-11-02 16:28:31 +10:00
Damien Elmes
3632c22feb
clippy lint
2020-11-01 16:19:08 +10:00
Damien Elmes
cfbbb69648
trailing newline .ftl check can happen at build time
...
Removes the need to build ripgrep for CI
2020-11-01 14:59:45 +10:00
Damien Elmes
f9171eb3d3
remove old makefiles
2020-11-01 14:41:01 +10:00
Damien Elmes
ce3b08ac58
initial Bazel conversion
...
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:
- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00
cecini
e12c09bd11
align rslib get_subnode impl with anki pythonapi find_deck_in_tree, fix nestdeck due counts issue
2020-10-29 23:53:26 +08:00
Andreas Reis
c77ac81e9d
Add audio & object tags to media check
...
Makes the media check recognize files in <audio> and <object> tags as used.
They've been observed/supported by the WebView (checked: Anki, AnkiDroid) since just about forever already and are extremely useful if one knows a thing about web dev.
2020-10-25 13:09:57 +01:00
abdo
29d17bf608
Ensure non-empty names
...
https://github.com/ankitects/anki/pull/801/
2020-10-22 16:11:06 +03:00
abdo
69da22a2b9
Strip double quotes from names
...
Strip double quotes from all kinds of names
https://github.com/ankitects/anki/pull/798
2020-10-21 21:48:49 +03:00
Damien Elmes
791894d2d0
fix new clippy lints
2020-10-09 21:35:53 +10:00
Damien Elmes
d3de0bbaff
reindex when checking database
...
Came across a user with a corrupt index:
sqlite> pragma integrity_check;
integrity_check = wrong # of entries in index ix_revlog_cid
integrity_check = wrong # of entries in index ix_cards_sched
This is not picked up by a quick check, and a vacuum does not
fix it, but a reindex does.
AnkiWeb currently performs a full check when a file is uploaded
to it, so this was leading to "corrupt" to show up when syncing
the collection, with a local DB check not reporting/fixing the issue.
2020-10-05 17:40:43 +10:00
Damien Elmes
2ed1507162
bump version
2020-10-02 10:22:21 +10:00
Damien Elmes
61bbe6a604
fix * handling in unqualifed text as well
...
https://forums.ankiweb.net/t/anki-2-1-desktop-searching-with-only-when-limited-to-a-field/3789/4
2020-09-29 21:18:19 +10:00
Damien Elmes
2e7c71b415
fix escaping of * in field search
...
mentioned in
https://github.com/ankitects/anki/pull/769
2020-09-27 16:04:08 +10:00
Damien Elmes
1a619073d7
bump version
2020-09-24 10:52:24 +10:00
Damien Elmes
b39612eb33
rename downgrade method for clarity
2020-09-22 15:53:26 +10:00
Damien Elmes
ea7b8c5e49
update schema to fix default initial ease in deck configs
...
Closes #766
- changes the on-disk representation from % to a multiplier,
eg 250 -> 2.5, as this is consistent with the other options
- resets deck configs at or below 1.3 to 2.5
- for any cards that were using a reset deck config, reset their
current factor if it's at or below 2.0x. The cutoff is arbitrary,
and just intended to make sure we catch cards the user has rated
Easy on multiple times. The existing due dates are left alone.
2020-09-22 08:16:39 +10:00
Damien Elmes
4d66bafc51
stop is:due gathering learning cards that are not due yet
...
https://forums.ankiweb.net/t/how-to-avoid-rebuilding-filtered-decks-to-skip-learning-cards-steps/3551/
2020-09-21 11:41:54 +10:00
Damien Elmes
2a5ebad11f
fix incorrect SQL in previous change
2020-09-19 12:27:00 +10:00
Damien Elmes
35470fdcf3
congrats_info() failed if learning card had negative due
...
https://forums.ankiweb.net/t/integralvalueoutofrange-for-filtered-deck/3353
2020-09-18 20:14:35 +10:00
Damien Elmes
717ea6db3d
sched_timing_today() needs a default rollover hour
...
When unset it was reverting to the V1 code.
https://forums.ankiweb.net/t/daily-counts-are-reset-on-sync/3441/16
2020-09-18 19:13:47 +10:00
Damien Elmes
779a8930e7
check original due in card stats
...
https://forums.ankiweb.net/t/how-come-some-of-my-cards-are-showing-retrospective-due-dates/3434/6
2020-09-17 14:36:18 +10:00
Aleksa Sarai
21769bfa68
rust: switch to stable compilers
...
The only dependency which required nightly compilers was pyo3, which
supports stable Rust (1.39.0 and later) since version 0.11.0. Supporting
stable Rust makes it easier to package Anki for distributions. No other
code changes were required.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2020-09-05 19:39:51 +10:00
Aleksa Sarai
da040372da
rslib: disable bzip2 feature
...
We can't link against libzip2.so.1 when building manylinux wheels, but
the only dependency which required this was "zip" and we don't appear to
make use of bzip2 in Anki.
This fixes the following "make build" error on Linux:
x maturin failed
Caused by: Failed to ensure manylinux compliance
Caused by: Your library is not manylinux compliant because it links the following forbidden libraries: ["libbz2.so.1"]
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2020-09-05 19:39:11 +10:00
Aleksa Sarai
96da137314
rs: remove most &mut references in BackendService
...
The previous implementation had some slightly questionable memory safety
properties (older versions of PyO3 didn't uphold the Rust aliasing rules
and would thus create multiple &mut references to #[pyclass] objects).
This explains why Backend has internal Mutex<T>s even though all of its
methods took &mut self.
The solution is to simply make all methods take &self, which luckily
doesn't pose too make issues -- most of the code inside Backend already
has sufficient locking. The only two things which needed to be
explicitly handled where:
1. "self.runtime" which was fairly easy to handle. All usages of
the Runtime only require an immutable reference to create a new
Handle, so we could switch to OnceCell which provides
lazy-initialisation semantics without needing a more heavy-handed
Mutex<tokio::runtime::Handle>.
2. "self.sync_abort" was simply wrapped in a Mutex<>, though some of the
odd semantics of sync_abort (not being able to handle multiple
processes synchronising at the same time) become pretty obvious with
this change (for now we just log a warning in that case). In
addition, switch to an RAII-style guard to make sure we don't forget
to clear the abort_handle.
As a result, we now no longer break Rust's aliasing rules and we can
build with newer versions of PyO3 which have runtime checks for these
things (and build on stable Rust).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2020-09-05 19:37:59 +10:00
Aleksa Sarai
1f95cb3139
rslib: auto-format protobuf code
...
prost-build doesn't generate rustfmt-safe code, so we had to add it to
the ignore list for rustfmt on "make check". However, the ignore list
isn't supported by stable rustfmt, so we have to work around this some
other way -- in this case, just do "rustfmt" on the generated file in
"build.rs" (this way, formatting errors in checked-in source code are
still caught but generated code doesn't cause spurrious errors).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2020-09-04 16:30:06 +10:00
Damien Elmes
cce0ee2b03
handle quoted html chars in media check
...
https://forums.ankiweb.net/t/unable-to-play-longer-audio-on-cards/1313/30
2020-09-04 09:36:38 +10:00
Damien Elmes
f32d773e25
set_deck()
2020-09-03 17:42:46 +10:00
Damien Elmes
f7d4bf8489
support did:[deck id] search
2020-09-03 16:43:22 +10:00
Damien Elmes
32759a55e4
log 0 day interval as 1 day
...
Allows distinguishing it from resetting to new, and is treated as
a one day delay when answering anyway.
2020-09-03 16:00:06 +10:00
Damien Elmes
7c169daa95
move card sorting and resetting to backend
2020-09-03 15:54:15 +10:00
Damien Elmes
72142d51c4
set local offset when saving preferences
2020-09-03 12:43:18 +10:00
Damien Elmes
366c5c4774
log manual reschedule, but ignore the log entry in the stats
2020-09-02 17:56:23 +10:00
Damien Elmes
31b7d7d645
move reschedCards() to backend
2020-09-02 17:56:23 +10:00
Damien Elmes
396081d329
move filtered deck empty/fill to backend
...
emptying of individual card ids still to be done
2020-09-02 17:56:23 +10:00
Damien Elmes
7f42500e53
rename some card+note fields in backend
2020-09-01 10:24:38 +10:00
Damien Elmes
9f51347e1e
move bury/suspend into backend
2020-09-01 10:24:38 +10:00
Damien Elmes
988b3c00c1
move unbury/unsuspend routines into backend
2020-09-01 10:24:38 +10:00
Damien Elmes
4894025cfc
add separate sched/user bury searches, and fix bury enums
2020-09-01 10:24:38 +10:00
Damien Elmes
2a6206be91
handle null return from sum() in other columns
2020-09-01 10:24:38 +10:00
Damien Elmes
999b659c3a
reimplement congrats screen in Rust+Typescript
2020-09-01 10:24:38 +10:00
Damien Elmes
f3c6d565b0
bump version
2020-08-31 11:07:54 +10:00
Damien Elmes
55ae49e251
fix nonbreaking spaces breaking media
...
https://forums.ankiweb.net/t/unable-to-play-longer-audio-on-cards/1313
2020-08-30 11:23:12 +10:00
Soren Bjornstad
0614642052
fix unanchored regex in bulk tag add routine
...
Previously, it was not possible to add a substring of an existing tag.
For example, with the tag "foobar", you could not add the tag "foo",
"bar" or "oob".
Because the match was unanchored, the regex checking whether the tag
already existed determined that the tag was present when it was not.
2020-08-28 16:21:23 -05:00
Damien Elmes
7cfeb6cbb3
check if we need to unbury at the start of the sync process
...
https://forums.ankiweb.net/t/bug-buried-cards-in-filtered-decks-not-being-unburied-next-day/2541/24
2020-08-28 21:09:07 +10:00
Damien Elmes
b9f6bde2dc
catch leading/trailing boolean operators
...
https://forums.ankiweb.net/t/is-it-only-me-anki-giving-corrupt-collection-error/2424/20
2020-08-27 09:59:29 +10:00
Damien Elmes
41a47fcf01
fix some clippy lints
2020-08-26 19:02:56 +10:00
Damien Elmes
ed1af61fa6
use commit hash in reqwests dependency
2020-08-26 18:50:25 +10:00
Damien Elmes
fb4105013f
add escape hatch for very slow connections
2020-08-26 18:44:20 +10:00
Damien Elmes
8c7c2eeda3
specify I/O timeout
...
We need to be a bit conservative here due to buffer bloat - in the
upload case on a slow link, it can appear that no I/O is happening
when a buffer is draining.
2020-08-26 18:30:51 +10:00
Damien Elmes
2e923b0990
vendor reqwest for now, to support read/write timeouts
...
https://github.com/seanmonstar/reqwest/issues/870
adding back now that fix has been applied to a fork of tokio-io-timeout
2020-08-26 13:24:51 +10:00
Damien Elmes
2f6d816cdc
bump version
2020-08-26 08:05:45 +10:00
Damien Elmes
a6f5d48cca
Revert "vendor reqwest for now, to support read/write timeouts"
...
This reverts commit b3edeaac86 .
The separate read and write timeouts were causing syncs to fail - a
long full upload would time out due to no read activity for example.
Reverting until a better fix can be put in place.
2020-08-25 13:28:54 +10:00
Damien Elmes
58c8609332
bump version
2020-08-24 11:28:22 +10:00
Damien Elmes
3b8c7f22d2
don't crash when upgrading collection with ntid of 0
2020-08-23 14:14:44 +10:00
Damien Elmes
8c558e4e5d
normalize field before checking duplicates
...
https://forums.ankiweb.net/t/unicode-normalisation/2531
2020-08-23 12:09:55 +10:00
Damien Elmes
e281d8947d
ensure we don't crash on a zero field notetype
2020-08-23 12:09:36 +10:00
Damien Elmes
db92548987
fix empty cards not ignoring <br>
...
https://forums.ankiweb.net/t/bug-report-empty-cards-are-not-recognized/2555
2020-08-23 11:44:49 +10:00
Damien Elmes
3a2031272b
catch timeout error
2020-08-21 19:03:23 +10:00
Damien Elmes
b3edeaac86
vendor reqwest for now, to support read/write timeouts
...
https://github.com/seanmonstar/reqwest/issues/870
2020-08-21 18:50:00 +10:00
Damien Elmes
3421ddf6e5
average ease + add % to ease ticks
2020-08-21 13:00:16 +10:00
ANH
233e6abc55
add custom-study-must-rename-deck to Fluent
2020-08-19 18:27:14 +03:00
Damien Elmes
26e69d5070
ensure tag replacements fully match
...
https://anki.tenderapp.com/discussions/private/5180-anki-desktop-bug-removing-a-tag-removes-all-substrings
2020-08-19 15:35:20 +10:00
Damien Elmes
cb68958b59
strip nuls from tags as well
...
https://forums.ankiweb.net/t/unable-to-sync-between-macbook-and-my-iphone/2405
2020-08-19 15:34:21 +10:00
Damien Elmes
724005386c
catch attempt to update missing note
...
https://forums.ankiweb.net/t/bug-report-editor-updating-non-existing-card/2117/4?u=dae
2020-08-17 19:44:27 +10:00
Damien Elmes
2e7ecfb1d2
allow setting sort field before add
2020-08-17 19:44:09 +10:00
Damien Elmes
cb821a9e3c
fix globs not working in bulk tag add/remove
2020-08-17 18:14:00 +10:00
Damien Elmes
692164df7c
journal mode was not being set on media db
2020-08-17 12:30:14 +10:00
Damien Elmes
54bb782809
handle <%foo%> inside {{#conditional}}
...
https://forums.ankiweb.net/t/the-latest-version-of-ios-cannot-display-the-template-normally/2142
2020-08-12 19:28:26 +10:00
Damien Elmes
d0d2ba15e2
generate extra templates when recovering notetype
2020-08-10 13:42:37 +10:00
Damien Elmes
a4c8825aeb
show ordinal if card template missing
2020-08-10 13:41:22 +10:00
Damien Elmes
ea2c5c6920
deauth -> log out
2020-08-09 14:44:03 +10:00
Damien Elmes
4629dd38fb
bump version
2020-08-09 13:44:59 +10:00
Damien Elmes
ffd1638400
fix assertion failure when recovering notetype
...
Notes need to have their notetype ID updated to reflect the
newly created notetype.
https://forums.ankiweb.net/t/anki-crashes-on-sync-study-export/1978
2020-08-08 12:26:00 +10:00
Damien Elmes
bdf6e2b87d
handle negative review times in sync
2020-08-07 15:02:03 +10:00
Damien Elmes
60730af9f4
fix negative review times in DB check
2020-08-07 14:37:44 +10:00
Damien Elmes
1436278f2c
clarify 'add mobile class'
2020-08-07 13:24:04 +10:00
Damien Elmes
c03d3f6c7f
add some extra help to the json decode error
2020-08-07 13:13:11 +10:00
Damien Elmes
8fff6092a9
"average over period"
2020-08-05 16:06:24 +10:00
Damien Elmes
a93e180d3d
fix unterminated section
2020-08-04 16:29:22 +10:00
Damien Elmes
55af7e81e9
formatting and new strings in scheduling.ftl
2020-08-04 16:19:49 +10:00
Damien Elmes
f332ff0c80
added graph table
2020-08-04 16:01:11 +10:00
Damien Elmes
a59270f6f0
fix plural
2020-08-04 15:28:49 +10:00
Damien Elmes
56b59b24ab
add textual data to reviews graph
2020-08-04 14:28:46 +10:00
Damien Elmes
bbadbca157
add some extra graph strings
2020-08-04 12:01:31 +10:00
Damien Elmes
176ab312da
handle some instances of floats when an integer is expected during sync
2020-08-03 17:47:15 +10:00
Damien Elmes
99140fb189
fix conditional negation being lost on field rename
...
https://forums.ankiweb.net/t/anki-force-changes-all-to/1694
2020-08-02 10:09:24 +10:00
Damien Elmes
bd37a7e17e
fix moves into/out of a filtered deck not syncing
...
the mtime comparison should have only been done if the object in the
local collection was also pending
2020-07-31 15:39:30 +10:00
Damien Elmes
58d3127d3c
remove 'invert', as night mode is on when checkbox is on
2020-07-31 14:35:18 +10:00
Damien Elmes
b93b44a009
title case
2020-07-31 14:24:08 +10:00
Damien Elmes
9c2cb8bc2a
fix button display on Macs
2020-07-31 14:23:56 +10:00
Damien Elmes
b5c72ac201
Merge branch 'master' into master
2020-07-31 14:14:10 +10:00
Damien Elmes
1bb256483c
i18n some card template strings
...
https://forums.ankiweb.net/t/untranslated-strings/1623
2020-07-31 13:33:41 +10:00
Damien Elmes
47d3666ad0
fix hour graph not handling timezones west of UTC
...
https://forums.ankiweb.net/t/statistics-bugs-after-update-2-1-5-to-2-1-29/1620
2020-07-31 13:33:41 +10:00
Damien Elmes
c5f7a3aa21
tweak card template message
...
also shown when importing an invalid file
https://anki.tenderapp.com/discussions/private/4937-importing-decks
2020-07-31 13:33:41 +10:00
ANH
2a5131a5d3
use 'Preview Settings' as a label for the new options button
2020-07-30 18:04:50 +03:00
ANH
393403ffbf
add night mode and mobile class toggles in card layout screen
2020-07-30 15:39:02 +03:00
Damien Elmes
a93145c4c7
handle preview repeat in deck list
2020-07-30 09:11:13 +10:00
Damien Elmes
3da7884e19
reject double comma in id list
...
https://forums.ankiweb.net/t/anki-2-1-29-and-below-2-small-bugs/1496
2020-07-29 13:05:34 +10:00
Damien Elmes
f4bd143050
handle multiple clozes in cloze-only filter
...
https://forums.ankiweb.net/t/built-in-tts-not-reading-multiple-clozes/1516
2020-07-29 12:54:29 +10:00
Damien Elmes
55891fc8f7
clearer message when template error is preventing save
2020-07-29 12:53:03 +10:00
Damien Elmes
d3653ab6d5
bump version
2020-07-28 12:59:56 +10:00
Damien Elmes
3099edf8ee
show card stats in reverse order like older Anki versions
2020-07-28 09:49:27 +10:00
Damien Elmes
8f470ce23d
fix note/card ids being flipped in card stats
2020-07-28 09:49:11 +10:00
Damien Elmes
d460549b8f
ask user to check db when graphs fail to load
2020-07-24 09:56:28 +10:00
Damien Elmes
9ec58c10ec
strip unwanted control characters when writing fields
...
closes #661
2020-07-24 09:18:05 +10:00
Damien Elmes
684f63b78e
clarify comment
2020-07-24 09:01:14 +10:00
Damien Elmes
67845fa401
use short form for time units in graph axis
2020-07-22 12:59:56 +10:00
Damien Elmes
7e78d12b99
bump version
2020-07-21 15:54:14 +10:00
Damien Elmes
61f0c3eec0
add cloze-only filter
...
https://anki.tenderapp.com/discussions/ankidesktop/42383-two-feature-suggestions
2020-07-21 12:59:28 +10:00
Damien Elmes
ce2c553840
i18n some sync errors
2020-07-16 13:55:59 +10:00
Damien Elmes
e471497bd2
add platform version back into sync metadata
2020-07-16 10:12:41 +10:00
Damien Elmes
56833f0ac7
panic fix was merged into hyper 0.13.7
2020-07-16 09:09:13 +10:00
Damien Elmes
22a87a4f3b
vendor coarsetime so we can get the use after free fix
2020-07-13 13:34:37 +10:00
Damien Elmes
bbc75cdf5d
update rslib/rspy deps
2020-07-12 11:38:25 +10:00
Damien Elmes
d35bc85ead
is:review should include relearning cards
...
https://forums.ankiweb.net/t/anki-2-1-28-beta/629/36
This issue appears to have existed since the V2 scheduler was
introduced - the old Python search code was ignoring Relearn as well.
2020-07-09 11:07:50 +10:00
Damien Elmes
c22040f33d
drop 1 month period
2020-07-06 19:16:03 +10:00
Damien Elmes
214ba8ead9
update title
2020-07-06 19:16:03 +10:00
Damien Elmes
097d91d143
add 'no data' overlay when graph empty
2020-07-06 19:16:03 +10:00
Damien Elmes
3a75161778
fix deck tree with a day delta, and support arbitrary timestamps
2020-07-06 19:16:03 +10:00
Damien Elmes
71dbbd9fa8
set schema on collection creation
2020-07-03 11:55:27 +10:00
Damien Elmes
9bb45673a8
show clearer error when media db locked
...
should not happen frequently during a sync, but may happen during
the initial change checking stage
https://forums.ankiweb.net/t/error-when-adding-audio-file/495/2
2020-07-01 11:19:06 +10:00
Damien Elmes
f43aa54ed9
fix media db conflict aborting immediately instead of after 5s
...
https://forums.ankiweb.net/t/error-when-adding-audio-file/495/2
2020-07-01 11:17:33 +10:00
Damien Elmes
8cfafdbc32
supported edited:n
...
https://forums.ankiweb.net/t/feature-request-advanced-broswer-search-by-edited/268
2020-07-01 10:17:57 +10:00
Damien Elmes
33317d41b3
update edited/changed column labels
...
https://github.com/ankitects/anki/pull/674/files
2020-06-29 18:34:03 +10:00
Damien Elmes
06d9f64dea
lint fixes
2020-06-29 15:53:56 +10:00
Damien Elmes
24cf78b68b
group strings by graph
2020-06-29 15:48:01 +10:00
Damien Elmes
275817a558
add remaining tooltip i18n
2020-06-29 15:48:01 +10:00
Damien Elmes
a7ce130941
i18n some tooltips
2020-06-29 15:48:01 +10:00
Damien Elmes
35e706d53a
drop axis labels + add subtitles
...
This leaves more room for the graphs and avoids issues with large values
overlapping the labels. We can improve the subtitle wording to make
things clearer in the future, and the hover tooltips should also
clarify what the axes represent.
2020-06-29 15:48:01 +10:00
Damien Elmes
2994cadcb0
i18n some axis labels, and support vertical CJK text
2020-06-29 15:48:01 +10:00
Damien Elmes
042a9ff68b
i18n graph titles
2020-06-29 15:48:01 +10:00
Damien Elmes
1a16e2306f
i18n ranges
2020-06-29 15:48:01 +10:00
Damien Elmes
693fcfce7d
i18n card counts
2020-06-29 15:48:01 +10:00
Damien Elmes
cebf22d749
i18n today section
2020-06-29 15:48:01 +10:00
Damien Elmes
349eca843b
get i18n working in typescript
2020-06-29 15:48:01 +10:00
Damien Elmes
618fc65282
handle revlog entries with negative review times
2020-06-29 15:48:01 +10:00
Damien Elmes
4be8e7923a
fix partially quoted text not handling escaped quotes
...
https://forums.ankiweb.net/t/how-to-search-for-cards-containing-quotes/500/10
2020-06-29 15:48:01 +10:00
Damien Elmes
fefc6dbdc2
bump rust nightly version
2020-06-29 15:48:01 +10:00
Damien Elmes
0293f2220c
qt's js code now shares ts/node_modules; more graph work
2020-06-29 15:48:01 +10:00
Damien Elmes
4d88b6521d
cards added graph
2020-06-29 15:48:01 +10:00
Damien Elmes
1e9901e9bd
experiment with exposing raw card/revlog data to frontend
2020-06-29 15:48:00 +10:00
Damien Elmes
fd258d15c5
some initial work on updating the graphs
2020-06-29 15:48:00 +10:00
Damien Elmes
df8be64da3
protobuf package should be in PascalCase
2020-06-29 15:48:00 +10:00
Damien Elmes
61efce295e
fix v2 scheduler cutoff being used if previously activated
2020-06-23 12:46:40 +09:00
Damien Elmes
710e5ecce2
formatting fix
2020-06-22 11:58:31 +10:00
Damien Elmes
cec1fdece5
move revlog out of sync code, and add enums
...
and remove type=4, which does not appear to be used
2020-06-16 16:31:36 +10:00
Damien Elmes
f5694a7e4a
migrate card stats to backend
...
Currently this renders the HTML directly like the previous Python
implementation - doing it in JS would probably make more sense in the
future.
2020-06-15 17:22:16 +10:00
Damien Elmes
965fd848d1
on upgrade, mark decks modified that are renamed
2020-06-14 14:48:58 +10:00
Damien Elmes
07874f8328
handle db errors the same way as other backend requests
2020-06-12 20:39:02 +10:00
Damien Elmes
dc8297644b
pass db json back as bytes
2020-06-12 20:20:29 +10:00
Damien Elmes
1773c6eec9
don't exclude the default deck from the normal name list
...
https://forums.ankiweb.net/t/issue-backend-get-deck-names-doesnt-return-default-deck/52
2020-06-11 14:36:00 +10:00
Damien Elmes
4092da9dbe
use vendored hyper for panic fix
2020-06-11 13:30:35 +10:00
Damien Elmes
8f9d2f592e
extra strings for empty cards
2020-06-10 19:29:25 +10:00
Damien Elmes
5bd66d485f
add check database title
2020-06-10 08:44:57 +10:00
Damien Elmes
d5cd9af53b
fix review cards with high intervals not being reset properly
...
would lead to a "fixed .. with invalid card property" message that
didn't go away
2020-06-09 20:11:26 +10:00
Damien Elmes
a11d803030
switch default leech action to tag only
2020-06-09 12:03:47 +10:00
Damien Elmes
6d7be475e6
catch invalid regex in search
...
https://github.com/ankitects/anki/pull/652
2020-06-09 11:46:07 +10:00
Damien Elmes
c6e5dc0ef6
check full upload return text
2020-06-09 08:50:16 +10:00
Damien Elmes
6207b1012f
Revert "use trust-dns in reqwest"
...
This reverts commit f15abb5c58 .
trust-dns has introduced its own issues, such as when resolv.conf is
inaccessible, or contains hostnames with certain characters
2020-06-08 22:03:24 +10:00
Damien Elmes
75471224fa
add progress to db check
2020-06-08 21:07:36 +10:00
Damien Elmes
e74e5c604b
add daily count updating to backend
2020-06-05 19:49:53 +10:00
Damien Elmes
55f8b87548
support generating a due tree for a different date
2020-06-05 09:38:31 +10:00
Damien Elmes
c5e65d02e1
add note/card removal to backend
2020-06-04 18:21:04 +10:00
Damien Elmes
f15abb5c58
use trust-dns in reqwest
...
The default DNS resolution, if interrupted by an Abortable, will
cause a panic:
57ef271500/src/client/connect/dns.rs (L144)
2020-06-03 15:47:54 +10:00
Damien Elmes
cb7d78dde5
"Template" special field should have been called "Card"
2020-06-02 16:47:30 +10:00
Damien Elmes
c8b585b3e4
automatically abort the media sync on full sync
2020-06-02 16:22:53 +10:00
Damien Elmes
7dc8df748b
ensure sync indicator updates after download
2020-06-02 15:10:41 +10:00
Damien Elmes
7536a3b899
fix full download on Windows
2020-06-02 15:06:23 +10:00
Damien Elmes
ca704187c6
skip note update if unchanged
2020-06-02 13:32:36 +10:00
Damien Elmes
d7a2e78c0b
change sync label to indicate sync state
...
- blue for normal sync, red for full sync required
- refactor status fetching code so we don't hold a collection lock
during the network request, which slows things down
- fix sync spinner restarting when returning to deck list
2020-06-02 13:23:01 +10:00
Damien Elmes
42c34b60c0
use a shared async runtime instead of recreating each time
2020-06-02 09:35:27 +10:00
Damien Elmes
a3e5068952
add some syncing tests - please see alpha2 notes before syncing
2020-06-01 19:44:25 +10:00
Damien Elmes
c6712cbf2c
fix \n in buildhash
2020-06-01 19:38:45 +10:00
Damien Elmes
80210ab6bd
handle missing counts in sanity check
2020-06-01 19:38:41 +10:00
Damien Elmes
300769aac7
if both sides empty, allow either
2020-06-01 18:11:43 +10:00
Damien Elmes
2ca3108bee
don't put dyn=False in schema11 dconf's "other"
2020-06-01 18:11:40 +10:00
Damien Elmes
da2dc7bd8c
tell AnkiWeb to abort on interrupt
2020-06-01 13:57:10 +10:00
Damien Elmes
ad3082d1c8
handle aborting normal sync
...
- Use a separate abort handle, as the media sync is running
in the background and we need to be able to target them separately.
The current progress handling is going to need a rethink if we introduce
any other background tasks in the future.
- Roll back the transaction when interrupting.
2020-06-01 13:57:10 +10:00
Damien Elmes
da1e0527ca
report normal sync progress
...
Also:
- provide a way for the progress handler to skip the throttling so that
we can ensure progress is updated at the end of a stage
- show 'checking' at the end of full sync
2020-06-01 13:57:10 +10:00
Damien Elmes
1c52d11133
rework usn handling in sync
2020-06-01 13:57:10 +10:00
Damien Elmes
1303013ad6
add due counts to sanity check
2020-06-01 13:57:10 +10:00
Damien Elmes
0787381a99
login/full up/full down plugged in
2020-06-01 13:57:10 +10:00
Damien Elmes
aaed0464e5
rework progress handling
...
- client now polls status instead of backend pushing it
- supports multiple threads
- update throttling happens in one place
2020-06-01 13:57:10 +10:00
Damien Elmes
c4032c0176
another snapshot of sync work
...
progress handler is going to need to be reworked to function across
threads
2020-06-01 13:57:10 +10:00
Damien Elmes
b5284e8993
make sure we invalidate cache after direct update
2020-06-01 13:57:10 +10:00
Damien Elmes
2114fdf6f5
more syncing work
...
no checks yet
2020-06-01 13:57:10 +10:00
Damien Elmes
4d1e8d678d
full upload/download HTTP code
2020-06-01 13:57:10 +10:00
Damien Elmes
f17dec9f2a
start on HTTP client for syncing
2020-06-01 13:57:10 +10:00
Damien Elmes
91e3256e6a
move dupe check to backend
2020-05-24 19:48:56 +10:00
Damien Elmes
0606bee2c5
fix rebuilding being done unnecessarily
2020-05-24 18:41:25 +10:00
Damien Elmes
e9fea26d1c
use keyword args for calls with more than one argument
2020-05-24 09:12:47 +10:00
Damien Elmes
bbcc566e6d
migrate the remaining methods
2020-05-24 08:36:50 +10:00
Damien Elmes
93f18c14d4
migrate more scheduling/media/etc
...
almost there
2020-05-23 21:34:19 +10:00
Damien Elmes
8b93a0c19d
migrate notetypes, update GIL list
2020-05-23 20:43:55 +10:00
Damien Elmes
35489d5fa7
add some more newtypes to the RPC defs
2020-05-23 16:58:01 +10:00
Damien Elmes
8df2ab65fb
migrate cards and notes
2020-05-23 16:19:48 +10:00
Damien Elmes
32a071cf79
migrate decks and dconf methods
2020-05-23 15:09:16 +10:00
Damien Elmes
927ed25b02
more methods
2020-05-23 14:01:36 +10:00
Damien Elmes
d57ded706f
migrate more methods to service
2020-05-22 22:09:33 +10:00
Damien Elmes
36024ed086
start reworking protobuf handling
...
Will allow us to cut down on boilerplate by automatically generating
code from RPC service definitions
2020-05-22 20:56:15 +10:00
Damien Elmes
3f8a3afb78
fix extending limits in custom study
...
https://anki.tenderapp.com/discussions/beta-testing/1967-2126-189-g7384df8f-crash-at-note-types-fields-save
2020-05-20 14:13:40 +10:00
Damien Elmes
c78e8425aa
automatically omit notes or cards table when possible
2020-05-19 11:27:02 +10:00
Damien Elmes
5e1583df59
fix unit test bug triggered by low resolution win32 timer
...
We don't yet have a remove_note(), so just remove all cards for now.
2020-05-18 19:02:54 +10:00
Damien Elmes
facbe53649
fix cutoff adjustment test in other timezones
2020-05-18 14:08:02 +10:00
Damien Elmes
01ebe964e9
bytes->blob in sql
2020-05-18 13:36:45 +10:00
Damien Elmes
3e156fdb49
bump version
2020-05-18 12:50:20 +10:00
Damien Elmes
4438be2c8d
protobuf tidyups
2020-05-18 09:26:14 +10:00
Damien Elmes
e894125620
use empty buffer if the other map is empty in dconf
2020-05-18 08:12:27 +10:00
Damien Elmes
ef88cb59e6
fix syncing
2020-05-17 20:52:02 +10:00
Damien Elmes
e6379bc4d0
update current note type in backend
2020-05-17 20:01:16 +10:00
Damien Elmes
e230f360e9
ensure notetype name unique on add as well
2020-05-17 19:41:47 +10:00
Damien Elmes
b676522e5c
fix renaming corner cases and decks.update()
...
- .update() should update a single deck and preserve usn by default,
as that's what existing code expects
- decks are automatically renamed when they conflict with an existing
name
2020-05-17 19:07:15 +10:00
Damien Elmes
2c19e171ed
handle deletion of default deck in backend; use + instead of _
2020-05-17 15:22:19 +10:00
Damien Elmes
336349d8d1
update before_upload()
2020-05-17 14:13:21 +10:00
Damien Elmes
a682865169
move deck config to protobuf
2020-05-17 13:28:41 +10:00
Damien Elmes
e85911c4e4
add option to limit deck tree counts to a particular node
2020-05-17 08:38:49 +10:00
Damien Elmes
17efa85d75
update rusqlite
2020-05-16 19:49:08 +10:00
Damien Elmes
e36e23b563
when merging day# in deck, make sure to reset older values
2020-05-16 15:58:25 +10:00
Damien Elmes
2e5f745b85
use the latest day when converting from legacy deck
2020-05-16 14:58:14 +10:00