libzim icon indicating copy to clipboard operation
libzim copied to clipboard

Provide a thumbImage path for each article

Open ghost opened this issue 4 years ago • 9 comments

@automactic commented on Jan 17, 2018, 6:40 PM UTC:

It might be a good idea to provide an optional thumbImage link in search result.

This way, when loading the search results, the apps utilizing kiwix-lib could show thumbImage alongside title and snippet. The book favicon can be displayed when thumbImage is absent. This make it obvious if a search result comes from a zim file with or without pictures, leading to a better user experience.

This issue was moved by kelson42 from kiwix/libkiwix#109.

ghost avatar Jul 09 '21 05:07 ghost

@kelson42 commented on Jan 17, 2018, 6:48 PM UTC:

Yes... that said I have no clue exactly how this should achieved.

ghost avatar Jul 09 '21 05:07 ghost

@automactic commented on Jan 17, 2018, 7:07 PM UTC:

We can do this by adding the src of a <img> (the first, for instance) in the html during indexing to Xapian::Documents using void add_value.

ghost avatar Jul 09 '21 05:07 ghost

@kelson42 commented on Jan 17, 2018, 7:15 PM UTC:

Yes, what you need to know is that the Mediawiki API already proposes such a feature, so ideally which should get the information from there (I suspect their algorithm is a bit more subtitle than just taking the first one). Maybe we could put this as metadata in the HTML <HEAD>?

ghost avatar Jul 09 '21 05:07 ghost

@automactic commented on Jan 17, 2018, 7:22 PM UTC:

I agree with using the Mediawiki API if is already implemented. That said, it is still necessary to consider other offliners.

But I don't think it is a good idea to put it in <head>, since you have to get the content of the html and build the doc tree. Why not add this as a meta of xapian document?

ghost avatar Jul 09 '21 05:07 ghost

@kelson42 commented on Jan 17, 2018, 7:25 PM UTC:

@automactic The problem is that the for now, and as long as we do not use node-libzim, in mwoffliner, the static HTML is more or less the only way to exchange information beetween the online web site and the final ZIM file (through zimwriterfs).

ghost avatar Jul 09 '21 05:07 ghost

@automactic commented on Jan 17, 2018, 7:39 PM UTC:

If we utilize features in Mediawiki, why does it matter if we use node or not? Surely we can just make requests to Mediawiki API and ask for a thumbImage link for an article.

ghost avatar Jul 09 '21 05:07 ghost

stale[bot] commented on Nov 21, 2019, 12:09 AM UTC:

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.

ghost avatar Jul 09 '21 05:07 ghost

@kelson42 commented on Jul 9, 2021, 5:28 AM UTC:

This is more a request for the libzim than for libkiwix IMO. It is related to the global metadata problematic.

ghost avatar Jul 09 '21 05:07 ghost

This depends on #316

kelson42 avatar Dec 04 '21 06:12 kelson42