Skip to content

jeffbr13/xq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xq

Apply XPath expressions to XML, like jq does for JSONPath and JSON.

Installation

Install with pip:

pip install xq

Or download the repo and install via setuptools:

python setup.py install

Usage

Extract download URLs from an RSS feed:

http get 'http://br-rss.jeffbr13.net/rss/channels/1/' | xq '//item/enclosure/@url'

Extract all links from an HTML page footer:

http get 'http://br-rss.jeffbr13.net/ | xq '//footer//a/@href'

Test

Run unittest in the root directory to autodetect and run tests:

python -m unittest

Build

Increment xq.VERSION and run the following two commands to create a source distribution, create a universal wheel, and upload to PyPI

python setup.py sdist
python setup.py bdist_wheel --universal
twine upload dist/*

See Also

About

Like jq, but for XML and XPath.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages