mirror of
https://github.com/ericchiang/pup
synced 2025-01-15 10:11:16 +00:00
Updated README, version, pup.rb and release.sh
This commit is contained in:
parent
bc1fd77d6b
commit
69d82fdf33
57
README.md
57
README.md
@ -137,6 +137,15 @@ $ cat robots.html | pup ':contains("History")'
|
|||||||
</span>
|
</span>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ cat robots.html | pup ':parent-of([action="edit"])'
|
||||||
|
<span class="wb-langlinks-edit wb-langlinks-link">
|
||||||
|
<a action="edit" href="//www.wikidata.org/wiki/Q80776#sitelinks-wikipedia" text="Edit links" title="Edit interlanguage links" class="wbc-editpage">
|
||||||
|
Edit links
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
```
|
||||||
|
|
||||||
For a complete list, view the [implemented selectors](#Implemented Selectors)
|
For a complete list, view the [implemented selectors](#Implemented Selectors)
|
||||||
section.
|
section.
|
||||||
|
|
||||||
@ -167,29 +176,31 @@ For further examples of these selectors head over to [MDN](
|
|||||||
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference).
|
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cat index.html | pup '.class'
|
pup '.class'
|
||||||
cat index.html | pup '#id'
|
pup '#id'
|
||||||
cat index.html | pup 'element'
|
pup 'element'
|
||||||
cat index.html | pup 'selector + selector'
|
pup 'selector + selector'
|
||||||
cat index.html | pup 'selector > selector'
|
pup 'selector > selector'
|
||||||
cat index.html | pup '[attribute]'
|
pup '[attribute]'
|
||||||
cat index.html | pup '[attribute="value"]'
|
pup '[attribute="value"]'
|
||||||
cat index.html | pup '[attribute*="value"]'
|
pup '[attribute*="value"]'
|
||||||
cat index.html | pup '[attribute~="value"]'
|
pup '[attribute~="value"]'
|
||||||
cat index.html | pup '[attribute^="value"]'
|
pup '[attribute^="value"]'
|
||||||
cat index.html | pup '[attribute$="value"]'
|
pup '[attribute$="value"]'
|
||||||
cat index.html | pup ':empty'
|
pup ':empty'
|
||||||
cat index.html | pup ':first-child'
|
pup ':first-child'
|
||||||
cat index.html | pup ':first-of-type'
|
pup ':first-of-type'
|
||||||
cat index.html | pup ':last-child'
|
pup ':last-child'
|
||||||
cat index.html | pup ':last-of-type'
|
pup ':last-of-type'
|
||||||
cat index.html | pup ':only-child'
|
pup ':only-child'
|
||||||
cat index.html | pup ':only-of-type'
|
pup ':only-of-type'
|
||||||
cat index.html | pup ':contains("text")'
|
pup ':contains("text")'
|
||||||
cat index.html | pup ':nth-child(n)'
|
pup ':nth-child(n)'
|
||||||
cat index.html | pup ':nth-of-type(n)'
|
pup ':nth-of-type(n)'
|
||||||
cat index.html | pup ':nth-last-child(n)'
|
pup ':nth-last-child(n)'
|
||||||
cat index.html | pup ':nth-last-of-type(n)'
|
pup ':nth-last-of-type(n)'
|
||||||
|
pup ':not(selector)'
|
||||||
|
pup ':parent-of(selector)'
|
||||||
```
|
```
|
||||||
|
|
||||||
You can mix and match selectors as you wish.
|
You can mix and match selectors as you wish.
|
||||||
|
2
pup.go
2
pup.go
@ -17,7 +17,7 @@ import (
|
|||||||
// |/ \_( # |"
|
// |/ \_( # |"
|
||||||
// C/ ,--___/
|
// C/ ,--___/
|
||||||
|
|
||||||
var VERSION string = "0.3.3"
|
var VERSION string = "0.3.4"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// process flags and arguments
|
// process flags and arguments
|
||||||
|
10
pup.rb
10
pup.rb
@ -2,14 +2,14 @@ require 'formula'
|
|||||||
|
|
||||||
class Pup < Formula
|
class Pup < Formula
|
||||||
homepage 'https://github.com/EricChiang/pup'
|
homepage 'https://github.com/EricChiang/pup'
|
||||||
version '0.3.3'
|
version '0.3.4'
|
||||||
|
|
||||||
if Hardware.is_64_bit?
|
if Hardware.is_64_bit?
|
||||||
url 'https://github.com/EricChiang/pup/releases/download/v0.3.3/pup_darwin_amd64.zip'
|
url 'https://github.com/EricChiang/pup/releases/download/v0.3.4/pup_darwin_amd64.zip'
|
||||||
sha1 'e5a74c032abd8bc81e4a12b06d0c071343811949'
|
sha1 '5fec62701a49bfd5eaa4b9c980e9c06dcece78c6'
|
||||||
else
|
else
|
||||||
url 'https://github.com/EricChiang/pup/releases/download/v0.3.3/pup_darwin_386.zip'
|
url 'https://github.com/EricChiang/pup/releases/download/v0.3.4/pup_darwin_386.zip'
|
||||||
sha1 'cd7d18cae7d8bf6af8bdb04c963156a1b217dfcb'
|
sha1 '1eb129c662d7e323c9b1e8f8ed3b8e28ce521434'
|
||||||
end
|
end
|
||||||
|
|
||||||
def install
|
def install
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
rm -f dist/*
|
||||||
|
|
||||||
gox -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
|
gox -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
|
||||||
|
|
||||||
cd dist
|
cd dist
|
||||||
|
Loading…
Reference in New Issue
Block a user