mwoffliner icon indicating copy to clipboard operation
mwoffliner copied to clipboard

Provide better logo images in Wikimedia ZIM files favicon metadata

Open kelson42 opened this issue 8 years ago • 5 comments

With data from Wikidata

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?itemLabel $logotype WHERE {
  ?item wdt:P154 ?logotype. 
  ?item wdt:P856 <https://fr.wikivoyage.org/> .
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "fr"
   }
}

kelson42 avatar Feb 18 '17 11:02 kelson42

$ curl -g 'https://query.wikidata.org/sparql?format=json&query=PREFIX%20wdt%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0ASELECT%20%3Fitem%20%3FitemLabel%20%24logotype%20WHERE%20{%0A%20%20%3Fitem%20wdt%3AP154%20%3Flogotype.%20%0A%20%20%3Fitem%20wdt%3AP856%20%3Chttps%3A%2F%2Ffr.wikivoyage.org%2F%3E%20.%0A%20%20%20SERVICE%20wikibase%3Alabel%20{%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22fr%22%0A%20%20%20}%0A}'
{
  "head" : {
    "vars" : [ "item", "itemLabel", "logotype" ]
  },
  "results" : {
    "bindings" : [ {
      "item" : {
        "type" : "uri",
        "value" : "http://www.wikidata.org/entity/Q19826572"
      },
      "logotype" : {
        "type" : "uri",
        "value" : "http://commons.wikimedia.org/wiki/Special:FilePath/Wikivoyage-Logo-v3-en.svg"
      },
      "itemLabel" : {
        "xml:lang" : "fr",
        "type" : "literal",
        "value" : "Wikivoyage en français"
      }
    } ]
  }
}

kelson42 avatar Feb 19 '17 20:02 kelson42

The idea is to provide X /M/favicon_heigtxwidth entries. It would be then easy by search all urls starting with "/M/favicon_" what kind of resolutions are available and pick the good one.

kelson42 avatar Sep 18 '17 19:09 kelson42

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[bot] avatar Jul 11 '19 10:07 stale[bot]

This has to be implememted at Zimfarm level.

kelson42 avatar Jan 08 '23 22:01 kelson42

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[bot] avatar May 26 '23 17:05 stale[bot]