/syntax-highlighting

A fork of Tiago Barroso's Syntax Highlighting add-on with support for Anki 2.1

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

Syntax Highlighting Add-on for Anki

Allows you to insert syntax-highlighted code snippets into the spaced-repetition flashcard app Anki.

Table of Contents

Screenshots

Installation

AnkiWeb

Link to the add-on on AnkiWeb

Manual installation

Anki 2.0

  1. Go to ToolsAdd-onsOpen add-ons folder
  2. Find and delete Syntax Highlighting.py and syntax_highlighting if they already exist
  3. Download and extract the latest Anki 2.0 add-on release from the releases tab
  4. Move Syntax Highlighting.py and syntax_highlighting into the add-ons folder
  5. Restart Anki

Anki 2.1

  1. Go to ToolsAdd-onsOpen add-ons folder
  2. See if the syntax_highlighting folder already exists
  3. If you would like to keep your settings thus far: Find the meta.json file contained within and copy it to a safe location.
  4. Proceed to delete the syntax_highlighting folder
  5. Download and extract the latest Anki 2.1 add-on release from the releases tab
  6. Rename the extracted folder to syntax_highlighting and move it into the add-ons directory
  7. Optional: Place the meta.json file back in the directory if you created a copy beforehand.
  8. Restart Anki

Documentation

For further information on the use of this add-on please check out the original add-on description.

License and Credits

Copyright © 2012-2015 Tiago Barroso

Copyright © 2015 Tim Rae

Copyright © 2018 Aristotelis P.

Syntax Highlighting is based on Syntax Highlighting for Code by Tiago Barroso. All credit for the original add-on goes to him. A major thanks is also due for Tim Rae, who extended the original add-on with CSS support.

The present fork and update to Anki 2.1 was made possible through the generous support of a fellow Anki user who would like to remain anonymous.

Syntax Highlighting ships with the following third-party open-source software:

  • Pygments v2.2.0. Copyright (c) 2006-2017 by the Pygments Team. Licensed under the BSD license.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.