Forrest logo
back to context overview

xidel

List of commands for xidel:

  • xidel:ai:e22c4 How to print every row of a table in a separate variable using xidel
    $ xidel input.html -e 'table_rows:=(//table//tr)', --output-format=json
    try on your machine
    explain this command
  • xidel:tldr:12509 xidel: Print all URLs found by a Google search.
    $ xidel ${https:--www-google-com-search?q=test} --extract "//a/extract(@href, 'url[?]q=([^&]+)&', 1)[. != '']"
    try on your machine
    explain this command
  • xidel:tldr:17594 xidel: Print all newest Stack Overflow questions with title and URL using pattern matching on their RSS feed.
    $ xidel ${http:--stackoverflow-com-feeds} --extract "${{title:=-}<-title><link>{uri:=@href}<-link><-entry>+}"</span></div> <div class="clipboard" onclick="copyToClipboard(this, 'forrest run forrest:xidel:tldr:17594')"> <span>try on your machine</span> </div> <a href="/context/xidel/xidel:tldr:17594"> <div class="explain"> <span>explain this command</span> </div> </a> </div> </li> <li> <div class="forrest-command-block" data-command="xidel:tldr:50028"> <div class="header"> <div class="terminal-control-button" style="background-color: #FF5F57;"></div> <div class="terminal-control-button" style="background-color: #FEBC2E;"></div> <div class="terminal-control-button" style="background-color: #28C840;"></div> </div> <div class="tags"> <ul> <li> <a href="/tools/xidel">xidel</a> </li> </ul> </div> <div> <span class="name"> xidel:tldr:50028 </span> <span class="description"> xidel: Read the pattern from example.xml (which will also check if the element containing "ood" is there, and fail otherwise). </span> </div> <div class="prompt"><span class="prompt">$ xidel ${path-to-example-xml} --extract "${<x><foo>ood<-foo><bar>{-}<-bar><-x>}"</span></div> <div class="clipboard" onclick="copyToClipboard(this, 'forrest run forrest:xidel:tldr:50028')"> <span>try on your machine</span> </div> <a href="/context/xidel/xidel:tldr:50028"> <div class="explain"> <span>explain this command</span> </div> </a> </div> </li> <li> <div class="forrest-command-block" data-command="xidel:tldr:6df30"> <div class="header"> <div class="terminal-control-button" style="background-color: #FF5F57;"></div> <div class="terminal-control-button" style="background-color: #FEBC2E;"></div> <div class="terminal-control-button" style="background-color: #28C840;"></div> </div> <div class="tags"> <ul> <li> <a href="/tools/xidel">xidel</a> </li> </ul> </div> <div> <span class="name"> xidel:tldr:6df30 </span> <span class="description"> xidel: Follow all links on a page and print the titles, with pattern matching. </span> </div> <div class="prompt"><span class="prompt">$ xidel ${https:--example-org} --follow "${<a>{-}<-a>*}" --extract "${<title>{-}<-title>}"</span></div> <div class="clipboard" onclick="copyToClipboard(this, 'forrest run forrest:xidel:tldr:6df30')"> <span>try on your machine</span> </div> <a href="/context/xidel/xidel:tldr:6df30"> <div class="explain"> <span>explain this command</span> </div> </a> </div> </li> <li> <div class="forrest-command-block" data-command="xidel:tldr:71515"> <div class="header"> <div class="terminal-control-button" style="background-color: #FF5F57;"></div> <div class="terminal-control-button" style="background-color: #FEBC2E;"></div> <div class="terminal-control-button" style="background-color: #28C840;"></div> </div> <div class="tags"> <ul> <li> <a href="/tools/xidel">xidel</a> </li> </ul> </div> <div> <span class="name"> xidel:tldr:71515 </span> <span class="description"> xidel: Follow all links on a page and print the titles, with XPath. </span> </div> <div class="prompt"><span class="prompt">$ xidel ${https:--example-org} --follow ${--a} --extract ${--title}</span></div> <div class="clipboard" onclick="copyToClipboard(this, 'forrest run forrest:xidel:tldr:71515')"> <span>try on your machine</span> </div> <a href="/context/xidel/xidel:tldr:71515"> <div class="explain"> <span>explain this command</span> </div> </a> </div> </li> <li> <div class="forrest-command-block" data-command="xidel:tldr:e3329"> <div class="header"> <div class="terminal-control-button" style="background-color: #FF5F57;"></div> <div class="terminal-control-button" style="background-color: #FEBC2E;"></div> <div class="terminal-control-button" style="background-color: #28C840;"></div> </div> <div class="tags"> <ul> <li> <a href="/tools/xidel">xidel</a> </li> </ul> </div> <div> <span class="name"> xidel:tldr:e3329 </span> <span class="description"> xidel: Check for unread Reddit mail, Webscraping, combining CSS, XPath, JSONiq, and automatically form evaluation. </span> </div> <div class="prompt"><span class="prompt">$ xidel ${https:--reddit-com} --follow "${form(css('form-login-form')[1], {'user': '$your_username', 'passwd': '$your_password'})}" --extract "${css('#mail')-@title}"</span></div> <div class="clipboard" onclick="copyToClipboard(this, 'forrest run forrest:xidel:tldr:e3329')"> <span>try on your machine</span> </div> <a href="/context/xidel/xidel:tldr:e3329"> <div class="explain"> <span>explain this command</span> </div> </a> </div> </li> <li> <div class="forrest-command-block" data-command="xidel:tldr:f03f5"> <div class="header"> <div class="terminal-control-button" style="background-color: #FF5F57;"></div> <div class="terminal-control-button" style="background-color: #FEBC2E;"></div> <div class="terminal-control-button" style="background-color: #28C840;"></div> </div> <div class="tags"> <ul> <li> <a href="/tools/xidel">xidel</a> </li> </ul> </div> <div> <span class="name"> xidel:tldr:f03f5 </span> <span class="description"> xidel: Follow all links on a page and print the titles, with CSS selectors. </span> </div> <div class="prompt"><span class="prompt">$ xidel ${https:--example-org} --follow "${css('a')}" --css ${title}</span></div> <div class="clipboard" onclick="copyToClipboard(this, 'forrest run forrest:xidel:tldr:f03f5')"> <span>try on your machine</span> </div> <a href="/context/xidel/xidel:tldr:f03f5"> <div class="explain"> <span>explain this command</span> </div> </a> </div> </li> <li> <div class="forrest-command-block" data-command="xidel:tldr:f3cc1"> <div class="header"> <div class="terminal-control-button" style="background-color: #FF5F57;"></div> <div class="terminal-control-button" style="background-color: #FEBC2E;"></div> <div class="terminal-control-button" style="background-color: #28C840;"></div> </div> <div class="tags"> <ul> <li> <a href="/tools/xidel">xidel</a> </li> </ul> </div> <div> <span class="name"> xidel:tldr:f3cc1 </span> <span class="description"> xidel: Print the title of all pages found by a Google search and download them. </span> </div> <div class="prompt"><span class="prompt">$ xidel ${https:--www-google-com-search?q=test} --follow "${--a-extract(@href, 'url[?]q=([^&]+)&', 1)[- != '']}" --extract ${--title} --download ${'{$host}-'}</span></div> <div class="clipboard" onclick="copyToClipboard(this, 'forrest run forrest:xidel:tldr:f3cc1')"> <span>try on your machine</span> </div> <a href="/context/xidel/xidel:tldr:f3cc1"> <div class="explain"> <span>explain this command</span> </div> </a> </div> </li> </ul> </div> <script> function updateCommand(commandName) { const block = document.querySelector('[data-command="' + commandName + '"]') const name = block.querySelector('.name input').value const description = block.querySelector('.description input').value const URL = "/api/command/commandName".replace('commandName', commandName); const token = "" fetch(URL, { method: 'PUT', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': token }, body: JSON.stringify({ "name": name, "description": description } ) }) .then(response => response.json()) .then(response => { if (response.status == "success") { console.log('SUCCESS') } else { console.log('FAILURE') } }) } </script> </div> <div style="clear: both"></div> <div> <a href="/context/" class="back">back to context overview</a> </div> </div> <footer class="center"> <div class="imprint"> <img src="/images/logo-bw.png" height="50px" alt="Forrest logo in black and white"> <div> Founded by <a href="mailto:nils.langner@startwind.io">Nils Langner</a>. <br> <a href="/imprint" style="font-weight: normal">Imprint</a> </div> </div> <div class="documentation"> <strong>Documentation</strong><br> <ul style="margin: 0; padding: 0; list-style: none"> <li><a href="/install">Install Forrest</a></li> <li><a href="https://github.com/startwind/forrest/blob/main/docs/changelog.md">Changelog</a></li> <li><a href="https://github.com/startwind/forrest">Manual</a></li> </ul> </div> <div class="magazine"> <strong>The Devops Life</strong><br> <ul style="margin: 0; padding: 0; list-style: none"> <li><a href="/magazine">The Magazine</a></li> </ul> </div> <div style="clear: both"></div> </footer> </body> </html>