Hi Daniel,

I'd also be interested in a similar functionality. I'd like to call
"something" from java code, that enters new entries in one or other
mnemosyne db.

But, I've done nothing with python this far, so I'm not sure what are
you proposing? Do you say that I could write a python script that you
outline. And I could call it say from java and feed the command line
parameters to this additional script, so that it imports my Q&A file?
I do not need to write it as mnemosyne plugin or something - plain
standalone script as far as it references mnemosyne library and
correct file name?

Other things is - I do not see "category" as parameter. Is it an
optional paramater somewhere? or how do I get it in the game?

Thanks a lot
Normunds

On Feb 4, 8:21 am, daniel daniel <[email protected]> wrote:
> If you add:
> ---------------------------------------------------------------
> parser.add_option("-f", "--file", dest="filename",
>                   help="read from input FILE")
> ---------------------------------------------------------------
> to the parse options, you're set.
>
> On Thu, Feb 3, 2011 at 10:59 PM, daniel daniel <[email protected]> wrote:
> > Actually, i read the code. Here is one way you can do it (depending on
> > your sys.platform):
>
> > [ 1. setup path variables basedir ]...
> > basedir = os.path.join(unicode(os.path.expanduser("~")), "Library", 
> > "Mnemosyne")
>
> > [ 2. import ]...
> > import_txt(os.path.join(basedir, "110203code.txt"), 3, False)  #
> > 110203code.txt or your file name in basedir
>
> > # Mnemosyne will return an instance of mnemosyne.core.Item"
>
> > [ 3. save the database to disk ]...
> > save_database(os.path.join(os.path.expanduser("~"), ".mnemosyne"))
>
> > [ Conclusion ]...
> > Instead of going through the gui, it's more convenient to have a script
> > that takes your filename as one of its arguments to load without having
> > to go through the gui.
>
> > 2na.
>
> > On Thu, Feb 3, 2011 at 5:43 PM, Nick B <[email protected]> wrote:
> >> You can import text files.  Just make it plain text, one card per
> >> line.  Put the question first and the answer after a tab.  You have to
> >> run the gui to import the file.
>
> >> Nick
> >> (please excuse any errors, this was written on an iPad)
>
> >> On Feb 3, 2011, at 17:35, iiNa <[email protected]> wrote:
>
> >>> Can someone please spell out to me - since I am not very skilled with
> >>> either python or programming to be able to sort out gui-specific code
> >>> - and, tell me how i can feed my notes into mnemosyne from a script
> >>> (in other words, just from the command line) so i can put my notes
> >>> more speedily into mnemosyne? I'm thinking that it would really help
> >>> me study if i could just *bam* store my notes into mnemosyne and have
> >>> it automatically quiz me at different times throughout the day...
>
> >>> How might i code this myself?
> >>> Thank you.
>
> >>> two-
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups 
> >>> "mnemosyne-proj-users" group.
> >>> To post to this group, send email to 
> >>> [email protected].
> >>> To unsubscribe from this group, send email to 
> >>> [email protected].
> >>> For more options, visit this group 
> >>> athttp://groups.google.com/group/mnemosyne-proj-users?hl=en.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups 
> >> "mnemosyne-proj-users" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to 
> >> [email protected].
> >> For more options, visit this group 
> >> athttp://groups.google.com/group/mnemosyne-proj-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"mnemosyne-proj-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/mnemosyne-proj-users?hl=en.

Reply via email to