Commit graph

12036 commits

Author SHA1 Message Date
Damien Elmes
7b0289b5d3 Use a (soon-to-be) real version number in example
Closes #4160
2025-07-04 23:53:44 +07:00
GithubAnon0000
08a8b6691c
ADD a Contributor to about.py (#4161)
* ADD a Contributor to CONTRIBUTORS

As requested in https://forums.ankiweb.net/t/anki-contributors-list/63493

* RM contrib from CONTRIBUTORS

* Add contrib to about.py
2025-07-04 23:47:56 +07:00
Kevin Nakamura
fc6447a938
Launcher: Run uv python install before running uv sync (#4162)
* Launcher: Run `uv python install` before running `uv sync`

* Less copy/paste.

* Minor readability improvements

* Make sure we check file presence before attempting to read

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-07-04 23:35:50 +07:00
Damien Elmes
d1793550b0
Revert "Use system font for webviews instead of bootstrap font stack (#4147)" (#4159)
This reverts commit 0b5218706a.
2025-07-04 21:22:30 +07:00
Damien Elmes
cedece5cae Fix glibc version check in Linux installer
I'd changed it for testing, and accidentally committed it.
2025-07-04 17:20:05 +07:00
Damien Elmes
2594dcb2bb Bump version to 25.07
I'd normally do an RC before a stable release, but this is going to
be a "soft release", and with beta updates off by default in the launcher,
jumping straight to a stable release avoids the initial install problems.
2025-07-04 15:49:17 +07:00
Damien Elmes
09495d3a8b Update translations 2025-07-04 15:47:06 +07:00
Luc Mcgrady
f5285f359a
Feat/Add legacy evaluate config bool (#4149)
* Feat/Add legacy evaluate config bool

* Minor tweaks based on PR suggestions (dae)

New enabling command:

from anki.config import Config
mw.col.set_config_bool(Config.Bool.FSRS_LEGACY_EVALUATE, True)
2025-07-04 15:32:09 +07:00
llama
fba1d7b4b0
reuse blank deck created while importing if deck column is empty (#4150) 2025-07-04 14:48:35 +07:00
Luc Mcgrady
4232185735
Feat/Add globe to help tooltip (#4148)
* Add global option to HelpItem

* Fix: Spacing

* add to more sections

* Fix: Spacing again
2025-07-04 14:42:40 +07:00
GithubAnon0000
0b5218706a
Use system font for webviews instead of bootstrap font stack (#4147) 2025-07-04 14:41:58 +07:00
Damien Elmes
bb1b289690 Add some helpers to allow add-ons to install packages into the venv
While something we probably don't want to encourage much of, this
may enable some previously-unshared add-ons.

https://forums.ankiweb.net/t/bundling-numpy-in-an-add-on/62669/5

The 'uv add' command is transaction, so if an add-on tries to inject
incompatible dependencies into the environment, the venv will be
left as-is. And each Anki upgrade/downgrade resets the requirements,
so the requested packages shouldn't cause errors down the line.

Sample add-on:

import subprocess
from aqt import mw
from aqt.operations import QueryOp
from aqt.qt import QAction
from aqt.utils import showInfo

def ensure_spacy(col):
    print("trying to import spacy")
    try:
        import spacy
        print("successful import")
        return
    except Exception as e:
        print("error importing:", e)

    print("attempting add")
    try:
        from aqt.package import add_python_requirements as add
    except Exception as e:
        raise Exception(f"package unavailable, can't install: {e}")
    # be explicit about version, or Anki beta users will get
    # a beta wheel that may break
    (success, output) = add(["spacy==3.8.7", "https://github.com/explosion/spacy-models/releases/download/ko_core_news_sm-3.8.0/ko_core_news_sm-3.8.0-py3-none-any.whl"])
    if not success:
        raise Exception(f"adding failed: {output}")

    print("success")

    # alterantively:
    # from aqt.package import venv_binary
    # subprocess.run([venv_binary("spacy"), "download", "ko_core_news_sm"], check=True)
    # print("model added")

    # large packages will freeze for a while on first import on macOS
    import spacy
    print("spacy import successful")

def activate_spacy():
    def on_success(res):
        mw.progress.single_shot(1000, lambda: showInfo("Spacy installed"))

    QueryOp(parent=mw, op=ensure_spacy, success=on_success).with_progress("Installing spacy...").run_in_background()

action = QAction("Activate Spacy", mw)
action.triggered.connect(activate_spacy)
mw.form.menuTools.addAction(action)
2025-07-04 14:23:04 +07:00
Damien Elmes
e81a7e8b1a Stop enabling betas by default 2025-07-02 12:57:02 +07:00
Damien Elmes
da90705346 Re-expose legacy RMSE calculations
Closes #4143
2025-07-01 18:22:55 +07:00
Damien Elmes
9e1690774c Update svelte/vite/esbuild for CWEs 2025-07-01 18:01:48 +07:00
Damien Elmes
ee5e8c9230 Update to latest node LTS; add update helper 2025-07-01 17:06:27 +07:00
llama
b6c70f7b75
Add search keyword to strip clozes beforehand (#4145)
* add strip_clozes fn

* add test

* replace without_combining with process_text

* update write_unqualified

* update write_regex

* add `sc:...` search option

* add test

* strip clozes before stripping combining characters

find_notes_sc           time:   [1.0398 s 1.0405 s 1.0412 s]
                        change: [-6.1276% -6.0323% -5.9401%] (p = 0.00 < 0.05)
                        Performance has improved.

* add bitflags crate

* add and use ProcessTextFlags

* update sqlwriter.rs to use bitflags
2025-07-01 16:35:21 +07:00
Lukas Sommer
944e453419
Comments for translators (#4137)
* Update deck-config.ftl

* Update ftl/core/deck-config.ftl

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

---------

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
2025-07-01 16:10:34 +07:00
llama
14eb297bbf
add "copy debug info" button to show_exception's dialog (#4146) 2025-07-01 15:35:50 +07:00
Damien Elmes
a07370f565 Add a trademark symbol to the readme and about screens 2025-07-01 11:40:03 +07:00
Damien Elmes
bf36e10519 Hide CMRR
https://forums.ankiweb.net/t/anki-25-06-beta/62271/156
2025-07-01 11:20:28 +07:00
Damien Elmes
b22b3310d6 Revert "Feat/Cmrr target selector (#4116)"
This reverts commit ad0dbb563a.

https://forums.ankiweb.net/t/anki-25-06-beta/62271/156
2025-07-01 11:20:20 +07:00
Matt Brubeck
7720c7de1a
Only run empty_filtered_deck on filtered decks. (#4139)
Fixes #4138.
2025-06-30 16:47:14 +07:00
Damien Elmes
0be87b887e Add category type
Unsure if this helps; the app is not even showing in the screen time
list for me at the moment.

https://forums.ankiweb.net/t/correct-apple-screen-time-category-macos-ios/62962
2025-06-30 14:28:37 +07:00
Damien Elmes
bce3cabf9b Friendlier error when glibc too old, and properly declare min macOS 2025-06-30 14:20:42 +07:00
Damien Elmes
ad34b76fa9 Do anki_release upload last 2025-06-29 22:30:20 +07:00
Damien Elmes
e0727b1bc8 Bump version 2025-06-29 22:17:01 +07:00
Damien Elmes
18cac8bbe5 Update translations 2025-06-29 22:17:01 +07:00
Damien Elmes
045e571edf Support hidden local Claude config 2025-06-29 22:16:59 +07:00
Damien Elmes
469fd763c7 Fix taskbar pinning on Windows
Closes #4107
2025-06-29 20:53:43 +07:00
Damien Elmes
6eb1db0f5d Switch to the windows crate 2025-06-29 16:49:20 +07:00
Damien Elmes
349a696f93 Fix transient console pop-ups on Windows 2025-06-29 16:46:45 +07:00
Damien Elmes
66f34da7ef Fix lint, and ensure Rust checks get re-run on launcher change 2025-06-29 15:54:31 +07:00
Damien Elmes
3d7dc32777 Add a 'revert to previous version' action + more
- Show current version
- Ensure uv builds switch to python 3.13
2025-06-29 15:51:15 +07:00
llama
58dfb9cdd3
fix deck options page being scrollable while simulator modal is open (#4133) 2025-06-29 14:42:52 +07:00
GithubAnon0000
185fdebb63
Followup to #4122 (make text selectable) (#4132) 2025-06-29 14:42:19 +07:00
Luc Mcgrady
0739ea58f8
Add disclaimer to workload tooltip (#4131) 2025-06-29 14:41:35 +07:00
Damien Elmes
5c23ac5a86
Revert "Fix/unapplied scss (#4103)" (#4136)
This reverts commit ae6cf98f40.
2025-06-29 14:40:56 +07:00
Abdo
f94d05bcbe
Switch to Ruff (#4119)
* Add check:ruff build action

* Add fix:ruff action

* Add Ruff config

Mostly generated by Cursor

* Handle rest of lints

* Fix formatting

* Replace black and isort with ruff-format

* Run ruff-format

* Fix lint errors

* Remove pylint disables

* Remove .pylintrc

* Update docs

* Fix check:format not just checking

* Fix isort rule being ignored

* Sort imports

* Ensure ./ninja format also handles import sorting

* Remove unused isort cfg

* Enable unsafe fixes in fix:ruff, and enable unused var warning

* Re-run on config change; enable unnecessary ARG ignores

* Use all pycodestyle errors, and add some more commented-out ones

Latter logged on https://github.com/ankitects/anki/issues/4135
2025-06-29 14:38:35 +07:00
Damien Elmes
b8963b463e Fix Windows CI and minor display tweak 2025-06-29 13:54:17 +07:00
Damien Elmes
bdb3c714dc Put Python install inside uv root as well 2025-06-29 13:42:15 +07:00
Damien Elmes
731e7d5b5c Add uninstall support to launcher 2025-06-29 13:32:06 +07:00
Damien Elmes
f89ab00236 Update to Rust 1.88
We'll need to handle https://github.com/ankitects/anki/issues/4134 before
we get access to let chains.
2025-06-29 11:50:49 +07:00
Damien Elmes
b872852afe Store uv cache inside AnkiProgramFiles, and allow disabling 2025-06-29 11:50:49 +07:00
Damien Elmes
aa8dfe1cf4 Fix icon/menu entries on macOS after update
We need to exec() Python from a GUI context so that the app name and
icon are inherited from our launcher bundle. And we need to munge
sys.argv[0] prior to main window instantiation so that we don't get
app menu entries like "Hide -c". We do that in the launcher instead
of __init__.py so that older versions display correctly too.
2025-06-29 11:50:49 +07:00
Damien Elmes
f5073b402a Inject Upgrade/Downgrade menu item and audio support into older versions 2025-06-29 11:50:49 +07:00
GithubAnon0000
a587343f29
FIX: Margin between icon was selectable but shouldn't be (#4122) 2025-06-28 21:47:29 +03:00
GithubAnon0000
cfeb71724d
CHANGE right-click in the editor to show option to open folder in linux (#4125)
* CHANGE right-click in the editor to show option to open folder in linux

* FIX checks

* Use heuristics

* ./ninja format

* Use fallback from main instead of xdg-open
2025-06-28 21:33:17 +03:00
Damien Elmes
aae970bed9 Bump version 2025-06-27 21:08:56 +07:00
Damien Elmes
63dcfde005 Update translations 2025-06-27 21:08:56 +07:00