[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New library: guile-wikidata
From: |
Arne Babenhauserheide |
Subject: |
Re: New library: guile-wikidata |
Date: |
Sun, 09 Dec 2018 22:26:03 +0100 |
User-agent: |
mu4e 1.0; emacs 25.3.1 |
address@hidden writes:
> On Sun, Dec 09, 2018 at 01:11:05AM -0800, address@hidden 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
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
signature.asc
Description: PGP signature
- New library: guile-wikidata, swedebugia, 2018/12/09
- Re: New library: guile-wikidata, tomas, 2018/12/09
- Re: New library: guile-wikidata,
Arne Babenhauserheide <=
- Re: New library: guile-wikidata, swedebugia, 2018/12/10
- Re: New library: guile-wikidata, Roel Janssen, 2018/12/11
- Re: New library: guile-wikidata, swedebugia, 2018/12/13
- Trouble parsing a response (Was: Re: New library: guile-wikidata), swedebugia, 2018/12/13
- Re: Trouble parsing a response (Was: Re: New library: guile-wikidata), Roel Janssen, 2018/12/13
- Re: Trouble parsing a response, swedebugia, 2018/12/13
- Re: Trouble parsing a response, Roel Janssen, 2018/12/14
- Re: Trouble parsing a response (Was: Re: New library: guile-wikidata), swedebugia, 2018/12/26