• Stars
    star
    664
  • Rank 67,903 (Top 2 %)
  • Language Pascal
  • License
    GNU General Publi...
  • Created over 9 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.

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

Compilation and Installation

You can compile it by calling build.sh and install it by calling build.sh -t. Alternatively you can compile it with the Lazarus IDE.

You can call the commands from the .travis.yml script to download dependencies.

More Repositories

1

internettools

XPath/XQuery 3.1 interpreter for Pascal with compatibility modes for XPath 2.0/XQuery 1.0/3.0, custom and JSONiq extensions, pattern matching, XML/HTML/JSON parsers and classes for HTTP/S requests
Pascal
120
star
2

treelistview

A Pascal treelistview component, showing a treeview together with the columns of a listview (for Delphi and Lazarus)
Pascal
49
star
3

nasty-files

Some files with nasty names
42
star
4

bbutils

A bunch of important low-level functions missing in FreePascal, e.g. string or array manipulation functions.
Pascal
40
star
5

rcmdline

Advanced command line parser for Pascal
Pascal
38
star
6

videlibri

📚 Cross-platform library client to automate any OPAC and library catalog from your local device, e.g. for renewing of borrowed books or searching for books available in the library in automated scripts.
HTML
35
star
7

bigdecimalmath

Pascal library for arbitrary precision BCD floating point numbers
Pascal
24
star
8

regexgen

Reverse regular expression engine that calculates strings matching a given regex
C++
17
star
9

hamt

Mutable and immutable persistent maps and sets as hash array mapped trie (HAMT) for FreePascal
Pascal
15
star
10

diagram

A Pascal diagram/chart component with model/view architecture
Pascal
14
star
11

apim

API Manager, gui interface to Win32 APIs, to examine or change window properties
Pascal
12
star
12

home-river

A few Homespring programs, and a converter from my own language HomeSpringTree to Homespring
JavaScript
12
star
13

simplify-diff

Little tool to simplify unified diffs, e.g. to remove unchanged lines or lines only containing whitespace changes
Pascal
9
star
14

sun-simulator

Little tool to set the monitor brightness/gamma/color according to the time and date
Pascal
8
star
15

color-dialog

A rgb/hls color choosing dialog
Pascal
7
star
16

fpc-map-benchmark

An exhausive benchmark of string-key based (hash)maps available for Free Pascal.
Roff
7
star
17

subtitleviewer

Little tool to show subtitle files. The window is tiny and stay-on-top, so it can e.g. be used to watch youtube movies with subtitles
Pascal
6
star
18

mailfilter

A mail filter scripting language. The script is transpiled to a maildrop script.
Perl
5
star
19

chemistry

Repository for a (failed) high school project, trying to simulate the molecular bonds quantum-theoretically and optimize it to determine the structure of the respective molecul, including project "thesis" (German).
Pascal
4
star
20

contests

Some of my programs written for programming competitions
Pascal
4
star
21

memguard

Little tool to automatically stop processes using too much memory (unix only)
Pascal
3
star
22

moodle-tools

Automate teaching actions in the Moodle from the bash shell
Shell
2
star
23

sirdslets

Java applet games rendering everything as real 3d stereographical SIRDS/SIS images
Java
2
star
24

ararat-synapse

Network communication library for sockets, HTTP, HTTPS, etc. From http://ararat.cz/synapse/
Pascal
2
star
25

firefox-stuff

Stuff to make Firefox more usable, greasemonkey scripts and a little plugin
JavaScript
2
star
26

myandroid

My (Trivial) Android App
Java
1
star
27

watcher

Simple shell script to track when you have used which program
Shell
1
star
28

site

Just my webpage
JavaScript
1
star