
Show HN: Wiki – Command-line tool to fetch summaries from Wikipedia - walle_
https://github.com/walle/wiki
======
dragonquest
Isn't this what DBPedia's SPARQL endpoint was built for?

Construct a query with predicate as
[http://dbpedia.org/ontology/abstract](http://dbpedia.org/ontology/abstract)
and you have your summary.

------
nl
That's a lot of code.

    
    
        curl -s "https://en.wikipedia.org/w/api.php?action=parse&contentmodel=wikitext&format=json&redirects&explaintext&prop=text&section=0&page=golang" | jq .parse.text.\"*\" > temp.html; links temp.html
    

(Scroll that). Not quite the same, but...

~~~
brainburn
jq? links?

my osx install does not seem to have these things.

~~~
sasvari
You can download/install jq [0]. as for _links_ , it is just a simple text
browser. It could be substituted by _elinks_ or _lynx_ (although they are not
present on a default Mac OS X installation either afaik), or you can just use
the handler to open it in the browser of your choice.

[edit: typo]

[0]
[https://stedolan.github.io/jq/download/](https://stedolan.github.io/jq/download/)

------
swah
Nice, would be interesting to have a shorter version. Maybe until the first
dot?

~~~
walle_
I have added the -short flag to do this.

