From: Roel Janssen <roel@gnu.org>
To: swedebugia@riseup.net
Cc: guile-user <guile-user-bounces+swedebugia=riseup.net@gnu.org>,
guile-user@gnu.org
Subject: Re: New library: guile-wikidata
Date: Tue, 11 Dec 2018 11:29:15 +0100 [thread overview]
Message-ID: <33b7a105-8529-1043-c5bd-5b7fccefc042@gnu.org> (raw)
In-Reply-To: <efb183a2fcaf699026d361708228d0a6@riseup.net>
On 11-12-18 01:32, swedebugia@riseup.net wrote:
> On 2018-12-09 22:26, Arne Babenhauserheide wrote:
>> tomas@tuxteam.de writes:
>>
>>> On Sun, Dec 09, 2018 at 01:11:05AM -0800, swedebugia@riseup.net wrote:
>>>> Hi
>>>>
>>>> I worked hard for a few days playing with guile.
>>>>
>>>> Pre-release now at https://gitlab.com/swedebugia/guile-wikidata
>>>
>>> This is pretty exciting. Hoping to find a relief from my stern project
>>> manager...
>>
>> That looks pretty cool — I didn’t know wikidata.
>>
>> The search procedure looks like it wants to be in the readme as an
>> example :-)
>>
>> You could add a header and exported main function to also use this
>> module as script file:
>>
>> Header:
>>
>> #!/usr/bin/env bash
>> # -*- scheme -*
>> exec -a "$0" guile -L "$(dirname "$0")" -e '(wikidata)' -c '' "$@"
>> ;; !# ;; this ends the inline comment started by the hashbang
>>
>>
>> module:
>>
>> ...
>> #:export (show main))
>>
>>
>> main:
>>
>> (define (main args)
>> (if (null? (cdr args)) (format #t "usage: ... ~s" (first args))
>> (let ((query (first args))
>> (count (if (> (len args) 1) (second args) 10)))
>> (search query count))))
>>
>>
>> Add `chmod +x wikidata.scm` and you can run it as
>>
>> ./wikidata.scm <query> [<count>]
>>
>>
>> Best wishes,
>> Arne
>
> Thanks for the tips.
>
> I now implemented sparql queries as well. See
> https://gitlab.com/swedebugia/guile-wikidata
>
"guile-wikidata" looks cool! And I'm glad to see you've added SPARQL
support as well. It would be great to integrate it with "guile-sparql"
if you find the time for it. The "guile-sparql" code is quite short,
and hopefully readable enough.. :)
I've been working on a web interface to work with RDF/SPARQL (written
mostly in Guile Scheme, which uses "guile-sparql" as well). You might
find it interesting:
https://github.com/UMCUGenetics/sparqling-genomics
The Guile Scheme parts are in the "web" subfolder.
Kind regards,
Roel Janssen
next prev parent reply other threads:[~2018-12-11 10:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5ffe968620f1d2d940b7db2b1900dc43@riseup.net>
2018-12-09 9:11 ` New library: guile-wikidata swedebugia
2018-12-09 11:08 ` tomas
2018-12-09 21:26 ` Arne Babenhauserheide
2018-12-11 0:32 ` swedebugia
2018-12-11 10:29 ` Roel Janssen [this message]
2018-12-13 15:01 ` swedebugia
2018-12-13 16:06 ` Trouble parsing a response (Was: Re: New library: guile-wikidata) swedebugia
2018-12-13 22:03 ` Roel Janssen
2018-12-13 22:29 ` Trouble parsing a response swedebugia
2018-12-14 15:59 ` Roel Janssen
2018-12-26 19:49 ` Trouble parsing a response (Was: Re: New library: guile-wikidata) swedebugia
2019-01-03 12:25 ` swedebugia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33b7a105-8529-1043-c5bd-5b7fccefc042@gnu.org \
--to=roel@gnu.org \
--cc=guile-user-bounces+swedebugia=riseup.net@gnu.org \
--cc=guile-user@gnu.org \
--cc=swedebugia@riseup.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).