-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Be more explicit about Anki desktop sync server vs Anki standalone sync servers (Python/Rust) #193
Conversation
@@ -1,7 +1,7 @@ | |||
# Self-Hosted Sync Server | |||
|
|||
Anki 2.1.57+ includes a built-in sync server. Advanced users who cannot or do | |||
not wish to use AnkiWeb can use this sync server instead of AnkiWeb. | |||
Advanced users who cannot or do not wish to use AnkiWeb can use a self-hosted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not mention that desktop Anki has sync server just yet. Let's list out all possible options all at once later.
The reason for this rewording is that "Anki 2.1.57+ includes a built-in sync server" was confusing to me, because I didn't know wheter that's referring to:
- the built Anki desktop app
- or that the Anki repository starts containing code for the standalone sync servers as of 2.1.57+
@@ -19,10 +19,14 @@ Things to be aware of: | |||
|
|||
## Installing/Running | |||
|
|||
There are various ways you can install and run the server. | |||
There are various ways you can install and run the server. You can use either: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List a short summary of the possible ways to go about this all in one place, so nobody gets confused.
I know that "the desktop version of Anki" is kind of a thoughtcrime to write, because there's no such thing as "Anki desktop" - there's just "Anki" that is implicitly, obviously, desktop. However I felt the need to make the distinction here to draw a clear line between "Anki desktop that is the graphical app, which just so happens to have the syncserver" and "the minimal standalone sync servers for Anki that are terminal only"
@@ -44,8 +48,8 @@ SYNC_USER1=user:pass anki --syncserver | |||
|
|||
### With Pip | |||
|
|||
If you have Python 3.9+ installed, you can run from PyPI without downloading | |||
all Anki's GUI dependencies. | |||
To avoid downloading desktop Anki's GUI dependencies, you can run a standalone Anki sync server using a Python package downloaded from PyPI instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reorder the sentence so the more important reason for using the standalone sync server is first. I think people first think "hmm I wonder if there's a lighter headless server" rather than "hmm I already have the python 3.9 package installed, wonder if there's a python implementation".
There's no version information about from which version of Anki the standalone Python sync server is available. I browsed the blame for a bit (ankitects/anki#2329) but I don't know if that's the definitive PR that added it, or was it available earlier. Should a sentence like "available from Anki [version here]" be added too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it really matters, as the commands below will install the latest Anki version anyway.
@@ -66,7 +70,7 @@ Replace 2.1.66 with whatever the latest Anki version is. | |||
|
|||
Protobuf (protoc) will need to be installed. | |||
|
|||
After running that, you can run it with | |||
After building, you can run it with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, but added it to be more specific, "After running that, you can run it" irked me
If you have Rustup installed, from Anki 2.1.66+, you can build a standalone sync | ||
server that doesn't require Python, using the following: | ||
From Anki 2.1.66+, you can alternatively build a Rust implementation of the standalone sync server using the below command. | ||
Make sure you have Rustup installed. | ||
|
||
``` | ||
cargo install --git https://github.com/ankitects/anki.git --tag 2.1.66 anki-sync-server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cargo install --git https://github.com/ankitects/anki.git --tag 2.1.66 anki-sync-server | |
cargo install --git https://github.com/ankitects/anki.git --tag 23.10 anki-sync-server |
Since the 23.10 release introduced breaking changes, I think it'd be worth it to update the docs so that they download the latest release when copy-pasting.
Inevitably, somebody will just mindlessly copy the snippet and wonder why their 2.1.66 sync server is not working with Anki desktop 23.10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the Replace 2.1.66 with whatever the latest Anki version is.
line below would need to be updated to mention 23.10
Looks reasonable - thanks! |
Explanation in code comments.