### Install reliq CLI and Library using Makefile Source: https://github.com/tuvimen/reliq/blob/master/README.md Provides commands to install the reliq CLI tool and its library using the project's Makefile. Includes options for a standard install, library-only install, and a linked install. ```makefile make install make lib-install make linked ``` -------------------------------- ### Install reliq via AUR Source: https://github.com/tuvimen/reliq/blob/master/README.md Installs the reliq HTML parser using the Arch User Repository (AUR) helper 'yay'. This is a common method for users on Arch Linux or derivatives. ```shell yay -S reliq ``` -------------------------------- ### CSS Styling Example Source: https://github.com/tuvimen/reliq/blob/master/tests/pretty/1.html Demonstrates basic CSS styling for the body element and a class named .intRoducIon. Includes a long comment line to test handling of extended text within comments. ```css body { background-color: red; color: black; } .intRoducIon { margin-top: 2em; /* This purposefully is a very long line just to test certain things and anything that might fail in the future for whatever reason */ padding: 0.1em; } ``` -------------------------------- ### Reliq CLI Data Extraction and Transformation Source: https://github.com/tuvimen/reliq/blob/master/README.md Demonstrates the usage of the reliq command-line tool for parsing and transforming data. It explains the `.u` operator for extracting unsigned integers and the `.a` operator for splitting strings into arrays, including custom delimiters. The example shows how to extract a list of years from a dataset using a combination of these operators and shell piping. ```shell reliq '.years.a("\t").u table .int-values; [0] tr | "%i" / tr "\n" "\t"' ``` ```json { "years": [ 1930, 1942, 1948, 1965, 1989, 1994, 2010 ] } ``` -------------------------------- ### Reliq Complex Nested Extraction with Transformations Source: https://github.com/tuvimen/reliq/blob/master/README.md A more advanced example of reliq usage, involving deeply nested fields, multiple transformations (`sed`), and conditional logic within the extraction process. ```shell reliq ' .signature div .signature #B>sig[0-9]* | "%i", dl .postprofile #B>profile[0-9]*; { dt l@[1]; { .avatar img src | "% (src)v", .user a c@[0] | "%i", .userid.u a href c@[0] | "% (href)v" / sed "s/.*[&;]u=([0-9]+).*/\1/" "E", }, .userinfo.a("\a") dd l@[1] i@vf>" " | "%i\a" / tr '\n\t' sed " s/([^<]*)<\/strong>/\1/g s/ +:/:/ /