* Move open_test_collection into Collection test impl
* Fix invalid ids when checking database
* Report fixed invalid ids
* Improve message when trying to export invalid ids
Also move ImportError due to namespace conflicts with snafu macro.
* Take a human name in DeckAdder::new
* Mention timestamps in the db check message (dae)
Will help to correlate the fix with the message shown when importing/
exporting.
* Ensure state mutator runs after card is rendered
* Ensure ease buttons only show when states are ready
* Pass context into states mutator
* Revert queuing of state mutator hook
Now that context data is exposed users shouldn't rely on the question
having been rendered anymore.
* Use callbacks instead of signals and timeout
... to track whether the states mutator ran or failed.
* Make mutator async
* Remove State enum
* Reduce requests and compute seed on backend
* Remove outdated comment.
* Revert removal of independent bury rules
* Revert 'hierarchical bury modes'
It's now again allowed to bury new, but not review cards e.g., but
siblings of previously gathered card queues will not be buried.
* Tweak docs (dae)
* Add missing Learn and PreviewRepeat queues
* Add CardAdder test helper
* Add option to have new cards ignore the review limit
Also entails a lot of refactoring because the old code was deeply
coupled to the previous behaviour.
* Add global option to ignore review limit
* Refactor decrementation
* Unify testing
d20a7d291f introduced a serious regression,
causing cards to be reset to the default ease when upgrading to the latest
schema version. This could also be triggered when exporting a colpkg with
legacy support.
* Implement TTS using windows crate
* Use API calls instead of SSML
* Properly stop player in case of TTS error
* Add context to WindowsErrors
* Validate available voices
* Remove TTS text from synthesize error
* Limit maximum buffer size
* Make validation optional and list it in tts filter
* We no longer need the winrt module (dae)
* Use a separate request object so the meaning of the bool is clear (dae)
* Slightly shorten runtime error message (dae)
The default message appears to clip slightly.
* Alternate buffer implementation (dae)
* Use array instead of vec
* Drop the max buffer size to 128k (dae)
* Add Rust bin to deprecate unused ftl entries
* Align function names with bin names
* Support passing in multiple ftl roots
* Use source instead of jsons for deprecating
* Fix CargoRun not working more than once (dae)
* Add ftl:deprecate (dae)
* Deprecate some strings (dae)
This is not all of the strings that are currently unused
* Check json files before deprecating; add allowlist (dae)
The scheduler messages we'll probably want to reuse for the v2->v3
transition, so I'd prefer to keep them undeprecated for now.
* Deprecate old bury options (dae)
* Support gathering usages from Kotlin files for AnkiDroid (dae)
* Update json scripts (dae)
* Remove old deprecation headers
* Parameterize JSON roots to keep
* Tweak deprecation message (dae)
* Enforce hierarchical bury modes
Interday learning burying is only allowed if review burying is enabled
and review burying is only allowed if new burying is enabled.
Closes#2352.
* Switch front end to new bury modes
* Wording tweaks (dae)
* Hide interday option if using v2 scheduler (dae)
* Allow burying cards in browser
This code is based on existing "toggle suspend" command in browser.
- Adds "toggle bury" command to browser cards menu.
- Adds "browsing-toggle-bury" to core translation. Only english-language.
- Adds "buried" coloring to rows for buried cards in browser table.
Not yet done:
- Keyboard shortcut for "toggle bury" action.
- Non-english translations.
* Add contributor as requested in CONTRIBUTORS.
* Fix formatting in browser_table.rs.
* Add keyboard shortcut to "toggle bury" command.
This adds keyboard shortcut "ctrl-shift-j" to "toggle bury" command in
browser cards menu.
* Simplify logic for color of buried-card rows.
da7d4dd2fc changed the name of the env
var in .cargo/config.toml, causing the check in setup_protoc() to think
a custom path had been provided, which skipped the download and extract
step.
* Support specifying a working dir to a build command
* Use nightly for formatting
* Pass valid TERM in from environment
Rustfmt depends on a valid setting, and not just the var to be non-empty.
* Wrap comment
This PR replaces the existing Python-driven sync server with a new one in Rust.
The new server supports both collection and media syncing, and is compatible
with both the new protocol mentioned below, and older clients. A setting has
been added to the preferences screen to point Anki to a local server, and a
similar setting is likely to come to AnkiMobile soon.
Documentation is available here: <https://docs.ankiweb.net/sync-server.html>
In addition to the new server and refactoring, this PR also makes changes to the
sync protocol. The existing sync protocol places payloads and metadata inside a
multipart POST body, which causes a few headaches:
- Legacy clients build the request in a non-deterministic order, meaning the
entire request needs to be scanned to extract the metadata.
- Reqwest's multipart API directly writes the multipart body, without exposing
the resulting stream to us, making it harder to track the progress of the
transfer. We've been relying on a patched version of reqwest for timeouts,
which is a pain to keep up to date.
To address these issues, the metadata is now sent in a HTTP header, with the
data payload sent directly in the body. Instead of the slower gzip, we now
use zstd. The old timeout handling code has been replaced with a new implementation
that wraps the request and response body streams to track progress, allowing us
to drop the git dependencies for reqwest, hyper-timeout and tokio-io-timeout.
The main other change to the protocol is that one-way syncs no longer need to
downgrade the collection to schema 11 prior to sending.
1. Add outer brackets.
2. Coalesce aggregate, because `null and true` is `null` in SQL land,
so cards that were not introduced, but manually rescheduled in the
period of interest, would not show up in a negated search.