Forks and suggestions are very welcome.
##Outline
- [Description] (#description)
- [User Instructions] (#user-instructions)
- [Current Features] (#current-features)
- [Settings] (#settings)
- [Details] (#details)
- [Templates] (#anki-templates)
- [Auto Import] (#auto-import)
- [Note Processing] (#note-processing-features)
- [Beta Functions] (#beta-functions)
- [See Also Footer Links] (#see-also-footer-links)
- [Future Features] (#future-features)
- [Developer Notes] (#developer-notes)
An Anki plug-in for downloading Evernote notes to Anki directly from Anki. In addition to this core functionality, Anknotes can automatically modify Evernote notes, create new Evernote notes, and link related Evernote notes together.
- Download everything, move it to your
Anki/addons
directory - Start Anki, and click the Menu Item
Anknotes → Import From Evernote
- Optionally, you can customize [settings] (#settings) in the Anknotes tab in Anki's preferences
- When you run it the first time a browser tab will open on the Evernote site asking you for access to your account
- When you click okay you are taken to a website where the OAuth verification key is displayed. You paste that key into the open Anki prompt and click okay.
- Note that for the first 24 hours after granting access, you have unlimited API usage. After that, Evernote applies rate limiting.
- So, sync everything immediately!
- A rich set of [options] (#settings) will dynamically generate your query from tags, notebook, title, last updated date, or free text
- Free text can include any valid [Evernote query] (https://dev.evernote.com/doc/articles/search_grammar.php)
- [Auto Import] (#auto-import) is possible
- [Four types of Anki Notes] (#anki-templates) can be generated:
- Standard, Reversible, Reverse-Only, and Cloze
- [Post-process] (#note-processing-features) Evernote Notes with a few improvements
- [Fix Evernote note links] (#post-process-links)
- [Automatically embed images] (#post-process-images)
- [Occlude certain text] (#post-process-occlude) on fronts of Anki cards
- [Generate Cloze Fields] (#post-process-cloze)
- [Process a "See Also" Footer field] (#see-also-footer-links) for showing links to other Evernote notes
- See the [Beta Functions] (#beta-functions) section below for info on See Also Footer fields, Table of Contents notes, and Outline notes
- You can enter any valid Evernote Query in the
Search Terms
field - The check box before a given text field enables or disables that field
- Anknotes requires all fields match by default.
- You can use the
Match Any Terms
option to override this, but see the Evernote documentation on search for limitations
- You can use the
- Controls the offset parameter of the Evernote search.
- Auto Pagination is recommended and on by default
- Controls what is saved to Anki
- You can change the base Anki deck
- Anknotes can append the base deck with the Evernote note's Notebook Stack and Notebook Name
- Any colon will be converted to two colons, to enable Anki's sub-deck functionality
- You can change which Evernote tags are saved
- By default, Anknotes will update existing Anki notes in place. This preserves all Anki statistics.
- You can also ignore existing notes, or delete and re-add existing notes (this will erase any Anki statistics)
- All use an advanced Anki template with customized content and CSS
- Reversible notes will generate a normal and reversed card for each note
- Add
#Reversible
tag to Evernote note before importing
- Add
- Reverse-only notes will only generate a reversed card
- Add
#Reverse-Only
tag to Evernote note before importing
- Add
- [Cloze notes] (#post-process-cloze) are automatically detected by Anknotes
- Automatically import on profile load
- Enable via Anknotes Menu
- Auto Import will be delayed if an import has occurred in the past 30 minutes
- Automatically page through an Evernote query
- Enable via Anknotes Settings
- Evernote only returns 250 results per search, so queries with > 250 possible results require multiple searches
- If more than 10 API calls are made during a search, the next search is delayed by 15 minutes
- Automatically import continuously
- Only configurable via source code at this time
- Enable Auto Import and Pagination as per above, and then modify
constants.py
, settingPAGING_RESTART_WHEN_COMPLETE
toTrue
- Fix [Evernote Note Links] (https://dev.evernote.com/doc/articles/note_links.php) so that they can be opened in Anki
- Convert "New Style" Evernote web links to "Classic" Evernote in-app links so that any note links open directly in Evernote
- Convert all Evernote links to use two forward slashes instead of three to get around an Anki bug
- Automatically embed images
- This is a workaround since Anki cannot import Evernote resources such as embedded images, PDF files, sounds, etc
- Anknotes will convert any of the following to embedded, linkable images:
- Any HTML Dropbox sharing link to an image
(https://www.dropbox.com/s/...)
- Any Dropbox plain-text to an image (same as above, but plain-text links must end with
?dl=0
or?dl=1
) - Any HTML link with Link Text beginning with "Image Link", e.g.:
<a href='http://www.foo.com/bar'>Image Link #1</a>
- Any HTML Dropbox sharing link to an image
- Occlude (hide) certain text on fronts of Anki cards
- Useful for displaying additional information but ensuring it only shows on backs of cards
- Anknotes converts any of the following to special text that will display in grey color, and only on the backs of cards:
- Any text with white foreground
- Any text within two brackets, such as
<<Hide Me>>
- Automatically generate [Cloze fields] (http://ankisrs.net/docs/manual.html#cloze)
- Any text with a single curly bracket will be converted into a cloze field
- E.g., two cloze fields are generated from: The central nervous system is made up of the
{brain}
and{spinal cord}
- E.g., two cloze fields are generated from: The central nervous system is made up of the
- If you want to generate a single cloze field (not increment the field #), insert a pound character
('#')
after the first curly bracket:- E.g., a single cloze field is generated from: The central nervous system is made up of the
{brain}
and{#spinal cord}
- E.g., a single cloze field is generated from: The central nervous system is made up of the
- Any text with a single curly bracket will be converted into a cloze field
##Beta Functions
- Anknotes can create and upload/update existing Evernote notes
- Currently this is limited to creating new Auto TOC notes and modifying the See Also Footer field of existing notes
- Anknotes uses client-side validation to decrease API usage, but there is currently an issue with use of the validation library in Anki.
- So, Anknotes will execute this validation using an external script, not as an Anki addon
- Therefore, you must manually ensure that Python and the lxml module is installed on your system
- Alternately, disable validation: Edit
constants.py
and setENABLE_VALIDATION
toFalse
- Anknotes is not intended for use as a sync client with Evernote (this may change in the future)
- Thus, notes deleted from the Evernote servers will not be deleted from Anki
- Use
Anknotes → Maintenance Tasks → Find Deleted Notes
to find and delete these notes from Anki- You can also find notes in Evernote that don't exist in Anki
- First, you must create a "Table of Contents" note using the Evernote desktop application:
- In the Windows client, select ALL notes you want imported into Anki, and click the
Create Table of Contents Note
button on the right-sided panel - Alternately, select 'Copy Note Links' and paste the content into a new Evernote Note.
- In the Windows client, select ALL notes you want imported into Anki, and click the
- Export your Evernote note to
anknotes/extra/user/Table of Contents.enex
- You have topics (Root Notes) broken down into multiple sub-topics (Sub Notes)
- The Root Notes are too broad to be tested, and therefore not useful as Anki cards
- The Sub Notes are testable topics intended to be used as Anki cards
- Anknotes tries to link these related Sub Notes together so you can rapidly view related content in Evernote
- Table of Contents (TOC) Notes
- Primarily contain a hierarchical list of links to other notes
- Outline Notes
- Primarily contain content itself of sub-notes
- E.g. a summary of sub-notes or full text of sub-notes
- Common usage scenario is creating a broad Outline style note when studying a topic, and breaking that down into multiple Sub Notes to use in Anki
- "See Also" Footer Fields
- Primarily consist of links to TOC notes, Outline notes, or other Evernote notes
- Root Titles and Sub Notes
- Sub Notes are notes with a colon in the title
- Root Title is the portion of the title before the first colon
- The "See Also" Footer field is shown on the backs of Anki cards only, so having a descriptive link in here won't give away the correct answer
- The content itself of TOC and Outline notes are also viewable on the backs of Anki cards
- Anknotes can create new Evernote notes from automatically generated TOC notes
- Anknotes can update existing Evernote notes with modified See Also Footer fields
- Add a new line to the end of your Evernote note that begins with
See Also
, and include relevant links after it - Tag notes in Evernote before importing.
- Table of Contents (TOC) notes are designated by the
#TOC
tag. - Outline notes are designed by the
#Outline
tag.
- Table of Contents (TOC) notes are designated by the
- Anknotes can automatically create:
- Table of Contents Notes
- Created for Root Titles containing two or more Sub Notes
- In Anki, click the
Anknotes Menu → Process See Also Footer Links → Step 3: Create Auto TOC Notes
. - Once the Auto TOC notes are generated, click
Steps 4 & 5
to upload the notes to Evernote
- See Also' Footer fields for displaying links to other Evernote notes
- Any links from other notes, including automatically generated TOC notes, are inserted into this field by Anknotes
- Creation of Outline notes from sub-notes or sub-notes from outline notes is a possible future feature
- Table of Contents Notes
Let's say we have nine Sub Notes titled Diabetes: Symptoms
, Diabetes: Treatment
, Diabetes: Treatment: Types of Insulin
, and Diabetes: Complications
, etc:
-
Anknotes will generate a TOC note
Diabetes
with hierarchical links to all nine sub-notes as such:DIABETES 1. Symptoms 2. Complications 1. Cardiovascular * Heart Attack Risk 2. Infectious 3. Ophthalmologic 3. Treatment * Types of Insulin
-
Anknotes can then insert a link to that TOC note in the 'See Also' Footer field of the sub notes
-
This 'See Also' Footer field will display on the backs of Anki cards
-
The TOC note's contents themselves will also be available on the backs of Anki cards
- More robust options
- Move options from source code into GUI
- Allow enabling/disabling of beta functions like See Also fields
- Customize criteria for detecting see also fields
- Implement full sync with Evernote servers
- Import resources (e.g., images, sounds, etc) from Evernote notes
- Automatically create Anki sub-notes from a large Evernote note
- Template File Location:
/extra/ancillary/FrontTemplate.htm
- CSS File Location:
/extra/ancillary/_AviAnkiCSS.css
- Message Box CSS:
/extra/ancillary/QMessageBox.css
- Anknotes saves all Evernote notes, tags, and notebooks in the SQL database of the active Anki profile
- You may force a resync with the local Anknotes database via the menu:
Anknotes → Maintenance Tasks
- You may force update of ancillary tag/notebook data via this menu
- You may force a resync with the local Anknotes database via the menu:
- Maps of see also footer links and Table of Contents notes are also saved here
- All Evernote note history is saved in a separate table. This is not currently used but may be helpful if data loss occurs or for future functionality
- If you are testing a new feature, you can automatically have Anki run that function when Anki starts.
- Simply add the method to
__main__.py
under the commentAdd a function here and it will automatically run on profile load
- Also, create the folder
/anknotes/extra/dev
and add filesanknotes.developer
andanknotes.developer.automate
- Simply add the method to