Create cards via URL scheme

Hello,

I have a feature request for Anki Desktop, specifically on macOS.

Feature Request

I would love it if Anki for macOS could implement a URL Scheme similar to that of AnkiMobile, e.g.

anki://addnote?profile=User&type=Basic&deck=Default&fldFront=front&fldBack=back

My Mobile Workflow

I use a powerful app called Drafts as the starting point to create the contents of the cards using Markdown and then use Drafts to convert the Markdown text into HTML and create the cards via the URL scheme.

For example, let’s say I’m learning French, and I can create this note in Drafts:

# Bonjour

*interjection French*
- good day; good morning; hello.

Drafts can automatically convert this note into HTML and create the card by triggering the URL scheme

anki://x-callback-url/addnote?profile=User&type=Basic&deck=French&fldFront=[[title]]&fldBack=[[body]].

where Drafts will automatically interprete [[title]] as the first line and [[body]] as the rest.

Incentive for Desktop URL Scheme

Thanks to the above workflow, I can get many benefits such as:

  • applying styles to text using Markdown instead of HTML tags
  • creating a note in Drafts and sending it directly to AnkiMobile, which is way faster

which is why I prefer creating cards on iOS even when working on desktop. If Anki for macOS implements a similar URL scheme, this workflow will also work on macOS.

I don’t know if this request makes sense from a development POV, but I hope it will come to Anki Desktop someday.

Best regards

1 Like

Hi, @xurc! :wave:

I haven’t done much with this yet, but I think you should be able to implement a similar workflow using Anki Connect..

3 Likes

Thanks for the tip, I haven’t tried any add-ons yet and will definitely look into this. I’ll post a comment here if I manage to figure out how to achieve my workflow.

1 Like