Skip to content

felix-ops/JPDB-Media-Support

Repository files navigation

JPDB Media Support Extension

Overview

This extension is built for JPDB users who miss the Anki's mining workflow but prefer JPDB’s SRS system. this extension allows you to import custom images, audio, and sentences from your Anki decks and display them automatically during your JPDB reviews.

This extension enables users to fetch media from existing Anki decks and displays them during reviews. You can create custom Anki cards with Images and audio using tools like asbplayer or subs2srs, then sync the media from those decks to use within JPDB using this extension.

Review Page

image

Vocabulary Page

image

Demo

demo__95pct_smaller.mp4

Tip:

  • If you find it really hassle to mine using asbplayer or subs2srs. There's a awesome collection of anime Anki decks created by "Jo-Mako", import those decks and use them with this extension. Anki Decks Collection for Anime
  • Checkout Immersion kit Examples if you don't prefer to mine manually and just need example media and sentences.

Features

  • Zero Manual Linking: You don't need to link cards one by one. The extension parses the Japanese sentence from your Anki card, finds all the words in it, and automatically links the media to those words on JPDB.
  • Multiple Contexts: Since words appear in many sentences, you might mine the same word in different scenes. The extension aggregates all of them, letting you cycle through every context where you’ve encountered that word.
  • With this extension, media is automatically injected into JPDB vocabulary and review pages.
  • Auto-sync functionality that automatically syncs with Anki when visiting JPDB pages (when enabled).

⌨️ Keyboard Shortcuts

The extension provides convenient keyboard shortcuts for quick navigation and interaction with your vocabulary cards. These shortcuts are only active when the JPDB media block is visible on the page.

Shortcut Action Description
(Left Arrow) Previous Card Navigate to the previous vocabulary card
(Right Arrow) Next Card Navigate to the next vocabulary card
F Toggle Favorite Mark/unmark the current card as a favorite
A Play Audio Play the audio for the current vocabulary card

Requirements

To start using this extension, make sure you have the following:

  • JPDB API Key Required for interacting with JPDB (Don't use the same API key shown in the Video, use the one available at the bottom of the JPDB settings page!).
  • Anki (Installed on your computer).
  • Anki Connect Addon (Installed in Anki).
  • Anki Deck (Containing the media files you want to sync with JPDB).
  • Chrome Browser (any browser which supports Chrome extensions).

Webstore Installation

Manual Installation

  • Download the code as a .zip file Directly or from Releases Page.
  • Extract the zip file in a location of your choosing.
  • Open up your browser and navigate to chrome://extensions/.
  • Check the Developer mode switch at the top right of your window.
  • Click the Load unpacked button at the top left.
  • In the file picker dialog, navigate to the folder where you extracted earlier. You should see a file called manifest.json inside the folder.
  • Click select/open/choose to exit the dialog and load the extension.

Setup

1. Install Anki & Anki Connect

2. Configure the Extension

  • Enter your JPDB API Key (which is crucial for categorizing media base on JPDB's VID).
  • Set the Anki Connect URL (default: http://localhost:8765).
  • Choose the Anki Deck which contains the cards to fetch media from.
  • In the Japanese Sentence Field choose the field which contains the japanese sentence and in the Translated Sentence Field choose the field which contains English / any other explanation sentence.
  • Enable/disable Auto Play Audio and Hide Native Sentence as needed.
  • Hit Fetch Data with Anki to sync all the data from the anki cards.
  • Click Export Config to get backup for settings and cards.

How It Works

  1. The extension fetches vocabulary from the JPDB page the user is currently on.
  2. It then checks Anki (via Anki Connect) to see if there are any media files associated with that vocabulary.
  3. If media files exist, they are automatically injected into JPDB’s Vocabulary and Review pages.

Troubleshooting

1. Media is not appearing on JPDB

  • Ensure that Anki is running in the background.
  • Check if Anki Connect is installed and responding at http://localhost:8765.
  • Verify that the deck and field names in the extension match those in Anki.
  • Make sure that the each card's context field has some valid vocabulary.

Contribution

Feel free to contribute to this project by submitting issues or pull requests. If you have feature suggestions or bug reports, please open an issue on GitHub.

Happy learning with JPDB Media Support! 🎉