From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia Subject: Re: [Feature idea] Adding wikidata, wikipedia & screenshot-url fields to package-recipes Date: Fri, 2 Nov 2018 00:25:16 +0100 Message-ID: <8745311c-0b40-a590-41dc-3c2b84d24faf@riseup.net> References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------2DD7821A2884B36C66B0FDF1" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIMFt-0007AG-Lr for guix-devel@gnu.org; Thu, 01 Nov 2018 19:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIMFl-0007cD-5L for guix-devel@gnu.org; Thu, 01 Nov 2018 19:19:58 -0400 Received: from mx1.riseup.net ([198.252.153.129]:35044) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gIMFg-0007WM-R3 for guix-devel@gnu.org; Thu, 01 Nov 2018 19:19:50 -0400 In-Reply-To: Content-Language: sv-FI 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: Amirouche Boubekki Cc: guix-devel This is a multi-part message in MIME format. --------------2DD7821A2884B36C66B0FDF1 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Amirouche On 2018-11-01 14:37, Amirouche Boubekki wrote: > >> Implementation: >> >> It could be implemented by adding the fields to package-objects. > nitpick, those are records in guile scheme. Did you mean to correct my use of "object" here? Your are right about that. Scheme Syntax: *define-record-type* /type (constructor fieldname =E2=80=A6) predicate (fieldname accessor [modifier]) =E2=80=A6 / I finally begin to understand all these words an Scheme-ways of doing=20 things./ / Have I understood correctly that we have at least 1 nested record types=20 in guix? E.g. the package record contains an origin record and a lot of=20 other fields. >> The rationale for adding screenshot-url to the recipe is that this par= sing of wikidata->en-WP->url-for-first-image >> for every package in our list is quite expensive. Better to do it once= and 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. Ok, I understand your point. /Swedebugia --------------2DD7821A2884B36C66B0FDF1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Hi Amirouche


On 2018-11-01 14:37, Amirouche Boubekk= i wrote:

Implementation:

It could be implemented by adding the fields to package-objects.
nitpick, those are records in guile scheme.
Did you mean to correct my use of "object" here?
Your are right about that.

Scheme Syntax: define-record-type type
(constructor fieldname =E2=80=A6)
predicate
(fieldname accessor [modifier]) =E2=80=A6

I finally begin to understand all these words an Scheme-ways of doing things.

Have I understood correctly that we have at least 1 nested record types in guix? E.g. the package record contains an origin record and a lot of other fields.
=C2=A0
The rationale for adding screenshot-url to the rec=
ipe is that this parsing 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.
Ok, I understand your point.

/Swedebugia
--------------2DD7821A2884B36C66B0FDF1--