soshial / xdxf_makedict

XDXF — an open and free dictionary format, that stores word articles in a structural and semantic way. The most convertible format
223 stars 54 forks source link

How can I add image to XDXF file? #42

Closed dongta11721 closed 2 years ago

dongta11721 commented 2 years ago

Hello! Please help me to add image into xdxf! The image is in the same directory of xdxf file.

Thank!

nikita-moor commented 2 years ago

Image: <rref lctn="picture.png" type="image/png" />. Doesn't it work?

dongta11721 commented 2 years ago

Thank for response, nikita-moor. I tried your tags but It did not work. It shows nothing. I don't know what happen. Please help me ! Thank you

nikita-moor commented 2 years ago

You better be more specific. XDXF is just a file format. When you say "It did not work" you mean that a dictionary shell (GoldenDict, Alpus?) does not parse it correctly (i.e. does not show the image). Then, it is not a problem of the format but of implementation. You could try preparing an example and submitting an issue to the appropriate application (GoldenDict is here).

For example: xdxf-image.zip.

Opening the example in GoldenDict, you can see that it does not support new version of XDXF, so you need to code your images old-way as <img src="cat.png" />:

Screenshot_2022-01-31_08-28-02

If your goal is Alpus then you will need to compress all images into a zip file (I don't remember filename convention).

soshial commented 2 years ago

Thanks, @nikita-moor, I think this is the right explanation, why it doesn't work as of now.