Packaged and installable
Tango is on PyPI.
pip install tango-anki
python -m spacy download en_core_web_sm
tango run <video-id> --deck "French"The package is tango-anki because tango on PyPI is an unrelated project.
The command you type is still tango; the two names do not have to match,
and only one of them gets typed more than once.
Until now the only way in was cloning the repository. Card quality,
portability and disk footprint all matter more once someone can run the
thing, and less than nothing before.
Also in this release
tango --version. The first question about any bug report is which build
produced it, and until v0.7.0 there was no installed command to ask.
WSL reaches Anki without being told where it is. ANKI_HOST defaults to
http://localhost:8765, which is right on macOS, native Linux, native
Windows and WSL2 with mirrored networking. On WSL2's default NAT network it
is wrong: Anki runs on the Windows side. The old advice was to find the
gateway with ip route and paste it into .env, which worked until Windows
rebooted and reassigned it.
A refused connection is now retried once against the Windows host read from
the routing table, and the address that answered is kept for the rest of the
run. It is a retry rather than a different default on purpose: defaulting to
the gateway under WSL would break mirrored networking, where localhost is
correct. An explicit ANKI_HOST is never second-guessed.
nltk is an extra. It supplements the synonym and antonym fields and
nothing else, so an install without it is a working install with thinner
synonyms. pip install tango-anki[wordnet] for it.
Eight messages named flags that v0.7.0 deleted. A missing translation
model said python -m pipeline --install-translation, an AnkiConnect error
said --doctor, a stale index said --build-dictionary. None of those
flags exist. Naming the fix was v0.7.0's own goal, and these named a fix that
could only fail. Two of them had tests, which passed throughout because they
asserted the flag spelling rather than the intent.
What the install actually costs
Measured in a clean virtualenv: 334 MB across 58 packages, no torch and
no translation stack. 236 MB of that, 74%, is spacy and the numeric stack it
needs, which is the floor while spacy is the NLP engine.
Cut to v0.8.1
First-run model downloads, a Dockerfile, and an uninstall that removes the
indexes. None stops anyone installing or running the tool, and an unclaimed
distribution name can be taken by anyone.
Upgrading
Nothing to do to your collection; the notetype is unchanged.
Full detail in CHANGELOG.md.