Skip Navigation

Scout Archives

Home Projects Publications Archives About Sign Up or Log In


Pup is a command-line utility fox extracting, filtering, and printing parts of HTML documents. It was inspired by the popular jq utility that can perform similar tasks for JSON documents, which was previously covered in the April 27, 2018, Scout Report. Users select parts of pages using CSS selector syntax. Pup includes support for complex syntax like attribute selectors, pseudo classes, and selector chaining. The full list of implemented selectors can be located in the PUP readme. In addition to just outputting the selected HTML, pup can also display the element text, element attributes, or a JSON serialization of the HTML information. The pup readme contains a quick start that demonstrates how to generate a JSON format list of articles currently on the front page of Hacker News. Pup executables can be downloaded from the releases page for a variety of systems including Windows, macOS, Linux, and several BSDs. Pup is free software, distributed under the MIT license, with source code available on GitHub.
Archived Scout Publication URL
Scout Publication
GEM Subject
Date of Scout Publication
April 12th, 2019
Date Of Record Creation
April 10th, 2019 at 8:57am
Date Of Record Release
April 11th, 2019 at 11:31am
Resource URL Clicks
Add Comment


(no comments available yet)