musically-ut / anki-slides-import

📇 Import pdf slides + text notes into Anki.
MIT License
25 stars 4 forks source link

Multiple field support on import in Anki #4

Open ambein opened 8 years ago

ambein commented 8 years ago

I want to find out about the parser and if there is a syntax for identifying different fields in the text based slide notes.

Also, I am wondering if there is a way to combine (append) the image from a slide with text notes. And if there is a way to include images (or references to images) in the text based slide notes.

musically-ut commented 8 years ago

Hi! Thanks for the issue. :)

Could you give me an example of what you mean by:

different fields in the text based slide notes

I am also not sure I fully follow what you mean by combine and reference. Examples there would also help.


As a side-note, have you looked at the occlusion plugin for making Anki flash cards out of images? Is that what you meant by having text-notes combined with the images or vice-versa?

ambein commented 8 years ago

Hello Utkarsh,

No problem, I will try and clarify my questions here. Later I can edit/modify my issue/request so that it is more clear.

Anki stores records as Notes and uses templates associated with Note-types to generate different cards. Commonly one Note - one Card structures are used, however the reversible Question-Answer Note type is a good example of one to many structure in Anki, but the sky is the limit.

My goal is to generate Anki Notes with multiple questions in separate fields, where the answer is the slide from the PDF. That way I can use my templates in Anki to generate multiple Cards from the same Note.

An example text file containing the written notes (not the Anki Notes) would be:

Slide 1: F1- First question? F2- Second question? F3- E- Extra notes R- ``` Slide 4: F1- A different first question? F2- A different second question? F3- E- More extra notes R- ``` So in running slides2anki with this and the PDF of associated slides, is it possible to parse F1, F2, F3, E, and R into delimited fields of the resulting deckfile? If so, the importing to Anki would be easy, because those fields would be detected by Anki and then I could map them to the appropriate fields of my Anki Note-type. The other questions I had, related to “combining” fields and making references to different media sources. By combine I mean that one of the fields in my (above), such as the text following "E- " would be appended to the that is generated by slides2anki as “Extra notes”. By reference I am wondering if it possible to add additional media, perhaps appending it to the same field that the slide image is added to. This seems more complicated, and just an idea at this point. I am just looking into using regular expressions in the and then post processing the deck file generated by slides2anki, before importing into Anki. Unfortunately, I do not find the image occlusion plugin is not very functional, it is faster to manually generate occlusions with a basic image editor like Skitch and do a lot of cutting and pasting. But you are correct that image occlusion is a big part of the notes I want to generate, however not the only type. Being able to generate multiple question cards for a given slide is a big help. I appreciate finding your program and it should be very useful as is, even if I cannot find a way to do what I am proposing. Thank you! Magnus > Hi! Thanks for the issue. :) > > Could you give me an example of what you mean by: > > > different fields in the text based slide notes > > I am also not sure I fully follow what you mean by _combine_ and > _reference_. Examples there would also help. > > --- > > As a side-note, have you looked at the [`occlusion` > plugin](https://ankiweb.net/shared/info/2006541756) for making Anki flash > cards out of images? > Is that what you meant by having text-notes _combined_ with the images or > vice-versa? > > --- > > Reply to this email directly or view it on GitHub: > https://github.com/musically-ut/anki-slides-import/issues/4#issuecomment-187218099
musically-ut commented 8 years ago

Hi Magnus,

Thanks for the detailed comments.

The reason I didn't code in generation of several questions was because seeing the slide once is going to be a revision to all the questions. However, it will not be too difficult to add.

I see that you are very knowledgable about how Anki handles templates and imports CSVs. So I think I can program in another command line option which would separate out the text for each slide by lines and add them to a separate column with headers F1, F2, ..., 'E', 'R' etc. to the CSV file. Then I'll essentially be trusting the user to write the notes in the correct format.

Adding images is bit trickier because I would need to copy the images over to the User's profile and, thus, those fields would need special handling.

I am happy that you found this program useful and cared enough about it to create an issue. :)

~ ut

ambein commented 8 years ago

Hi again Utkarsh,

Thank you so much for considering my ideas/request.

I attached an example of the sort of notes I create, annotating the fields and content in regards to some of the things we are discussing.

I agree that handling additional images is tricky, and best to keep separate, focusing on formats for multi-field notes. My workflow with creating image occlusions is fairly fast despite being manual. It is impossible to automate everything, partly because the cards should be customized according to what the user wants to learn, and that means sifting through the slides and copying what is needed, and adding what is missing!

Please keep me posted and let me know if there is anything I might do to help.

Magnus

Hi Magnus,

Thanks for the detailed comments.

The reason I didn't code in generation of several questions was because seeing the slide once is going to be a revision to all the questions. However, it will not be too difficult to add.

I see that you are very knowledgable about how Anki handles templates and imports CSVs. So I think I can program in another command line option which would separate out the text for each slide by lines and add them to a separate column with headers F1, F2, ..., 'E', 'R' etc. to the CSV file. Then I'll essentially be trusting the user to write the notes in the correct format.

Adding images is bit trickier because I would need to copy the images over to the User's profile and, thus, those fields would need special handling.

I am happy that you found this program useful and cared enough about it to create an issue. :)

~ ut


Reply to this email directly or view it on GitHub: https://github.com/musically-ut/anki-slides-import/issues/4#issuecomment-187267172

musically-ut commented 8 years ago

I'm afraid I didn't receive the attachments you attached to your e-mail. Could you upload the example somewhere I can have a look at it (e.g. Imgur or Gist)?

Thanks!

~ ut

ambein commented 8 years ago

Try with this link:

http://132.206.196.163/owncloud/public.php?service=files&t=0245dc6326681938bb68278e05a522a4

I'm afraid I didn't receive the attachments you attached to your e-mail. Could you upload the example somewhere I can have a look at it (e.g. Imgur or Gist)?

Thanks!

~ ut


Reply to this email directly or view it on GitHub: https://github.com/musically-ut/anki-slides-import/issues/4#issuecomment-187306418

musically-ut commented 7 years ago

@ambein : does PR #6 by @barryridge address some of your issues?