{"id":18669966,"url":"https://github.com/blahah/beau-selector","last_synced_at":"2025-11-06T18:30:33.470Z","repository":{"id":66275891,"uuid":"49771018","full_name":"blahah/beau-selector","owner":"blahah","description":"Run XPath or CSS selectors on arbitrary X(HT)ML documents in the command-line","archived":false,"fork":false,"pushed_at":"2016-08-09T11:22:53.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T19:13:19.140Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://youtu.be/vEtWdI9FByA?t=47s","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blahah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-16T11:41:33.000Z","updated_at":"2022-08-25T02:57:13.000Z","dependencies_parsed_at":"2023-02-22T06:30:56.194Z","dependency_job_id":null,"html_url":"https://github.com/blahah/beau-selector","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.15384615384615385","last_synced_commit":"dc2c30db24d4f29307628383051c2b3430e796ee"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fbeau-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fbeau-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fbeau-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fbeau-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blahah","download_url":"https://codeload.github.com/blahah/beau-selector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239500953,"owners_count":19649364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T08:49:21.146Z","updated_at":"2025-11-06T18:30:33.426Z","avatar_url":"https://github.com/blahah.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## beau-selector\n\nWhen I say `bo`, [you say 'selector'](https://youtu.be/vEtWdI9FByA?t=47s).\n\nRun XPath or CSS selectors on arbitrary X(HT)ML documents in the command-line.\n\n## installation\n\n```\nnpm install --global beau-selector\n```\n\n## usage\n\nJust pipe a document to `bo` and provide a selector!\n\n\n```\nUsage: bo [xpath|css]\n\nIf no attribute is given, innerHTML, text or a plain string\nwill be returned (depending on what is matched)\n\nOptions:\n  -o, --outer      get outer XML of the element\n  -a, --attribute\n  -l, --loglevel                                 [default: \"silent\"]\n```\n\n\nYou can also optionally specify:\n\n- `--outer` to return the full outer markup of selected elements\n- `--attribute \u003cstring\u003e` an attribute to extract from the selected element (which will only apply *if* what was selected is an element), e.g. `--attribute href`\n- `--loglevel \u003cstring\u003e` to be more shouty, e.g `--loglevel verbose`\n\n## examples\n\ncss selectors\n\n```\n# get anchor elements from some_document.html\ncat some_document.html | bo 'a'\n\n# this time get the hrefs\ncat some_document.html | bo `a` --atribute href\n```\n\nxpath selectors\n\n```\n# get inner HTML of divs from google.com\nwget -O - http://google.com | bo '//div'\n\n# get the outer XML of all figures from a paper in EuropePMC\ncurl -L --silent \\\n http://www.ebi.ac.uk/europepmc/webservices/rest/PMC1318471/fullTextXML \\\n | bo \"//*[local-name()='fig']\" --outer\n```\n\n## boring stuff\n\nlicense: MIT\n\ncreated by: Rik Smith-Unna\n\nforked from: [cli-scrape](https://github.com/pthrasher/cli-scrape) and modded to take piped input rather than downloading directly, work on XML, and have some more powerful options\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblahah%2Fbeau-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblahah%2Fbeau-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblahah%2Fbeau-selector/lists"}