-
Notifications
You must be signed in to change notification settings - Fork 107
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
Allow adding "ankisearch:" links in external programs. #412
Conversation
ankiconnector.cpp
Outdated
void AnkiConnector::ankiSearch( QString const & word ) | ||
{ | ||
QString postTemplate = QString( | ||
"{" |
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.
can
use rawstring
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.
good idea
what will happen,if no anki installed and click on the ankisearch link |
|
||
void AnkiConnector::ankiSearch( QString const & word ) | ||
{ | ||
QString postTemplate = R"anki({ |
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.
if anki connect is not enabled ,can return directly?
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.
if anki connect is not enabled ,can return directly?
Cancel the operation if ankiconnect isn't enabled in settings? i'll look into it.
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.
Added an if
that returns if ankiconnect isn't enabled in settings.
If Ankiconnect isn't running or if Anki isn't runnning, it prints "connection refused" at the bottom. |
SonarCloud Quality Gate failed. |
This PR lets any external program create "ankisearch:" links. By clicking on such link, the Anki Browser opens with the specified query.
screencast-2023-Mar-21_21-31-06.mp4
This can be useful to check if you already have a certain word added to Anki.