c-okelly / org_to_anki

Python3 module to convert Txt, Org or LibreOffice files into Anki decks
MIT License
64 stars 10 forks source link

Improvement: Multiple fields #27

Closed sandersantema closed 5 years ago

sandersantema commented 5 years ago

Say you have the following in your org file:

* Second Question
** Second Answer 
** Front hint test 

Which results in the generation of the following card (or note, always forget the anki terminology):

image

It would be nice if you could for instance put the following in your org file:

 * Second Question
 ** Second Answer 
 # field='Front Hint'
 ** Front hint test 

And have the plugin generate the following card:

image
c-okelly commented 5 years ago

I would have to have a think about this tbh.

Would want to make sure whatever design decision is made in the code is supportable and extensible in the future though it is a good idea overall and doesn't add too much complexity.

I think the style org style your are suggesting probably makes the most sense though.

c-okelly commented 5 years ago

The code is completed in branch feature/support-multiple-feild-types and unit tested.

I will hopefully have the documentation update this afternoon, will do some manual testing and will then release. Feel try to try it out on the branch before that.

I decided to go with the following syntax.

* Second Question
** Second Answer 
# fieldType=Front Hint
** Front hint test 

Logic behind this was as follows:

c-okelly commented 5 years ago

Closed by #36

sandersantema commented 5 years ago

I think you’ve implemented this very well as far as I can see, it atleast seems to fully suit my needs! Unfortunately I’m knee deep in ny exams atm, however I plan on using Anki and org_to_anki for Anki card creation for other stuff/ uni after my exams. I’ll report back than, or if I find some time I’ll try it out a little earlier.

I might have the basis for something useful too, a script to convert markdown files to org files which are compatible with org_to_anki. Although this script is currently very specific to my setup, hacky and written in fish script. I prefer markdown files as I can use the marktext markdown editor with it’s live preview of math formula’s which is really nice. Or I can edit it in my preferred editor which is neovim😉Which has nice support for markdown while it Obviously doesn’t handle org files well.

In any case thanks for the quality software.

c-okelly commented 5 years ago

I would be open to a look at some of the code and maybe even adding markdown parsing support in future if I can see a solid use case.

Would require a decent bit of testing but should be possible!

Thanks for the feedback anyway!