[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Feature idea] Adding wikidata, wikipedia & screenshot-url fields to

From: swedebugia
Subject: Re: [Feature idea] Adding wikidata, wikipedia & screenshot-url fields to package-recipes
Date: Fri, 2 Nov 2018 12:37:15 +0100

On 2018-11-02 08:24, Pjotr Prins wrote:
> On Thu, Nov 01, 2018 at 11:33:48PM +0100, swedebugia wrote: >> When you have a proof-of-concept we can even consider writing a >> paper about it.
That would probably be fun :) I did not write a paper for a long time and never in the field of computing.

>> This wikidata endeavor would likely take some time for me to >> accomplish with a good mentor. > > No problem! I think it is actually a very good learning project. We > can help. Start small is my advice.
Thank you! I feel motivated.
> >> First up is deciding whether the core procedures interacting with >> wikidata should be in guix or as a separate module. I suggest >> separate module. > > Agree. I think it can be a tool that is separate from Guix itself. > Just start with a simple query and store that either as an > S-_expression_ or as JSON. I think (eventually) we ought to do both so > other languages may use output too. Have a look at the tooling that > generates the website.
Ok. Is there a json guile module?
Will take a close look at the python module.

> >> Then writing client procedures to interface with the SPARQL API in >> wikidata. This has already been done in python 3 (beta) see >> [3] gplv3+ >> >> We could piggyback on this client (essentially making guix >> dependent on python :/) or better yet contribute to one of the >> existing guile sql libraries: > > Personally I would use the Python stuff first and then slowly > replace that with Guile. That way you get to results fast and we can > improve over time. I personally take no issue with mixing stuff. And > because it is a separate tool it is your choice anyway. I think also, > initially, we should build a separate website that can display all > this information. That way you have full freedom on implementation > and experiments.
How would I go about mixing python and guile?
Export the list of package records from guile -> JSON and import in a python script?
Can I call a python-script from guile and receive input from it?

So something like:
iterate over record fields
calling a python script to fetch data from wikidata
acting on the data
feeding it to the console/web template code
fire up the webserver serving the html


reply via email to

[Prev in Thread] Current Thread [Next in Thread]