Can type for JQuery like because this tool is wrapping the "goquery".
domp [option] [selector]
$ curl www.example.com | domp '#id > .class a'
output format.
- csv => csv format.
- json => json format.
- text => space seperate text.
default "text"
$ curl www.example.com | domp -o csv '#id > .class a'
query is output data.
- text
- html
- outerhtml
- attrs
- attr@attribute
default "text"
And can use multiple query. ( seperator is "|" )
$ curl www.example.com | domp -q 'attr@alt|attr@src' -o csv 'img'
# image1,/img/1.jpg
# image2,/img/2.jpg
# ...
To install, use go get
:
$ go get -d github.com/muramako/domp
- Fork (https://github.com/muramako/domp/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...
command and confirm that it passes - Run
gofmt -s
- Create a new Pull Request
- Write test.