What is the easiest way to import QA text files in Anki?

Hi guys
I have cards in the QA format that Supermemo likes
Other than importing them there and then exporting them as XML so I can import them in Anki, is there a direct way to import these (even with some search and replace editing to add delimiters etc etc)
The Q&A lines have either text or HTML snippets that Supermemo was able to render
Is Anki going to have an issue with that ?

Thank you


Anki can treat text imported from text files as HTML (the language used for web pages). This means that text with bold, italics and other formatting can be exported to a text file and imported again. If you want to include HTML formatting, you can check the “allow HTML in fields” checkbox when importing. You may wish to turn this off if you’re trying to import cards whose content contains angle brackets or other HTML syntax.

What the doc is not clarifying is what happens in a situation like mine when I have
Q: How do you import SM txt files in QA format in SM
A: Save the text in a location Anki can access
A: Go to File menu
A: Click on import
A: Select …whatever

My QA are formated like that -When SM imports them all the A lines are inserted in the back of the card.
Could you point me to the section of the documentation that explains these aspects? The HTML import becomes a secondary question as the main import fails, formatting becomes less important if you lose content during the import

I have tried to trick Anki by replacing “CR/LFA:” in my file with |A:
That practically got me a file with all the Q and As in one line per Q with a pipe as separator
Importing that is still failing

PS: the XML import i failing as well
Import failed
Debug info:
int() argument must be a string a bytes-like objector a number not a NoneType

This is for XML generated by SM16

Try to implement a minimal working example csv file e.g.

question;answer;more text

Adjust your input. Use the separator consequently.

1 Like

If you are unable to modify the content yourself, i.e. as advised earlier moving the Questions to the Front column in a spreadsheet and all the Answers to the Back column of a spreadsheet, then you might try (this solution)[Import from SuperMemo to ANKI is EASY - marjur - com.googlegroups.ankisrs - MarkMail].

I had to modify my program that extracts the Q&A from the text I previously read to export also in the Anki CSV format.
What you suggested should not be needed if Anki would be able to import SuperMemo 2016 XML.

The XML importer was contributed by an Anki user, and it’s possible that it doesn’t support some SuperMemo files. Contributions are welcome.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.