Skip to content

martinjo/Google-Docs-Anki-Export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

This plugin allows content in a Google docs document to be exported to Anki flashcards.

image

Features

  • Scans the selected part of the document, or the whole document if nothing is selected.

Supported file formats:

  • .apkg - for import directly into Anki
  • zipped .csv files for further processing

Supported content:

  • Text
  • Images (will not display in the sidebar preview)
  • Lists
    • Nested lists work
    • Ordered (with numbers) does not

Installation

Host bundle.js

  • You need to host the bundle.js file on a server somewhere.
    • Google allows free hosting of up to 5GB of traffic a month (which should be plenty for this use case)
    • See Google's documentation
  • Enter the URL of the hosted bundle.js into sidebar.html (line 211)
    • "<script src="[URL TO REACH bundle.js]"></script>"

Install code into document

  • Create or open a Google docs document.
  • Open [Extensions]/[Apps scripts]
  • Paste code from code.gs into the code file that is automatically created (replace the existing code).
  • Create a new HTML file.
    • Name it "Sidebar" (html extension will be added automatically).
    • Paste code from Sidebar.html into the file you created.
  • Close the document and re-open it.
  • Open Sidebar from [Extensions]/[Anki-Export]/[Show in Sidebar].
    • Give the script the permissions it asks for.

Usage

Format your content

Front of cards

  • All headings of the lowest level in a heading "tree" will be used as the content for the Front of the card.
  • Headings above the lowest levels will be ignored but can still be useful to structure the content in the document.

Example:

  • Heading 1 (ignored)
    • Heading 2 (ignored)
      • Heading 3 (Front)
        • Content (Back)

See detailed example furher down.

Back of cards

All content under the lowest leveled headings will be used as content.

Example

This content:
image

Will generate these Notes:
image

Find Notes

  • Open Sidebar from [Extensions]/[Anki-Export]/[Show in Sidebar].
  • Press "Find cards".

image

  • A progress bar will be displayed while the content is processed.

image

  • The cards will be listed under "Front".
  • Select a card to preview the back/content of it.

image

Export

  • Press one of the two export buttons at the bottom of the sidebar.

image

Detailed content example

The content is formatted as follows:
[Heading level 1]
Surgery
[Heading level 2]
Cause of abdominal distension in inflammatory conditions of the abdomen?

  • Intestinal paralysis causes swollen intestines
    • Gas and fluid in the intestines

[Heading level 1]
Ileus
[Heading level 2]
What causes pain in case of inflammation of the abdomen - Peritoneum Viscerale or parietale?

  • peritoneum parietale

[Heading level 2]
What drives the pain response in ileus?
  • It is the bowel that drives the pain
  • Palpation will not make much difference 
    • Patient will experience discomfort on palpation

Pain will be non-specific in localisation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published