Changing audio format for all cards

19 views
Skip to first unread message

El_Pablo

unread,
Oct 8, 2015, 4:43:50 AM10/8/15
to mnemosyne-proj-users
Hi
Few years ago I decided I want to use .ogg files as my default mnemosyne audio format. At that point I was mainly using Ubuntu and it did work really well.
Over the time I switched to OSX where the ogg format is not supported and I'd like to change the audio format to something which is supported by the OS.
Converting all the audio files to other formats is relatively easy part as there is a lot of tools which can do it. I could even write a simple bash/python script which would do it.
However I have no clue how to change the media format in the mnemosyne database.
Which mnemosyne table would I need to update to change file name location, eg. elements/31/5/46.ogg to elements/31/5/46.mp3.
I've had a look and found media table which consist only two columns filename and _hash. Would that be the one I need to update. What's about the _hash column?
I'd appreciate any help.
Regards
Tomasz

Peter Bienstman

unread,
Oct 8, 2015, 10:26:28 AM10/8/15
to mnemosyne-...@googlegroups.com

Hi,

 

The easiest is to use the libmnemosyne API to make sure all the side-effects fire.

 

There is an example script here:

 

http://bazaar.launchpad.net/~peter-bienstman/mnemosyne-proj/trunk/view/head:/mnemosyne/mnemosyne/example_scripts/find_and_replace.py

 

Note that this requires Mnemosyne to be installed in the system Python path, which is how it’s installed under Linux by default. (And which incidentally should also be a way to install the latest Mnemosyne version on Mac).

 

Cheers,

 

Peter

 

--
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 mnemosyne-proj-u...@googlegroups.com.
To post to this group, send email to mnemosyne-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/f491e6da-4765-483f-bb49-c08c46bdfccd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

El_Pablo

unread,
Oct 9, 2015, 1:39:45 AM10/9/15
to mnemosyne-proj-users
Hi Peter

Thanks for the answer!
I'll try it out today.

Cheers
Tomasz
Reply all
Reply to author
Forward
0 new messages