Show HN: Wiki – Command-line tool to fetch summaries from Wikipedia

by walle_on 10/7/2015, 7:42 AMwith 8 comments

by dragonqueston 10/7/2015, 11:02 AM

Isn't this what DBPedia's SPARQL endpoint was built for?

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

by nlon 10/7/2015, 10:56 AM

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...

by swahon 10/7/2015, 11:30 AM

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