From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amirouche Boubekki Subject: Re: [Feature idea] Adding wikidata, wikipedia & screenshot-url fields to package-recipes Date: Thu, 1 Nov 2018 14:37:33 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIDAT-00008U-3G for guix-devel@gnu.org; Thu, 01 Nov 2018 09:37:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIDAS-0007ca-0Q for guix-devel@gnu.org; Thu, 01 Nov 2018 09:37:49 -0400 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]:32858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIDAR-0007c8-Qa for guix-devel@gnu.org; Thu, 01 Nov 2018 09:37:47 -0400 Received: by mail-oi1-x22e.google.com with SMTP id c25-v6so16624448oiy.0 for ; Thu, 01 Nov 2018 06:37:47 -0700 (PDT) In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: swedebugia@riseup.net Cc: guix-devel Hello, Like Pjotr I think it's a very good idea and the way forward. Find below my comments with some modulation. Le jeu. 1 nov. 2018 =C3=A0 10:39, swedebugia a =C3= =A9crit : > > Hi > > I am a contributor to OSM and have seen how combining OSM and Wikidata/Wi= kipedia (WP) has been very useful. > > I got the idea of adding Wikidata-entries to guix package objecs would be= fruitful because: The idea is to add a wikidata identifier for guix packages. For those that are not familiar with wikidata here is a little summary of my own. wikidata is wikimedia project that put together structured data about the w= orld. wikidata is itself a wiki like wikipedia that anybody can improve it. The g= oal of the project is to have a machine readable form of knowledge. One of the = use case for that, is to easily keep wikipedia (and other wik) up-to-date regar= ding metadata. Simply said, one could generate, so called, info boxes on wikiped= ia from wikidata. See https://www.wikidata.org/wiki/Q937466 for GNU mailman wikidata entity. > It makes it possible to a more useful list of packages e.g. by showing li= nks to WP entries for the program in the users local language. > (E.g. by firing up a browser from emacs or the shell, or by populating a = (per channel) html package list (with screenshots, local WP-links, etc.) > and firing up a throw-away web-server instance serving this with e.g. gui= x package --list-available-packages-html) The benefits for guix project: Immediate benefit: - It will be easier to translate description and synopsis - Improve guix packages discover-ability via wikidata SPARQL endpoint (e.g. give me all guix packages that deal with biology) - Grab screenshot and other media or metadata about a given package Other benefits: - If upstream and other distro adopt wikidata as the Single Source Of Truth, it will help with packaging and keeping guix up-to-date - Everything is connected! > It would also perhaps be of benefit to WP-contributors because we could e= asily make statistics for how many of the packages > in guix a Wikidata-entry and/or WP-entry exists. Thus perhaps leading to = creating of more articles for notable packages or improving > WP-articles with outdated release information. This will be of great benefit for wikidata. > > Implementation: > > It could be implemented by adding the fields to package-objects. nitpick, those are records in guile scheme. > The rationale for adding screenshot-url to the recipe is that this parsin= g of wikidata->en-WP->url-for-first-image > for every package in our list is quite expensive. Better to do it once an= d perhaps update all the screenshot-urls > once a year or so. I think the screenshot-url field will not be very helpful that can be fetched based on wikidata identifier. > > The rationale for adding WP (list of Wikipeidas with an article in the wi= kidata entry, e.g. ("en" "sv" "es") > to the recipe is that this parsing of wikidata->WP for every package in o= ur list is quite expensive. Better > to do it once and perhaps update once a year or so. Based on the wikidata entry, you can use SPARQL to retrieve the wikipedia page in various language and use wikipedia commons links to fetch screenshot. Simply said, I think we should not add more fields than necessary to build the package and push to wikidata the information guix might need for other purposes than distribution and bu= ild. The benefit of this approach is that package definition is not overloaded with fields and non-code contributors can still contribute to guix by submitting a screenshot to wikipedia commons and editing wikidata.