-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathankiweb.html
38 lines (22 loc) · 3.68 KB
/
ankiweb.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Use this at your own risk. This is a prerelease that still needs some testing.
This add-on adds a note type with the fields "external_source" (for a value like "my lecture notes.pdf") and "external_page" (for a value like "123"). This add-on transforms the values you enter so that during review you have a hyperlink on your card. This hyperlink opens a pdf-viewer window which shows page 123 of the file "my lecture notes.pdf".
Sometimes I notice that a card is too short and the info on the card is not really meaningful to me anymore. With this add-on I can quickly refresh my memory and add additional info from the source to this note.
Add-ons that modify the reviewer don't work on Ankimobile or Ankidroid. So this add-on doesn't help on mobile. This add-on uses the pdf viewer that's also built into Firefox.
The pdf files are only show if they are in a special folder that you can configure from the add-ons dialog. By default this folder is a folder named "Ankifiles" in your Documents folder.
You must only put the file name of the pdf into the field "external_source", e.g. "my lecture notes.pdf". You may not write "file:////Users/myname/Documents/Ankifiles/my lecture notes.pdf" or "C:\\Users\myname\Documents\my lecture notes.pdf". You may only add numbers into the field "external_page" like "123". You may not write "page 123" or "p. 123".
If you create many notes/cards from the same pdf the add-ons like <a href="https://ankiweb.net/shared/info/516643804" rel="nofollow">Frozen Fields</a> and
<a href="https://ankiweb.net/shared/info/1247884413" rel="nofollow">Field history</a> make it much easier to fill out these fields.
<b># configuration for your own note types</b>
Instead of using the additional note types you can also adjust your existing ones. This is relevant if you have some custom styling. This requires some configuration:
- You must add the fields "external_source" and "external_page" to the notetypes that link to pdfs. If you don't know what I mean by 'add fields to your note type' watch about one minute of this <a href="https://www.youtube.com/watch?v=JTKqd4nqsK0&feature=youtu.be&t=22" rel="nofollow">youtube-video</a>.
- You must add the hyperlink to your "front template" or "back template" in the "Card Types for ..." window. If you don't know what I mean by "front template" or "Card Types for ... window" watch this <a href="https://www.youtube.com/watch?v=HgKDRTTTnh4" rel="nofollow">youtube-video</a>. This add-on adds a button named "Ext-Docs-Link" into the "Card Types for ..." window. Click the "Ext-Docs-Link" button to insert the link text into your template.
<b># alternatives</b>
There's another add-on for viewing pdfs on a specific page named <a href="https://ankiweb.net/shared/info/879473266" rel="nofollow">Open linked pdf, docx, epub, audio/video, etc. in external Program</a>. This add-on has a complicated setup but offers some advanced features like using a different pdf viewer (e.g. one that allows to edit/highlight your pdfs) or displaying pdf files from any location on your disc. These two-addons are not compatible. You can only have one enabled at each time.
<b># privacy</b>
All pdfs in a the pdf folder are accessible for all the cards you review or previews just as your other files in your media folder. For the security implications see <a href="https://anki.tenderapp.com/discussions/ankidesktop/15320-security-issues-with-the-anki-browser" rel="nofollow">this discussion from the official forum</a>.
<b># other authors</b>
This add-on reuses code from other add-ons made by lovac42 and arthurmilchior.
<b># bugs etc.</b>
If you find a bug or have improvements please post them on <a href="" rel="nofollow">github</a>.
<b># Versions </b>
- 2019-09-17 initial release