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

Auto cloze from a wordlist.txt #68

Open
michaelsjackson opened this issue May 31, 2020 · 3 comments
Open

Auto cloze from a wordlist.txt #68

michaelsjackson opened this issue May 31, 2020 · 3 comments

Comments

@michaelsjackson
Copy link

First, thanks for sharing your work, discovered Anki just a few days ago, was looking which tools exist for it already, found also your tool, looks promising, from its style I like it most, as very simple structure, simple than anki-editor for org-mode for example.

  • [Ubuntu 18.04 ] Operation system
  • [.org, meaning text ] Original file type

Now, I had following idea, how would it be if you could specify a wordlist.txt file with a list of words in it, one word per line, and org_to_anki would use this list to create "auto cloze" entries.

Example:
wordlist.txt contains for example the word:
Joe

Now having an input .org file as
* Joe is a great man.

And the script would convert it automatically to:

* {{c1::Joe}} is a great man.
# type=Cloze

Meaning, surrounding it with double paranthesis for cloze, always using c1:: for example, then in next line adding the type definition which is required for Cloze each time. # type=Cloze

This would allow us converting a set of sentences, quickly into Cloze questions, based on some wordlists.

Any tips and hints are welcome, thanks in advance. Keep up the great work.

@c-okelly
Copy link
Owner

c-okelly commented Jun 1, 2020

That should work perfectly.

You can also parse .txt files in exactly the same way. The file extension doesn't really change anything.

The # type=Cloze is required for each note though. It's is used in this case as a break between notes

@michaelsjackson
Copy link
Author

michaelsjackson commented Jun 2, 2020

Yeah, I tried a bit yesterday, when I have something working properly I can post it here as well.

However it would be cool if somehow this org_to_anki and anki-editor would be compatible to each other, I like your style more, so anki-editor should switch to this format, or your tool could offer a "anki-editor export" so you could continue in anki-editor, if wanted, not sure why, but there could be some reasons, now or in future. Just a format definition should not forbid combining those great tools.

One could start with your tool, then if the other tool has some more features to offer, quickly switch over there, add a few things there, export to Anki. Anki is anyway always the end target, org_to_anki or anki-editor are only helpers for reaching the target.

@michaelsjackson
Copy link
Author

michaelsjackson commented Jun 2, 2020

You can also parse .txt files in exactly the same way. The file extension doesn't really change anything.

Yes but I am already living in .org files. 😃
org-brain, obvz. Mainly for latex pdf generation.

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

No branches or pull requests

2 participants