Hi,

On Windows and Mac, the installer is a self-contained copy of Python and 
Mnemosyne which contains everything you need to run it.

In order to get access to the scripting capabilities on that platform, you need 
to install the linux tarball in such a way that the libraries are installed in 
your system's Python installation. You also need to take care of all the 
dependencies.

Since I don't have access to a Mac, I cannot give concrete instructions, but 
hopefully this is enough to get you started.

Cheers,

Peter

> -----Original Message-----
> From: [email protected] [mailto:mnemosyne-
> [email protected]] On Behalf Of Benjamin Frazier
> Sent: 16 November 2014 21:57
> To: [email protected]
> Subject: [mnemosyne-proj-users] Automate inserting cards in the
> Mnemosyne database
> 
> 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 mnemosyne-proj-
> [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.

-- 
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/006301d00242%24499e1ba0%24dcda52e0%24%40UGent.be.
For more options, visit https://groups.google.com/d/optout.

Reply via email to