Anki workflow with hook?

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

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.

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

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

Now that copy/paste between Mac and iOS works so well (Copy and paste between devices from your Mac - Apple Support), 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.

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)

1 Like

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.

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

I leverage Use Universal Clipboard to copy and paste between your Apple devices - Apple Support.

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.

Cognitive Productivity with macOS - can you send me the download link or buy link for this?

The Leanpub version, updated more frequently than then Books version, is Cognitive Productivity with macOS: 7 Principles for Getting Smarter with Knowledge.

That link gives a bad gateway 502 page

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

The Leanpub website is back up :blush:

Many thanks, got it and purchased it.

1 Like

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

Hook’s Gear Menu – Hook 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.