BeniBela online

Summary

README.md:

Xidel Build Status

Xidel is a command line tool to download and extract data from HTML/XML pages using CSS selectors, XPath/XQuery 3.0, as well as querying JSON files or APIs (e.g. REST) using JSONiq.

There are dependency-free binaries for Windows, Linux and Mac.

It is a wrapper around my Pascal Internet Tools (see repository internettools), so it supports XPath 2.0, XPath 3.0, XQuery 1.0, XQuery 3.0, JSONiq, CSS selectors and my own extensions/languages (e.g. pattern matching) and if you can compile that project, you can compile Xidel.

A simple example to return the titles of all pages linked by some starting page:

 xidel http://example.org --follow //a --extract //title

or simpler

 xidel http://example.org -f //a -e //title

The language can be explicitly chosen. For example

 xidel input.html --css 'a'
 xidel input.html --xpath '//a/@href'
 xidel input.html --xquery 'for $var in //a order by $var return $var'

returns all links, the target URI of each link or the text of all links alphabetically.

There are more examples on the above page with binaries, the github wiki and in the directory examples.

Screenshots

Xidel on Linux Xidel on Windows



How to clone

You can clone this repository with
hg clone http://hg.benibela.de/xidel/


directory / @ :d39877863a21 Xidel 0.9.8 8ab6f5d421e3 Xidel 0.9.6 189dfe9c3a63 Xidel 0.9.4 fa9e8bd56d75 Xidel 0.9 2a0b33e2f231

name size permissions
[up] drwxr-xr-x
dir. android/ drwxr-xr-x
dir. examples/ drwxr-xr-x
dir. meta/ drwxr-xr-x
dir. tests/ drwxr-xr-x
dir. web/ drwxr-xr-x
file .hgtags 210 -rw-r--r--
file .travis.yml 914 -rw-r--r--
file COPYING 35147 -rw-r--r--
file README.md 1529 -rw-r--r--
file _hg.filemap 124 -rw-r--r--
file build.sh 4074 -rwxr-xr-x
file cgi.css 217 -rw-r--r--
file cgi.js 9400 -rw-r--r--
file changelog 8761 -rw-r--r--
file install.sh 217 -rwxr-xr-x
file manage.sh 7864 -rwxr-xr-x
file printUsage.inc 31065 -rw-r--r--
file readme.txt 28758 -rw-r--r--
file xidel.lpi 8901 -rw-r--r--
file xidel.pas 3279 -rw-r--r--
file xidelbase.pas 145304 -rw-r--r--
file xidelcgi.lpi 2117 -rw-r--r--
file xidelcgi.lpr 17513 -rw-r--r--
file xidelcrt.pas 17452 -rw-r--r--