Getting image path right for Mnemosyne + Mnemogogo + Mmenododo

34 views
Skip to first unread message

warren...@gmail.com

unread,
Mar 4, 2014, 3:15:38 AM3/4/14
to mnemosyne-...@googlegroups.com
Hi all, I'm trying to get my cards working on my Android phone but the embedded images are not appearing. When I edit the cards on my Linux box, I see these tags:
<IMG src="merge-4_1.jpg"/> etc.

From here I export to a separate folder on my Linux box using Mnemogogo and then copy the folder over to the phone. What I'm seeing in the CARDS file that is generated is:
<IMG src="file:///home/wkt/.local/share/mnemosyne/default.db_media/merge-4_1.jpg"/>, and of course this absolute pathname doesn't exist on the phone.

Obviously I'm making a newbie mistake here. Can someone hit me with a cluebat. Alternatively, can someone tell me what the <IMG src> tag should look like and I'll edit the CARDS file with sed and fix it.

Many thanks in advance, Warren

Gnome

unread,
Mar 4, 2014, 11:54:34 AM3/4/14
to mnemosyne-...@googlegroups.com, warren...@gmail.com
Hello, I would use the latest release candidate of mnemosyne 2.3 instead, the download links are in this thread:

However, you need to install python-webob for that version to work, 
heres a version where you don't need to install that:

Timothy Bourke

unread,
Mar 4, 2014, 2:46:18 PM3/4/14
to mnemosyne-...@googlegroups.com
* warren...@gmail.com <warren...@gmail.com> [2014-03-04 00:15 -0800]:
> Hi all, I'm trying to get my cards working on my Android phone but the
> embedded images are not appearing. When I edit the cards on my Linux box,
> I see these tags:
> <IMG src="merge-4_1.jpg"/> etc.

Could you please try renaming one or two of these tags to lowercase,
i.e.,
<img src="merge-4_1.jpg"/>

And seeing whether they are correctly exported to the IMG/
subdirectory?

> >From here I export to a separate folder on my Linux box using Mnemogogo
> and then copy the folder over to the phone. What I'm seeing in the CARDS
> file that is generated is:
> <IMG
> src="file:///home/wkt/.local/share/mnemosyne/default.db_media/merge-4_1.jpg"/>,
> and of course this absolute pathname doesn't exist on the phone.

That's right. Mnemogogo nearly always takes care of this properly (for
a few years now). I'm surprised that this problem is occurring.

Did you enter those IMG tags manually, or using the standard Ctrl-I
technique?

> Obviously I'm making a newbie mistake here. Can someone hit me with
> a cluebat. Alternatively, can someone tell me what the <IMG src> tag
> should look like and I'll edit the CARDS file with sed and fix it.

The alternative is to patch Mnemogogo; core.py, lines 143, to:
re_img_split = re.compile(r'(<img.*?>)', re.IGNORECASE)

Tim.

signature.asc
Reply all
Reply to author
Forward
0 new messages