35 19
Sign in to rate

Duplicate Selected Notes

<10kB. Updated 2017-08-30.
The author has shared 62 other item(s).

Description

This add-on supplements the card browser by adding a keyboard shortcut and menu entry for creating duplicates of notes. USAGE Pressing the shortcut (Ctrl+Alt+C by default) or clicking on the Create Duplicate entry in the Edit menu will find all notes belonging to the selected cards and duplicate them in place. COMPATIBILITY Initial tests have shown this add-on to both work on Anki 2.0.x and Anki 2.1.x. However, as the Anki 2.1.x line of releases is still in beta, I cannot provide any kind of official support for this platform. Please do not report issues with Anki 2.1 in the review section below. Instead, please report all issues you encounter on GitHub. IMPORTANT NOTES CHANGES 2017-08-23 – Initial 2.1 compatibility 2017-08-06 – Refactored code 2016-04-30 – Duplications can now be undone via CTRL+Z (using Anki's default restoration points) SUPPORT Please do not report issues or bugs in the review section below, as I will not be able to reply to them nor help you. Instead, please report all issues you encounter either on GitHub, or by posting a new thread on the Anki add-on support forums while mentioning the name of the affected add-on in your thread title. CREDITS AND LICENSE Copyright (c) 2016-2017 Glutanimate This add-on is based on "Create Copy of Selected Cards" by Kealan Hobelmann. Licensed under the GNU AGPL v3. The code for this add-on is available on GitHub.

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:

2126361512

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons

Reviews

on 1638272255
Please don't downvote, it still works!
Just follow Option 1 posted on the comment from 26/11/2020, and it should be fine!
Anki version 2.1.35 here
on 1636831155
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeat until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site.
Debug info:
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-11-13 18:34:40

Caught exception:
Traceback (most recent call last):
File "C:\Users\***\AppData\Roaming\Anki2\addons21\2126361512\browser_create_duplicate.py", line 97, in <lambda>
a.triggered.connect(lambda _, b=self: onCreateDuplicate(b))
File "C:\Users\***\AppData\Roaming\Anki2\addons21\2126361512\browser_create_duplicate.py", line 100, in onCreateDuplicate
createDuplicate(self)
File "C:\Users\***\AppData\Roaming\Anki2\addons21\2126361512\browser_create_duplicate.py", line 60, in createDuplicate
model = note._model
File "anki\_legacy.py", line 52, in __getattr__
AttributeError
on 1636438127
FYI, did not work using Anki 2.1.48 on Win 10.
on 1629487911
The fix posted on 26/11/2020 really helped me. Thank you, dev and the contributive user. My version is 2.1.44, Window 10. I don't know whether it would work in the future because Anki seems to intrinsically hate duplicating
on 1621849719
does not work
on 1620319432
Error
Se ha producido un error. Por favor inicia la Anki manteniendo presionadas ples teclas Mayús y la flecha hacia abajo, lo que desactivará temporalmente los extensiones que tienes instaladas.
Si este error persiste sólo cuando tienes las extensiones activadas, utiliza Herramientas > Menú de Extensiones para deshabilitar alguna extensión y reinicia el Anki, repitiendo este proceso hasta que descubras qué extensión en concreto es la que causa el problema
Cuando hayas descubierto la extensión que causaba el problema, por favor informa de esto a [sitio de soporte de extensiones](https://help.ankiweb.net/discussions/add-ons/).
Información de depuración:
Anki 2.1.38 (355e4cd5) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.15.7
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-05-06 10:33:11
Complementos posiblemente implicados: ⁨Duplicate Selected Notes⁩

Caught exception:
Traceback (most recent call last):
File "/Users/sofiabarreiro/Library/Application Support/Anki2/addons21/2126361512/browser_create_duplicate.py", line 97, in <lambda>
a.triggered.connect(lambda _, b=self: onCreateDuplicate(b))
File "/Users/sofiabarreiro/Library/Application Support/Anki2/addons21/2126361512/browser_create_duplicate.py", line 100, in onCreateDuplicate
createDuplicate(self)
File "/Users/sofiabarreiro/Library/Application Support/Anki2/addons21/2126361512/browser_create_duplicate.py", line 64, in createDuplicate
mw.col.decks.get(deck)['mid'] = model['id']
File "anki/decks.py", line 229, in get
TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict'
on 1617880615
I appreciate your work, man. Keep on track! THX
on 1613468246
Not working on 2.1.39
on 1611822963
Does not work for Anki 2.35
on 1610838943
Worked fine but now I get (could be cause of morphman or migaku which are the addons I recently downloaded)
Debug info:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2021-01-15 21:19:54

Caught exception:
Traceback (most recent call last):
File "C:\Users\Sakariye\AppData\Roaming\Anki2\addons21\2126361512\browser_create_duplicate.py", line 97, in <lambda>
a.triggered.connect(lambda _, b=self: onCreateDuplicate(b))
File "C:\Users\Sakariye\AppData\Roaming\Anki2\addons21\2126361512\browser_create_duplicate.py", line 100, in onCreateDuplicate
createDuplicate(self)
File "C:\Users\Sakariye\AppData\Roaming\Anki2\addons21\2126361512\browser_create_duplicate.py", line 64, in createDuplicate
mw.col.decks.get(deck)['mid'] = model['id']
File "anki\decks.py", line 214, in get
TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict'
on 1610140552
does not work for 2.1 an error message occurred
on 1606383381
Thanks for fixing way. It works. I'm using Anki v2.35.

Option 1: For those who don't know how to edit. I made a copy of browser_create_duplicate.py file at this link https://anotepad.com/notes/6hrtdxfc

1. Open Anki and select Tools -> Add Ons
2. Select "Duplicate Selected Notes" so it is highlighted and choose the "View Files" button to the right.
3. Open up "browser_create_duplicate.py" - you can open it with Notpad, Sublime whatever
4. Go to this link below
https://anotepad.com/notes/6hrtdxfc
then, select all the text (CTRL + A) -> Copy it all
5. Go back to your open **browser_create_duplicate.py** -> select all the text (CTRL + A) -> delete & paste the code you copied from step 4
6. Save the file -> Restart Anki and you should be good to go!!
-------------------------------------------------------------------------------------
Option 2:
This fix worked to fix the error. For those not familiar with editing code, here is (hopefully) an easy to follow guide:

1. Open Anki and select Tools -> Add Ons
2. Select "Duplicate Selected Notes" so it is highlighted and choose the "View Files" button to the right.
3. Open up "browser_create_duplicate.py" - you can open it with Notpad, Sublime whatever
4. Go [here](https://github.com/zlodag/anki-addons-misc/blob/4478af6efd685cbbfd692b2fd3e9df2b288baaa2/src/browser_create_duplicate/browser_create_duplicate.py) -> select all the text (CTRL + A) -> Copy it all
5. Go back to your open **browser_create_duplicate.py** -> select all the text (CTRL + A) -> delete & paste the code you copied from step 4
6. Come back here and copy the text below (posted by @sasadangelo https://github.com/glutanimate/anki-addons-misc/issues/155)
```
# Refresh note and add to database
mw.col.addNote(note_copy)
note_copy.flush()
```
7. Go back into **browser_create_duplicate.py** and scroll down to line ~65 and you will find:
```
# Refresh note and add to database
```
8. Highlight "# Refresh note and add to database" _and the two lines of code below it_ -> delete & replace with the code you copied in step 6.
9. Save the file -> Restart Anki and you should be good to go!!
on 1605283223
Doesn't work on 2.1.35, use this one instead -> https://ankiweb.net/shared/info/1114271285
on 1605231951
This fix worked to fix the error. For those not familiar with editing code, here is (hopefully) an easy to follow guide:

1. Open Anki and select Tools -> Add Ons
2. Select "Duplicate Selected Notes" so it is highlighted and choose the "View Files" button to the right.
3. Open up "browser_create_duplicate.py" - you can open it with Notpad, Sublime whatever
4. Go [here](https://github.com/zlodag/anki-addons-misc/blob/4478af6efd685cbbfd692b2fd3e9df2b288baaa2/src/browser_create_duplicate/browser_create_duplicate.py) -> select all the text (CTRL + A) -> Copy it all
5. Go back to your open **browser_create_duplicate.py** -> select all the text (CTRL + A) -> delete & paste the code you copied from step 4
6. Come back here and copy the text below (posted by @sasadangelo https://github.com/glutanimate/anki-addons-misc/issues/155)
```
# Refresh note and add to database
mw.col.addNote(note_copy)
note_copy.flush()
```
7. Go back into **browser_create_duplicate.py** and scroll down to line ~65 and you will find:
```
# Refresh note and add to database
```
8. Highlight "# Refresh note and add to database" _and the two lines of code below it_ -> delete & replace with the code you copied in step 6.
9. Save the file -> Restart Anki and you should be good to go!!
on 1604079025
Thank you for your addon. I was inspired by your addon to make my own note duplicate/reposition addon. I credited your addon in the page. https://ankiweb.net/shared/info/1114271285
on 1602351045
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.13.6
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-10-10 15:56:46
Add-ons possibly involved: ⁨Duplicate Selected Notes⁩

Caught exception:
Traceback (most recent call last):
File "/Users/albertwoland/Library/Application Support/Anki2/addons21/2126361512/browser_create_duplicate.py", line 97, in <lambda>
a.triggered.connect(lambda _, b=self: onCreateDuplicate(b))
File "/Users/albertwoland/Library/Application Support/Anki2/addons21/2126361512/browser_create_duplicate.py", line 100, in onCreateDuplicate
createDuplicate(self)
File "/Users/albertwoland/Library/Application Support/Anki2/addons21/2126361512/browser_create_duplicate.py", line 64, in createDuplicate
mw.col.decks.get(deck)['mid'] = model['id']
File "anki/decks.py", line 214, in get
TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict'
on 1600889456
Causes error message in 2.1. Doesn't work
on 1599157727
An error occurred
on 1598582374
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.31 (13476503) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-08-27 22:44:33

Caught exception:
Traceback (most recent call last):
File "C:\Users\maced\AppData\Roaming\Anki2\addons21\2126361512\browser_create_duplicate.py", line 97, in <lambda>
a.triggered.connect(lambda _, b=self: onCreateDuplicate(b))
File "C:\Users\maced\AppData\Roaming\Anki2\addons21\2126361512\browser_create_duplicate.py", line 100, in onCreateDuplicate
createDuplicate(self)
File "C:\Users\maced\AppData\Roaming\Anki2\addons21\2126361512\browser_create_duplicate.py", line 64, in createDuplicate
mw.col.decks.get(deck)['mid'] = model['id']
File "anki\decks.py", line 209, in get
TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict'
on 1597931888
Unfortunately, the addon doees not work on my system.

Fehler
Es ist ein Fehler aufgetreten. Bitte starten Sie Anki neu und halten Sie während des Startvorgangs die Umschalttaste gedrückt, damit Anki die installierten Erweiterungen temporär deaktiviert.
Wenn das Problem nur auftritt, wenn die Erweiterungen aktiviert sind, dann benutzen Sie bitte den Menueintrag Extras > Erweiterungen um die problembehaftete Erweiterung durch selektives Deaktivieren herauszufinden.
Wenn Sie die entsprechende Erweiterung herausgefunden haben, dann bitten wir, dass Sie sich mit einem entsprechenden Problembericht an die Support-Seite für Erweiterungen wenden, damit der Fehler behoben werden kann.
Debuginformationen:
Anki 2.1.30 (06a69c25) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.15.6
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-08-20 15:42:47
Möglicherweise beteiligte Erweiterungen: ⁨Duplicate Selected Notes⁩

Caught exception:
Traceback (most recent call last):
File "/Users/user/Library/Application Support/Anki2/addons21/2126361512/browser_create_duplicate.py", line 97, in <lambda>
a.triggered.connect(lambda _, b=self: onCreateDuplicate(b))
File "/Users/user/Library/Application Support/Anki2/addons21/2126361512/browser_create_duplicate.py", line 100, in onCreateDuplicate
createDuplicate(self)
File "/Users/user/Library/Application Support/Anki2/addons21/2126361512/browser_create_duplicate.py", line 64, in createDuplicate
mw.col.decks.get(deck)['mid'] = model['id']
File "anki/decks.py", line 194, in get
TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict'
on 1596922550
Works like charm
thanks Glutanimate
on 1595158841
It works perfectly
on 1593907785
Great! Thanks.
on 1593690606
Brilliant!
to quickly create a new note, based on an old note, instead of copying /pasting field by field...
thanks!
on 1592468415
yes
on 1592156427
Thank you for this, it works!
on 1587706204
Awesome
on 1587227880
works like wonders👌
on 1587227783
mucho gracias mate
on 1587122850
people talked about copy notes. PLEASE DO NOT COMPARE ADD-ONS. THEY ARE FREE, USE THEM AND ENJOY THEM. GITHUB TO BE USED FOR ERROR REPORTING. INSTEAD YOU SHUD BE THANKING THE AUTHOR NOT DOWNVOTING
on 1587122682
Much appreciated, does the trick
on 1587122615
Appart from the error mentioned by previous reviews, this is actually an ace add-on
on 1587080944
Not the best unfortunately
Comment from author
Thanks for the quadruple downvotes, folks! Next time please be so kind and use the contact links in the support section above to report issues. Even if it's an issue that has been reported before, it doesn't hurt to leave a comment on the issue tracker to bring this back to my attention and to add more debug information. Also, just for future reference: None of the add-on authors or deck creators on here are under any obligation to provide you with these free resources. Most of us do this in our free time. Downvote barrages like this just discourage us from continuing to do so.

As for the actual issue at hand: I will get to it, eventually. This is an add-on that doesn't have as big of a userbase, so I have to prioritize the little time I have on other add-ons.
on 1587080878
Copy Notes is miles better. Author hasnt fixed a reported bug that has been there for a while
Comment from author
Thanks for the quadruple downvotes, folks! Next time please be so kind and use the contact links in the support section above to report issues. Even if it's an issue that has been reported before, it doesn't hurt to leave a comment on the issue tracker to bring this back to my attention and to add more debug information. Also, just for future reference: None of the add-on authors or deck creators on here are under any obligation to provide you with these free resources. Most of us do this in our free time. Downvote barrages like this just discourage us from continuing to do so.

As for the actual issue at hand: I will get to it, eventually. This is an add-on that doesn't have as big of a userbase, so I have to prioritize the little time I have on other add-ons.
on 1587080760
An error pointed out by a colleague. Apparently been there since June 2018
Comment from author
Thanks for the quadruple downvotes, folks! Next time please be so kind and use the contact links in the support section above to report issues. Even if it's an issue that has been reported before, it doesn't hurt to leave a comment on the issue tracker to bring this back to my attention and to add more debug information. Also, just for future reference: None of the add-on authors or deck creators on here are under any obligation to provide you with these free resources. Most of us do this in our free time. Downvote barrages like this just discourage us from continuing to do so.

As for the actual issue at hand: I will get to it, eventually. This is an add-on that doesn't have as big of a userbase, so I have to prioritize the little time I have on other add-ons.
on 1587080670
Gives an error when i duplicate cards of different Note Types
on 1582497812
Works perfectly
on 1580977647
Works fine, but there's no "duplicate" tag or something so its hard to find them after they got mixed up.
edit: create deck(ctrl+d) works the same way. try it
on 1577921061
works
on 1575321977
Very useful to me!
on 1568289885
Thanks so much for creating this add-on. It works perfectly with Mandarin cards and saves me so much time. My only complaint is that I couldn't find it on the Anki Shared Decks page. Thank goodness I thought of searching on the Internet. Bless you.
on 1563205849
Just what I needed!
on 1562476902
Works nicely on Anki 2.1.
on 1559223881
doesnt work on 2.1
on 1549802021
Works well with russian characters!
on 1543842045
Awesome as usual. Much love for your work, mate! Cheers!
on 1541092880
Works great on Anki 2.1 on Mac. Thank you!
on 1539497053
Add-on worked perfectly for me as described.
on 1534472366
Works well, including with Chinese chars, including with audio files attached. Very useful, many thanks!
on 1532509581
It doesn´t support Chinese characters and it didn´t duplicate the audio files attached to the cards! It´s a pity because the rest of the addon seems to be working perfectly but because of this it was useless for my purposes. :)
Comment from author
Would be nice if you could file a bug report, as requested in the add-on description: https://github.com/Glutanimate/anki-addons-misc/issues. Attaching a sample deck of a few cards that exhibit this behaviour would also help. I can't test the add-on against all languages. It's simply not feasible time-wise. :)
on 1523059200
Very helpful.
on 1521763200
thanks man
on 1520467200
Exactly what I needed!