openzim / overview

:balloon: Start here for current projects, how to get involved, and joining community calls. A resource for new and veteran members of the offline commmunity
2 stars 1 forks source link

Enable basic html formatting in content descriptor #11

Closed Popolechien closed 9 months ago

Popolechien commented 1 year ago

copy/paste from zimfarm/719

Some of our zim files have fairly long descriptions and we end up with a block of text. It would be convenient if in the Description field of recipes we could insert some basic HTML (e.g.
) so as to render this text in a more palatable format

Capture d’écran 2022-09-23 à 14 41 09

kelson42 commented 1 year ago

My two cents.

We have currently a "Description" which should be a "short sentence" but actually people put what should be in "LongDescription" wrongly in it.

This is mostly the fault of scrapers/zimfarm/readers which don't support "LongDescription" metadata so far properly.

Actually, the kiwix-serve welcone page should not have anyway so much texy displayed like this anyway. But that does not invalidate this ticket probably.

That said IMO, just allowing carriage returns in the LongDescription metadata might be good enough.

Allowing HTML would bring following problems:

kelson42 commented 1 year ago

One of the first things I want to do to handle the problem reported here is to clarify usage around metadata Title, Description and LongDescription. See https://wiki.openzim.org/wiki/Metadata

... and first given recommend max size. Here are the value on Google Play Store for the same Medata: image

@mgautierfr @Popolechien @mgautierfr Would we agree to take the three of them for our medata?

rgaudin commented 1 year ago

Good ; once this is all cleared-up, we'll be able to add support for it in the scrapers and the zimfarm

Popolechien commented 1 year ago

Yup. May want to increase the first one to 50 characters as we have quite a few zim titles that also include the series (e.g. Basic Concepts of Chemistry (Grade 11 Chemistry) which has 48 char.)

mgautierfr commented 1 year ago

Agree with @kelson42 proposition.

On extended the name to 50 chars, it raises the question of how such a long title is displayed. On library.kiwix.org, I've found Basic economics concepts | AP Macroeconomics | Khan Academy which is 59 chars. It is displayed on 3 lines. Limiting on the first 50 chars allow it to be displayed on 2 lines and the 30 first chars are displayed on one line.

If we have a clear distinction between short description and long description both long title could be split in title and short description:

Both title are less than 30 chars (27 and 24)

I think limiting title length force us to write clearer title/description and it would be better for the user.

kelson42 commented 1 year ago

I will go forward with this, 50 characters for the title seems too long and can not be displayed properly. ZIM content creator will have to be imaginative about how to short titles.

kelson42 commented 1 year ago

Specification updated

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

kelson42 commented 9 months ago

I close this ticket. Spec has been updated and most of the tooling as well. We shoukd have homogenous ZIM metadata now (at list for title, description and Longdescription).