from Hacker News

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

by walle_ on 10/7/15, 7:42 AM with 8 comments

  • by dragonquest on 10/7/15, 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 nl on 10/7/15, 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 swah on 10/7/15, 11:30 AM

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