I would really like to automate the process of inserting cards into the
Mnemosyne database on my Mac. I found the following code from the
example_scripts folder after downloading Mnemosyne for Linux:
---- 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,
--
You received this message because you are subscribed to the Google Groups
"mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mnemosyne-proj-users/7067e59b-c39d-47e0-99b4-87eb3545a6ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.