Skip to content

Anki add-on, that automatically looks up legal references when a specific shortcut is pressed during card review.

License

Notifications You must be signed in to change notification settings

spehnm/anki-de-law-lookup

Repository files navigation

LawLookup Addon for Anki

This Anki addon automatically looks up legal references in German law texts and opens the corresponding webpage when a specific shortcut - by default # - is pressed during card review. The addon uses a tokenizer to identify legal references in the front text of a card and opens the corresponding law section on gesetze-im-internet.de. It uses the citation guideline by the German Federal Administrative Court.

Features (mind that this is the launch version)

  • Identifies legal references in German legal texts, if you followed the German Federal Administrative Court citation style.
  • Opens the corresponding law section on gesetze-im-internet.de.
  • Activation via a customizable keyboard shortcut during card review.

Installation

  1. (Easy way:) Check out the Anki Addon Website https://ankiweb.net/shared/info/135761574 (the add-on code you can simply input is: 135761574)

  2. Clone the repository:

    git clone https://github.com/yourusername/law_lookup.git
  3. Navigate to the Anki addons directory:

    • On Windows: C:\Users\<YourUserName>\AppData\Roaming\Anki2\addons21
    • On macOS: ~/Library/Application Support/Anki2/addons21
    • On Linux: ~/.local/share/Anki2/addons21
  4. Copy the law_lookup directory into the addons21 directory:

    cp -r law_lookup <Anki addons directory>

Usage

  1. Open Anki and start reviewing your cards.
  2. Press the # key during card review to open the corresponding law section.

What's next?

Currently, I'm working on a bugfix appearing on non-Windows systems. I think my next step will be to account for different citation styles (e.g. § 771 II ZPO instead of § 771 Abs. 2 ZPO).

Customization

If you wish to change the shortcut key, you can modify the setup_shortcut method in the lookup.py file.

Example to change the shortcut to +:

shortcut = QShortcut(QKeySequence("+"), mw)

About

Anki add-on, that automatically looks up legal references when a specific shortcut is pressed during card review.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages