# Anki workflow with hook?

**URL:** https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255
**Category:** Discussion & Help
**Created:** [February 18, 2020, 9:23pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255 "2020-02-18T21:23:25Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Tom](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@Tom](https://discourse.hookproductivity.com/u/Tom)
#### Post date: [February 18, 2020, 9:23pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/1 "2020-02-18T21:23:25Z")

</div>

Hi, I am a definite newbie to hook, long time user of Anki which I use for spaced repetition. Unfortunately Anki does not have an Applescript dictionary to easily integrate with Hook, but I was hoping to understand how others may be using hook with Anki?

Right now, I am stuck and using each separately and individually which is not ideal.  
Has anyone found a good workflow they would be willing to share?

Thanks  
Tom

---

<div class="post-metadata">

### Author: ![RobTrew](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/robtrew/32/212_2.png) [@RobTrew](https://discourse.hookproductivity.com/u/RobTrew)
#### Post date: [February 19, 2020, 10:59am UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/2 "2020-02-19T10:59:05Z")

</div>

Hook provides a coherent interface to creating links to a variety of local (and remote) resources.

As far as I am aware, the Anki URL scheme doesn’t provide for links **to** Anki cards (though it can be used to automate the creation of new cards).

But if you want links **from** your cards, then Hook may make it a bit easier to create links to some of your local resources.

---

<div class="post-metadata">

### Author: ![Tom](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@Tom](https://discourse.hookproductivity.com/u/Tom)
#### Post date: [February 19, 2020, 11:58am UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/3 "2020-02-19T11:58:18Z")

</div>

Hi Rob

Hooks ability to link INTO its cards is unfortunate. I was also exploring using the unique ID hook provides as another possible way of circumventing the lack of schema To anki cards, however, as far as I can tell, Anki does not lend itself to spotlight search either.

At this point, it appears you can only link Anki -\> external. Although I do not program, I have looked for scripts (applescripts or javascripts) that may be used. I have not found any. I am not even sure Anki has opened itself to allow for this sort of integration.

Best,  
Tom

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [February 19, 2020, 9:46pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/4 "2020-02-19T21:46:35Z")

</div>

> [@Tom](#):
>
> how others may be using hook with Anki?

I love the Anki flashcard app. I use Anki for iOS daily. What could be more fun than programming one’s mind? 🙂

Now that copy/paste between Mac and iOS works so well ([Copy and paste between devices from your Mac - Apple Support](https://support.apple.com/en-ca/guide/mac-help/mchl70368996/mac)), that’s almost the only way in which I now add content to, and retrieve content from, Anki for iOS. (I don’t use its sync service, but I occasionally sync via iTunes.) E.g., I copy content from a PDF on my Mac and paste it into Anki for iOS; I create questions/answers in nvUltra and copy them (on Mac), and then paste them into Anki iOS. So, I hardly launch Anki for macOS anymore. (But there are some times when I find the macOS version useful).

(Not that I do much editing on iOS. Almost all my content creation happens on macOS. I use iOS for less interactive activities, like practicing; and for dictating notes while I’m away from my Mac.)

I also use Hook’s copy URL function (or `Copy Markdown Link`) and then paste links into Anki for iOS cards (references to source material). Sometimes the URLs are to the web sometimes to other places (even PDF files on my Mac).

If I want to reference an Anki note from a file on my Mac, I generate unique IDs, and I paste them into the Mac file and into the Anki for iOS note. When I need the info, I copy the ID and use Anki’s search function to find the Anki note (on Anki for Mac or more likely Anki for iOS).

(I do something similar with 1password. 1password does not have a “copy URL” function that I know of. So, to identify a 1password entry, I generate a unique ID on my Mac and paste it into the 1password entry. I paste the same ID (as a reference) in my Mac notes. In my notes, I might write “See 1p/#Q69Y7” which I know means “search for `Q69Y7` in 1password”, or just 1p/#Q69Y7 which I know [in my system] means the same thing. When I need to get to the 1password entry, I can copy/paste (or type) the “unique” ID into 1password search field. And of course, I sometimes paste links garnered from Hook directly into 1password items. That’s not as fast as using Hook links would be, but it gets the job done for an app like 1p that does not have the required automation. )

Of course, you don’t need Hook to generate unique IDs. An AppleScript or other tool will do. It just needs to be fast and automatic.

### Hook and Anki future?

Anyway, the above is not enough for everyone. Supporting Anki has been on our todo list from the beginning – but I think yours is the first request for it we’ve received apart from myself. If a convenient interface for getting Anki note URLs and names becomes available, we’ll add support. One can develop Anki for macOS plugins. So it might be possible to develop some AppleScript or JavaScript support like [@QpUc8K did for InkDrop](https://discourse.hookproductivity.com/t/struggling-to-create-app-script-inkdrop-applescript-and-electron-bridge/1249/4).

---

<div class="post-metadata">

### Author: ![RobTrew](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/robtrew/32/212_2.png) [@RobTrew](https://discourse.hookproductivity.com/u/RobTrew)
#### Post date: [February 19, 2020, 11:26pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/5 "2020-02-19T23:26:07Z")

</div>

> [@LucB](#):
>
> So it might be possible to develop some AppleScript or JavaScript support

Possibly, but Anki is Python-built and Python scripted, and that would probably be the route to take (calling python through the shell from `osascript`)

---

<div class="post-metadata">

### Author: ![RobTrew](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/robtrew/32/212_2.png) [@RobTrew](https://discourse.hookproductivity.com/u/RobTrew)
#### Post date: [February 20, 2020, 12:06am UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/6 "2020-02-20T00:06:21Z")

</div>

At the moment I think the issue is simply that their (python) API is built more around the needs of card creation than around customised run-time interactions with the app.

---

<div class="post-metadata">

### Author: ![yashodhankhare](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/y/da6949/32.png) [@yashodhankhare](https://discourse.hookproductivity.com/u/yashodhankhare)
#### Post date: [August 5, 2020, 10:51am UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/7 "2020-08-05T10:51:59Z")

</div>

Luc, can you load a screencast on the way you’re using Anki?

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [August 5, 2020, 4:25pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/8 "2020-08-05T16:25:30Z")

</div>

I leverage [Use Universal Clipboard to copy and paste between your Apple devices - Apple Support](https://support.apple.com/en-us/HT209460).

With Hook for macOS, I copy URLs using `Copy Link` or `Copy Markdown Link` , and paste them in Anki for iOS. Even though Anki does not interpret the markdown, I find it helpful to read it that way. that way, my Anki notes have references to content for later reference, review and editing. Occasionally I will throw in a unique ID so that I can refer to a specific note.

I use Anki.Mac as a read-only database. There are several screencasts for Anki in _Cognitive Productivity with macOS_, which were done before Hook was published.

---

<div class="post-metadata">

### Author: ![yashodhankhare](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/y/da6949/32.png) [@yashodhankhare](https://discourse.hookproductivity.com/u/yashodhankhare)
#### Post date: [August 5, 2020, 4:30pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/9 "2020-08-05T16:30:15Z")

</div>

_Cognitive Productivity with macOS_ - can you send me the download link or buy link for this?

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [August 5, 2020, 4:35pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/10 "2020-08-05T16:35:03Z")

</div>

The Leanpub version, updated more frequently than then Books version, is [_Cognitive Productivity with macOS: 7 Principles for Getting Smarter with Knowledge_](https://leanpub.com/cognitive-productivity-macos).

---

<div class="post-metadata">

### Author: ![yashodhankhare](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/y/da6949/32.png) [@yashodhankhare](https://discourse.hookproductivity.com/u/yashodhankhare)
#### Post date: [August 5, 2020, 4:36pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/11 "2020-08-05T16:36:42Z")

</div>

That link gives a bad gateway 502 page

---

<div class="post-metadata">

### Author: ![yashodhankhare](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/y/da6949/32.png) [@yashodhankhare](https://discourse.hookproductivity.com/u/yashodhankhare)
#### Post date: [August 5, 2020, 4:37pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/12 "2020-08-05T16:37:26Z")

</div>

![502 Bad Gateway](https://discourse.hookproductivity.com/uploads/default/original/2X/4/425abe6688e486f65ea1a7121ab043049573eb92.png)

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [August 5, 2020, 4:56pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/13 "2020-08-05T16:56:15Z")

</div>

I’ve noticed same and alerted the good folks at Leanpub about this.

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [August 5, 2020, 6:14pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/14 "2020-08-05T18:14:53Z")

</div>

The Leanpub website is back up 😊

---

<div class="post-metadata">

### Author: ![yashodhankhare](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/y/da6949/32.png) [@yashodhankhare](https://discourse.hookproductivity.com/u/yashodhankhare)
#### Post date: [August 6, 2020, 3:35am UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/15 "2020-08-06T03:35:50Z")

</div>

Many thanks, got it and purchased it.

---

<div class="post-metadata">

### Author: ![yashodhankhare](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/y/da6949/32.png) [@yashodhankhare](https://discourse.hookproductivity.com/u/yashodhankhare)
#### Post date: [August 8, 2020, 7:56am UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/16 "2020-08-08T07:56:17Z")

</div>

How do you generate unique ids in Anki or even on the Mac?

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [August 8, 2020, 7:30pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/17 "2020-08-08T19:30:15Z")

</div>

Hook’s [Gear Menu – Hook](https://hookproductivity.com/help/hook-window/gear-menu/) contains one. Invoke Hook, and ⌃G to get the Gear menu. Or click the menu bar icon, then Gear button. (Both Hook window and its menu bar window have a Gear menu).

Later we may enhance the generator to make the IDs human readable/sensible while still likely to be unique.

---

<div class="post-metadata">

### Author: ![thartley](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@thartley](https://discourse.hookproductivity.com/u/thartley)
#### Post date: [August 6, 2021, 10:14pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/18 "2021-08-06T22:14:28Z")

</div>

I use Anki all the time and I love Hook. I’m glad to see that there are others using the two together. I don’t believe that Anki can link bidirectionally but if it is possible it would be a welcome addition for my workflow.

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [August 6, 2021, 11:10pm UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/19 "2021-08-06T23:10:14Z")

</div>

It might be possible for an Anki plugin developer to create a plugin that supports “get address” and “open URL”. I personally almost exclusively use Anki on iPhone now.

---

<div class="post-metadata">

### Author: ![xiamu](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/x/e274bd/32.png) [@xiamu](https://discourse.hookproductivity.com/u/xiamu)
#### Post date: [February 16, 2022, 3:20am UTC](https://discourse.hookproductivity.com/t/anki-workflow-with-hook/1255/20 "2022-02-16T03:20:30Z")

</div>

[https://ankiweb.net/shared/info/1420819673](https://ankiweb.net/shared/info/1420819673)

This plugin supports copying the html link of the card from the Anki browser and then using it to externally invoke the Anki window to view the card, but it seems that this feature is currently only supported on windows.
