Anki DupliCards

AnkiWeb addon 1333083808 GitHub repository archived

Merges newly added flashcards with existing ones sharing the same front or back, updates those cards and marks them new, using a dedicated note type with configurable sorting.
AI-generated summary; may contain mistakes.

card-creationschedulingnote-managementduplicatescard-templates

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (👍 0 · 👎 0)
Updated
2024-08-01
Anki versions
2.1.1~
License
MIT (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON, Ignore List
Description language
en

Maintenance

abandoned

  • The GitHub repository is archived.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2024-08-01
History across monthly snapshots

Loading…

Similar addons

Reverse Deck

Creates reversed flashcards from an existing deck by swapping Front and Back fields, adding a "reversed" tag while preserving other fields and tags, in a new or existing deck.

card-creationnote-managementtaggingdeck-management

19 votes 46% approval 👍 13 · 👎 6 Anki 2.1.1~ Updated 2024-09-24
Deck Flipper

Creates flipped copies of Anki decks by swapping front and back fields, and keeps those copies updated when the original deck changes.

note-managementdeck-management

1 votes 21% approval 👍 1 · 👎 0 ⭐ 0 Anki 2.1.1~ Updated 2025-07-03

Description

Anki DupliCards

An Anki add-on allowing you to merge cards while adding them.

Use case

Assume you're learning French and you create the following cards:

  • front: voler, back: to fly
  • front: voler, back: to steal
  • front: piquer, back: to steal

Now, if you're shown voler, it'd be nice if you knew both meanings. And vice versa, if you're shown to steal, you should know both French words.

You could edit an already existing card to add a second meaning, but that would be tedious and not update the scheduler.

This add-on solves the problem. For every card added, it searches for cards with the same front or back, then updates those cards and marks them as new. So in the above situation, you would have 4 cards:

  • front: voler, back: to fly, to steal
  • front: piquer, back: to steal
  • front: to fly, back: voler
  • front: to steal, back: voler, piquer

Adding (piquer, to sting) would update the back of the second card to to steal, to sting, and add a new card (to sting, piquer).

How to use

The add-on only merges the cards of the note type X-DupliCard. This type will be added on startup, if it doesn't exist. Functionally it's the same as the basic card, except it also has the Type field, which can be used to distinguish the "sides" of the card. The type can be either FB (front-back) or BF (back-front).

Configuration options:

sorter

Code for custom sorting. It should be a valid Python function body. The function will be passed as key argument to the .sort() method called on a list of texts in the card. The text will be passed to the function as the entry argument.

For example, if you have a card with light on the front and léger on the back, and on adding (light, la lumière) you want to sort the French words nouns-first, you could set the sorter property to something like articles = ['le ', 'la ', 'les ', 'l\\'']\n\nif any(entry.startswith(article_in_entry := article) for article in articles):\n return (0, entry.removeprefix(article_in_entry))\n\nreturn (1, entry), which corresponds to the following code:

articles = ['le ', 'la' , 'les ', 'l\'']

if any(entry.startswith(article_in_entry := article) for article in articles):
    return (0, entry.removeprefix(article_in_entry))

return (1, entry)

Warning: the code is exec-ed, do it at your own risk.

The default is alphabetical sorting.

Warnings

This add-on monkey-patches the Collection.add_note method. It should not affect other cards, but if it does, please report an issue.

A drawback of this add-on is that it creates 2 separate basic cards for each word-meaning pair, so if you make a typo, for example, you have to correct both cards.

Changelog

  • 2.0.1 [current]
    • added ability to configure custom sorter
  • 2.0.0
    • added Type field to the card
  • 1.0.2
    • now only cards in the same deck as the added card are updated
  • 1.0.1
    • notes preserve tags now
    • X-DupliCard note type is added on installation
    • fixed cursor jumping to the next field while adding a card
  • 1.0.0

README

Anki DupliCards

An Anki add-on allowing you to merge cards while adding them.

Use case

Assume you're learning French and you create the following cards:

  • front: voler, back: to fly
  • front: voler, back: to steal
  • front: piquer, back: to steal

Now, if you're shown voler, it'd be nice if you knew both meanings. And vice versa, if you're shown to steal, you should know both French words.

You could edit an already existing card to add a second meaning, but that would be tedious and not update the scheduler.

This add-on solves the problem. For every card added, it searches for cards with the same front or back, then updates those cards and marks them as new. So in the above situation, you would have 4 cards:

  • front: voler, back: to fly, to steal
  • front: piquer, back: to steal
  • front: to fly, back: voler
  • front: to steal, back: voler, piquer

Adding (piquer, to sting) would update the back of the second card to to steal, to sting, and add a new card (to sting, piquer).

How to use

The add-on only merges the cards of the note type X-DupliCard. This type will be added on startup, if it doesn't exist. Functionally it's the same as the basic card, except it also has the Type field, which can be used to distinguish the "sides" of the card. The type can be either FB (front-back) or BF (back-front).

Configuration options:

sorter

Code for custom sorting. It should be a valid Python function body. The function will be passed as key argument to the .sort() method called on a list of texts in the card. The text will be passed to the function as the entry argument.

For example, if you have a card with light on the front and léger on the back, and on adding (light, la lumière) you want to sort the French words nouns-first, you could set the sorter property to something like articles = ['le ', 'la ', 'les ', 'l\\'']\n\nif any(entry.startswith(article_in_entry := article) for article in articles):\n return (0, entry.removeprefix(article_in_entry))\n\nreturn (1, entry), which corresponds to the following code:

articles = ['le ', 'la' , 'les ', 'l\'']

if any(entry.startswith(article_in_entry := article) for article in articles):
    return (0, entry.removeprefix(article_in_entry))

return (1, entry)

Warning: the code is exec-ed, do it at your own risk.

The default is alphabetical sorting.

Warnings

This add-on monkey-patches the Collection.add_note method. It should not affect other cards, but if it does, please report an issue.

A drawback of this add-on is that it creates 2 separate basic cards for each word-meaning pair, so if you make a typo, for example, you have to correct both cards.

Changelog

  • 2.0.1 [current]
    • added ability to configure custom sorter
  • 2.0.0
    • added Type field to the card
  • 1.0.2
    • now only cards in the same deck as the added card are updated
  • 1.0.1
    • notes preserve tags now
    • X-DupliCard note type is added on installation
    • fixed cursor jumping to the next field while adding a card
  • 1.0.0