unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Arne Babenhauserheide <arne_bab@web.de>
To: tomas@tuxteam.de
Cc: guile-user@gnu.org
Subject: Re: New library: guile-wikidata
Date: Sun, 09 Dec 2018 22:26:03 +0100	[thread overview]
Message-ID: <87tvjms87o.fsf@web.de> (raw)
In-Reply-To: <20181209110814.GA20268@tuxteam.de>

[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]


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
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1076 bytes --]

  reply	other threads:[~2018-12-09 21:26 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 [this message]
2018-12-11  0:32       ` swedebugia
2018-12-11 10:29         ` Roel Janssen
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=87tvjms87o.fsf@web.de \
    --to=arne_bab@web.de \
    --cc=guile-user@gnu.org \
    --cc=tomas@tuxteam.de \
    /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).