Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable basic html formatting in content descriptor #11

Closed
Popolechien opened this issue Sep 23, 2022 · 9 comments
Closed

Enable basic html formatting in content descriptor #11

Popolechien opened this issue Sep 23, 2022 · 9 comments

Comments

@Popolechien
Copy link

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
Copy link
Contributor

kelson42 commented Sep 23, 2022

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:

  • non homogenous descriptions with different fonts, color, etc
  • problems with non-html renderer like in ios, macos, linux, windows, android...
  • big security challenges around javascript/css

@kelson42 kelson42 self-assigned this Sep 23, 2022
@kelson42
Copy link
Contributor

kelson42 commented Oct 1, 2022

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
Copy link
Member

rgaudin commented Oct 1, 2022

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

@Popolechien
Copy link
Author

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
Copy link

mgautierfr commented Oct 4, 2022

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:

  • Basic Concepts of Chemistry (Grade 11 Chemistry) => Basic Concepts of Chemistry and Grade 11 Chemistry
  • Basic economics concepts | AP Macroeconomics | Khan Academy => Basic economics concepts and AP Macroeconomics | Khan Academy (and I think that Khan Academy should go in other metadata as Author)

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
Copy link
Contributor

kelson42 commented Oct 5, 2022

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
Copy link
Contributor

kelson42 commented Oct 5, 2022

Specification updated

@stale
Copy link

stale bot commented May 26, 2023

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.

@stale stale bot added the stale label May 26, 2023
@kelson42
Copy link
Contributor

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).

@stale stale bot removed the stale label Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants