Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an ability to store the content of the fields separately #33

Open
Stvad opened this issue Nov 20, 2018 · 3 comments
Open

Add an ability to store the content of the fields separately #33

Stvad opened this issue Nov 20, 2018 · 3 comments

Comments

@Stvad
Copy link
Owner

Stvad commented Nov 20, 2018

Possibly some other parts of the deck as well.

The inspiration is https://github.com/OnkelTem/anki-dm

Use cases:

@aleksejrs
Copy link

Hi, is the above issue (evolverine/covid-19-anki-deck#6) a result of what this one is about?

@aplaice
Copy link
Collaborator

aplaice commented Apr 3, 2020

I don't think it's really what this issue is about.

AFAICT (based on the comparison with anki-dm of which I'm a happy-ish user (as part of anki-ultimate-geography), though I'd be happier if this functionality were part of CrowdAnki itself (and yes, I've been thinking about trying to implement this)) this issue is about splitting out the contents of the fields into, (probably) a separate file, where they could be stored in an arguably more readable format, say CSV (rather than as a list of JSON objects, as is the case now).

AFAICT your problem is that you add a field to all the notes in the upstream deck and when you update, your newly added field is removed (since it's not present upstream).

What I think might help you most would be #62, which would allow for some fields to be ignored on import/export.

Depending on exactly how #62 is implemented (I don't remember what exactly is the current consensus in that thread and the linked PR), if say "method 1." is used, it might allow you to simply add several lines to the "flds" object in the relevant note model(s), along the lines of:

        {
          "name": "MorphMan_FocusMorph",
           [...]
          "doNotImport": true
        }

You'd probably need to keep this tiny patch rebased on top of the latest master, but since most of the updates would be in the content, further down in the file, it shouldn't be particularly hard. (What this issue (33) might help with, is having all of the updates to the content happening in a separate file (or files), hence allowing for clean rebases.)

(If yet another, not currently suggested, approach is used, allowing for each end-user to set ignorable fields (externally to deck.json) then you wouldn't even need to keep rebasing such a patch.)


BTW thanks for bringing up covid-19-anki-deck to my attention! :)

@ohare93
Copy link
Contributor

ohare93 commented Apr 4, 2020

I agree with @aplaice, this is not relevant to your issue @aleksejrs. I commented on that issue with my thoughts, as I am also a user of Morphman 👍 Let's talk there, to keep this issue clean.

Totally agreed with your thoughts on #62 @aplaice. I have a dirty working version of "Personal Fields" being ignored on import in #72, which I hope to expand in the coming weeks. Happy to discuss how it should work in the meantime, especially if you also want to take a shot at it! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants