Giter Club home page Giter Club logo

mergenotes's Introduction

Menu

Merge Notes

Rate on AnkiWeb Patreon Matrix GitHub

Suppose you have a subs2srs deck. Due to the way subs2srs works usually many sentences in the deck are split between multiple notes. This addon adds a button to the Anki Browser that allows you to merge contents of selected cards.

I recommend converting all notes to one note type before merging them. The add-on will ignore the fields that are present in one note but are not present in the other.

Features

  1. Merge or duplicate selected notes.
  2. Change settings before merging. To open quick settings, click "Edit" > "Merge Notes Settings" in the Anki Browser.
  3. Ability to specify a field separator. You can decide what string is inserted as a separator between the merged fields.
  4. Merge tags of selected cards.
  5. Delete original notes after merging.
  6. Choose direction of the merge: by Due number, by Sort Field or by Sort Field (numeric). The latter checks if there's a number in the field and sorts by the number first.
  7. Merge in reverse order.
  8. Skip non-empty fields to perform a partial merge.
  9. Merge duplicate notes. Go to "Browser" > "Notes" > "Find duplicates", search duplicates and click "Merge duplicates" after the search has finished.

Installation

The addon can be installed from Ankiweb, or manually:

git clone 'https://github.com/Ajatt-Tools/mergenotes.git' ~/.local/share/Anki2/addons21/mergenotes

Configuration

To configure the add-on, open the Anki Add-on Menu via "Tools" > "Add-ons" and select "mergenotes". Then click the "Config" button on the right-side of the screen.

Most of the settings can be accessed by opening the Anki Browser and selecting "Edit" > "Merge Notes Options...". Before merging duplicates, I recommend enabling the "Delete original notes" option.

Field separator is the string inserted between the merged fields. It is empty by default, but you can change it to a space, comma or any HTML tag like <br>. You can also use escaped characters like "\n" or "\t" to insert a linebreak or tab.

Screenshots

Merge notes

screenshot

Merge duplicates

screenshot

mergenotes's People

Contributors

leoniehagel avatar tatsumoto-ren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mergenotes's Issues

Can't order by Sort Field correctly

Hi, Expert,

I have been using this add-on for over 1 year, thanks for your excellent addon.

I have a lot of dialog sentences to merge, sentence order is very import. But some times, it can work correctly, in other time it can't order by sort field. it seems exist bug. Could you help me to correct this bug? Thanks a lot.

follows:

1

Could you add a option for "RETURN"

Dear author,

I have merged a lot of dialogue sentences, but all the sentences in a same line, It seems rather messy. Could you please add a RETURN parameter?

By the way,according to description , cards are sorted by their "due number" , Could you tell me where can I find the field "due number" ? or can support sorted by "sorted field" in the browser.

Thankds & Regards
Hipanda.

Can you remain only one note?

Thank you for you addon, It cant merge 3 notes into 1 note, It's really useful.

But afer merging , there still exit all the original notes, I need to delete redundant notes, could you remain only one note?

Maybe you can refer to ohter similar addon: 1482505492

Thanks a lot.

Return to the top of the browser after a merge

Hi.
I'm meeting a small trouble, but annoying one.

This is the image when I just to merge the notes.
I filtered my deck with some word and picked up all the notes that I have to merge.
Screenshot 2023-02-25 at 10 30 41

This is just after when I execute a merge.
Screenshot 2023-02-25 at 10 30 56

And this is the result after pushing a downward arrow key. If I push a up key, I get same result.
Screenshot 2023-02-25 at 10 31 13

I want move upward or downward from the line I merged. But the editor force me to go back to top of the list. After all, I have to go back again manually where I was working at.
This is acceptable when the number of the lines are small, but I have around a hundred pairs to merge. I have to scroll the list and find the next line to merge.

In the some previous version of this add on, this did not happen. Sorry. I do not know when this started to occur.
Also I'm not sure this is due to your addon or Anki itself.

cannot import name 'entsToTxt' from 'anki.utils' in 2.1.50

I've tried the git version of Anki and got the following error. I wonder if it will affect mergenotes when x.50 is released.

Anki 2.1.50 (627f9106)⁩
Python 3.9.9 Qt 5.15.2 PyQt 5.15.6

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/aqt/addons.py", line 239, in loadAddons
    __import__(addon.dir_name)
  File "/home/nik/.local/share/Anki2/addons21/1425504015/__init__.py", line 4, in <module>
    from . import merge_duplicates, merge_notes, settings_dialog, duplicate_notes
  File "/home/nik/.local/share/Anki2/addons21/1425504015/merge_duplicates.py", line 17, in <module>
    from .merge_notes import MergeNotes
  File "/home/nik/.local/share/Anki2/addons21/1425504015/merge_notes.py", line 11, in <module>
    from anki.utils import entsToTxt
ImportError: cannot import name 'entsToTxt' from 'anki.utils' (/usr/lib/python3.9/site-packages/anki/utils.py)

Merging cards with longest due date

I really like this add-on, but now I have a different problem... I want to merge cards from 2 different decks* and keep the "due date" od these cards. Unfortunately, every time I merge them, the "due date" is only from the newer cards kept (so my merged cards are all with "due date" NEW). I already tried to change my settings, but it doesn't want to work. I would be thankful if someone could help me.

  • Further explanation: I have a self deck with Joyo Kanji and downloaded one from shared decks. My goal is to merge them or rather only a certain information like radicals (I already changed the note-type so it's the same as my Joyo deck and deleted all fields I don't need). I would like to keep my already studied due dates because I don't want to start over again.

Auto merge duplicate notes

Hi,

Thank you for making this addon, it has been very helpful to me, and I love how particularly smart it is in dealing with duplicate data. I'm using Anki for language learning and it's not uncommon that decks contain the same information in different ways spread on multiple notes, so I'm merging mostly "duplicates". So I was wondering if it would be possible for you to add a feature to auto merge notes based on matching fields?

There is a similar addon that does something similar except it deletes notes instead of merging and that's not cool in terms of preserving data, I thought I'd link it in case it could be of help to you in implementing this.

If you can't or don't want to, I understand, and I appreciate the work you put in this addon already.

Thank you.

Allow true newline as field separator

Hey, this addon is super useful for someone restructuring 40 000 notes, so thanks for developing it!
One minor request: Your field separator allows <br>, but because of some transformations I'm doing with the merged cards, it would be easier if there was instead a true newline in the HTML source of the card. Would it be possible to add this, e.g. by using \n?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.