---- code ---
from mnemosyne.script import Mnemosyne
# 'data_dir = None' will use the default system location, edit as
appropriate.
data_dir = None
mnemosyne = Mnemosyne(data_dir)
for format in self.mnemosyne.component_manager.all("file_format"):
if format.__class__.__name__ == "Mnemosyne2Cards":
format.do_import(filename)
mnemosyne.finalise()
--- end code ---
What I would like to know is how I could use this python script to automatically insert cards in my Mnemosyne database with an answer and question (I really just need one example). I realize that I could just use python add_card.py to add run the python script but I get the following error when I do this:
--- error -------
Traceback (most recent call last):
File "add_card_copy.py", line 5, in <module>
from mnemosyne.script import Mnemosyne
ImportError: No module named mnemosyne.script
---end error ----
My question is, How can I add the mnemosyne.script file in the same folder that I have the add_cards.py file in order to automatically insert cards into my Mnemosyne database?
Thanks,
> email to mnemosyne-proj-users+unsub...@googlegroups.com.