8.4k GitHub stars and counting — ericchiang/pup is a HTML project TopGit is tracking across repositories on the platform. Parsing HTML at the command line
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
pup is a command line tool for processing HTML. It reads from stdin,
prints to stdout, and allows the user to filter parts of the page using
CSS selectors.
Inspired by jq, pup aims to be a
fast and flexible way of exploring HTML from the terminal.
Install
Direct downloads are available through the releases page.
If you have Go installed on your computer just run go get.
go get github.com/ericchiang/pup
If you're on OS X, use Homebrew to install (no Go required).
Non-HTML selectors which effect the output type are implemented as functions
which can be provided as a final argument.
text{}
Print all text from selected nodes and children in depth first order.
$ cat robots.html | pup '.mw-headline text{}'
History
About the standard
Disadvantages
Alternatives
Examples
Nonstandard extensions
Crawl-delay directive
Allow directive
Sitemap
Host
Universal "*" match
Meta tags and headers
See also
References
External links
attr{attrkey}
Print the values of all attributes with a given key from all selected nodes.
$ cat robots.html | pup '.catlinks div attr{id}'
mw-normal-catlinks
mw-hidden-catlinks
json{}
Print HTML as JSON.
$ cat robots.html | pup 'div#p-namespaces a'
<a href="/wiki/Robots_exclusion_standard" title="View the content page [c]" accesskey="c">
Article
</a>
<a href="/wiki/Talk:Robots_exclusion_standard" title="Discussion about the content page [t]" accesskey="t">
Talk
</a>
Because there is no universal standard for converting HTML/XML to JSON, a
method has been chosen which hopefully fits. The goal is simply to get the
output of pup into a more consumable format.
No homepage URL was recorded for ericchiang/pup in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Does ericchiang/pup have any tags?
TopGit's last sync did not record any GitHub topics for ericchiang/pup. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on ericchiang/pup?
The most recent commit recorded on ericchiang/pup was 2.6 years ago, based on the GitHub push timestamp. The repository has 261 forks — one of the better signals of community interest.
Is ericchiang/pup open source?
Yes — ericchiang/pup ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/ericchiang/pup.
What license does ericchiang/pup use?
ericchiang/pup is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about ericchiang/pup?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/ericchiang/pup is the definitive source.
Read full README in the tab above.
Want a second opinion on pup?
Ask an AI that can read this page — one click and you get its take on pup.