mirror of
https://github.com/ericchiang/pup
synced 2025-01-14 17:50:59 +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>
|
||||
```
|
||||
|
||||
```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)
|
||||
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).
|
||||
|
||||
```bash
|
||||
cat index.html | pup '.class'
|
||||
cat index.html | pup '#id'
|
||||
cat index.html | pup 'element'
|
||||
cat index.html | pup 'selector + selector'
|
||||
cat index.html | pup 'selector > selector'
|
||||
cat index.html | pup '[attribute]'
|
||||
cat index.html | pup '[attribute="value"]'
|
||||
cat index.html | pup '[attribute*="value"]'
|
||||
cat index.html | pup '[attribute~="value"]'
|
||||
cat index.html | pup '[attribute^="value"]'
|
||||
cat index.html | pup '[attribute$="value"]'
|
||||
cat index.html | pup ':empty'
|
||||
cat index.html | pup ':first-child'
|
||||
cat index.html | pup ':first-of-type'
|
||||
cat index.html | pup ':last-child'
|
||||
cat index.html | pup ':last-of-type'
|
||||
cat index.html | pup ':only-child'
|
||||
cat index.html | pup ':only-of-type'
|
||||
cat index.html | pup ':contains("text")'
|
||||
cat index.html | pup ':nth-child(n)'
|
||||
cat index.html | pup ':nth-of-type(n)'
|
||||
cat index.html | pup ':nth-last-child(n)'
|
||||
cat index.html | pup ':nth-last-of-type(n)'
|
||||
pup '.class'
|
||||
pup '#id'
|
||||
pup 'element'
|
||||
pup 'selector + selector'
|
||||
pup 'selector > selector'
|
||||
pup '[attribute]'
|
||||
pup '[attribute="value"]'
|
||||
pup '[attribute*="value"]'
|
||||
pup '[attribute~="value"]'
|
||||
pup '[attribute^="value"]'
|
||||
pup '[attribute$="value"]'
|
||||
pup ':empty'
|
||||
pup ':first-child'
|
||||
pup ':first-of-type'
|
||||
pup ':last-child'
|
||||
pup ':last-of-type'
|
||||
pup ':only-child'
|
||||
pup ':only-of-type'
|
||||
pup ':contains("text")'
|
||||
pup ':nth-child(n)'
|
||||
pup ':nth-of-type(n)'
|
||||
pup ':nth-last-child(n)'
|
||||
pup ':nth-last-of-type(n)'
|
||||
pup ':not(selector)'
|
||||
pup ':parent-of(selector)'
|
||||
```
|
||||
|
||||
You can mix and match selectors as you wish.
|
||||
|
2
pup.go
2
pup.go
@ -17,7 +17,7 @@ import (
|
||||
// |/ \_( # |"
|
||||
// C/ ,--___/
|
||||
|
||||
var VERSION string = "0.3.3"
|
||||
var VERSION string = "0.3.4"
|
||||
|
||||
func main() {
|
||||
// process flags and arguments
|
||||
|
10
pup.rb
10
pup.rb
@ -2,14 +2,14 @@ require 'formula'
|
||||
|
||||
class Pup < Formula
|
||||
homepage 'https://github.com/EricChiang/pup'
|
||||
version '0.3.3'
|
||||
version '0.3.4'
|
||||
|
||||
if Hardware.is_64_bit?
|
||||
url 'https://github.com/EricChiang/pup/releases/download/v0.3.3/pup_darwin_amd64.zip'
|
||||
sha1 'e5a74c032abd8bc81e4a12b06d0c071343811949'
|
||||
url 'https://github.com/EricChiang/pup/releases/download/v0.3.4/pup_darwin_amd64.zip'
|
||||
sha1 '5fec62701a49bfd5eaa4b9c980e9c06dcece78c6'
|
||||
else
|
||||
url 'https://github.com/EricChiang/pup/releases/download/v0.3.3/pup_darwin_386.zip'
|
||||
sha1 'cd7d18cae7d8bf6af8bdb04c963156a1b217dfcb'
|
||||
url 'https://github.com/EricChiang/pup/releases/download/v0.3.4/pup_darwin_386.zip'
|
||||
sha1 '1eb129c662d7e323c9b1e8f8ed3b8e28ce521434'
|
||||
end
|
||||
|
||||
def install
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
rm -f dist/*
|
||||
|
||||
gox -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
|
||||
|
||||
cd dist
|
||||
|
Loading…
Reference in New Issue
Block a user