conversations listlengths 2 2 |
|---|
[
{
"from": "human",
"value": "Send a GET request via the `xh` command"
},
{
"from": "gpt",
"value": "`xh {{httpbin.org/get}}`"
}
] |
[
{
"from": "human",
"value": "Send a POST request with a JSON body (key-value pairs are added to a top-level JSON object - e.g. `{\"name\": \"john\", \"age\": 25}`) via the `xh` command"
},
{
"from": "gpt",
"value": "`xh post {{httpbin.org/post}} {{name=john}} {{age:=25}}`"
}
] |
[
{
"from": "human",
"value": "Send a GET request with query parameters (e.g. `first_param=5&second_param=true`) via the `xh` command"
},
{
"from": "gpt",
"value": "`xh get {{httpbin.org/get}} {{first_param==5}} {{second_param==true}}`"
}
] |
[
{
"from": "human",
"value": "Send a GET request with a custom header via the `xh` command"
},
{
"from": "gpt",
"value": "`xh get {{httpbin.org/get}} {{header-name:header-value}}`"
}
] |
[
{
"from": "human",
"value": "Make a GET request and save the response body to a file via the `xh` command"
},
{
"from": "gpt",
"value": "`xh --download {{httpbin.org/json}} --output {{path/to/file}}`"
}
] |
[
{
"from": "human",
"value": "Show equivalent `curl` command (this will not send any request) via the `xh` command"
},
{
"from": "gpt",
"value": "`xh --{{curl|curl-long}} {{--follow --verbose get http://example.com user-agent:curl}}`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xidel`."
},
{
"from": "gpt",
"value": "Download and extract data from HTML/XML pages as well as JSON APIs.\nMore information: <https://www.videlibri.de/xidel.html>.\n"
}
] |
[
{
"from": "human",
"value": "Print all URLs found by a Google search via the `xidel` command"
},
{
"from": "gpt",
"value": "`xidel {{https://www.google.com/search?q=test}} --extract \"//a/extract(@href, 'url[?]q=([^&]+)&', 1)[. != '']\"`"
}
] |
[
{
"from": "human",
"value": "Print the title of all pages found by a Google search and download them via the `xidel` command"
},
{
"from": "gpt",
"value": "`xidel {{https://www.google.com/search?q=test}} --follow \"{{//a/extract(@href, 'url[?]q=([^&]+)&', 1)[. != '']}}\" --extract {{//title}} --... |
[
{
"from": "human",
"value": "Follow all links on a page and print the titles, with XPath via the `xidel` command"
},
{
"from": "gpt",
"value": "`xidel {{https://example.org}} --follow {{//a}} --extract {{//title}}`"
}
] |
[
{
"from": "human",
"value": "Follow all links on a page and print the titles, with CSS selectors via the `xidel` command"
},
{
"from": "gpt",
"value": "`xidel {{https://example.org}} --follow \"{{css('a')}}\" --css {{title}}`"
}
] |
[
{
"from": "human",
"value": "Follow all links on a page and print the titles, with pattern matching via the `xidel` command"
},
{
"from": "gpt",
"value": "`xidel {{https://example.org}} --follow \"{{<a>{.}</a>*}}\" --extract \"{{<title>{.}</title>}}\"`"
}
] |
[
{
"from": "human",
"value": "Read the pattern from example.xml (which will also check if the element containing \"ood\" is there, and fail otherwise) via the `xidel` command"
},
{
"from": "gpt",
"value": "`xidel {{path/to/example.xml}} --extract \"{{<x><foo>ood</foo><bar>{.}</bar></x>}}\"`"
}
... |
[
{
"from": "human",
"value": "Print all newest Stack Overflow questions with title and URL using pattern matching on their RSS feed via the `xidel` command"
},
{
"from": "gpt",
"value": "`xidel {{http://stackoverflow.com/feeds}} --extract \"{{<entry><title>{title:=.}</title><link>{uri:=@href}</li... |
[
{
"from": "human",
"value": "Check for unread Reddit mail, Webscraping, combining CSS, XPath, JSONiq, and automatically form evaluation via the `xidel` command"
},
{
"from": "gpt",
"value": "`xidel {{https://reddit.com}} --follow \"{{form(css('form.login-form')[1], {'user': '$your_username', 'pa... |
[
{
"from": "human",
"value": "Tell me about `ximtoppm`."
},
{
"from": "gpt",
"value": "Convert a XIM file to a PPM image.\nMore information: <https://netpbm.sourceforge.net/doc/ximtoppm.html>.\n"
}
] |
[
{
"from": "human",
"value": "Convert an XIM image to a PPM image via the `ximtoppm` command"
},
{
"from": "gpt",
"value": "`ximtoppm {{path/to/input_file.xim}} > {{path/to/output_file.ppm}}`"
}
] |
[
{
"from": "human",
"value": "Store the transparency mask of the input image in the specified file via the `ximtoppm` command"
},
{
"from": "gpt",
"value": "`ximtoppm {{[-a|-alphaout]}} {{path/to/alpha_file.pbm}} {{path/to/input_file.xim}} > {{path/to/output_file.ppm}}`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xkcdpass`."
},
{
"from": "gpt",
"value": "A flexible and scriptable password generator which generates strong passphrases.\nInspired by XKCD 936.\nMore information: <https://github.com/redacted/XKCD-password-generator>.\n"
}
] |
[
{
"from": "human",
"value": "Generate one passphrase with the default options via the `xkcdpass` command"
},
{
"from": "gpt",
"value": "`xkcdpass`"
}
] |
[
{
"from": "human",
"value": "Generate one passphrase whose first letters of each word match the provided argument via the `xkcdpass` command"
},
{
"from": "gpt",
"value": "`xkcdpass -a {{acrostic}}`"
}
] |
[
{
"from": "human",
"value": "Generate passwords interactively via the `xkcdpass` command"
},
{
"from": "gpt",
"value": "`xkcdpass -i`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xkill`."
},
{
"from": "gpt",
"value": "Kill a window interactively in a graphical session.\nSee also: `kill`, `killall`.\nMore information: <https://www.x.org/releases/current/doc/man/man1/xkill.1.xhtml>.\n"
}
] |
[
{
"from": "human",
"value": "Display a cursor to kill a window when pressing the left mouse button (press any other mouse button to cancel) via the `xkill` command"
},
{
"from": "gpt",
"value": "`xkill`"
}
] |
[
{
"from": "human",
"value": "Display a cursor to select a window to kill by pressing any mouse button via the `xkill` command"
},
{
"from": "gpt",
"value": "`xkill -button any`"
}
] |
[
{
"from": "human",
"value": "Kill a window with a specific ID (use `xwininfo` to get info about windows) via the `xkill` command"
},
{
"from": "gpt",
"value": "`xkill -id {{id}}`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xmake`."
},
{
"from": "gpt",
"value": "A cross-platform C & C++ build utility based on Lua.\nMore information: <https://xmake.io/#/getting_started>.\n"
}
] |
[
{
"from": "human",
"value": "Create an Xmake C project, consisting of a hello world and `xmake.lua` via the `xmake` command"
},
{
"from": "gpt",
"value": "`xmake create --language c -P {{project_name}}`"
}
] |
[
{
"from": "human",
"value": "Build and run an Xmake project via the `xmake` command"
},
{
"from": "gpt",
"value": "`xmake build run`"
}
] |
[
{
"from": "human",
"value": "Run a compiled Xmake target directly via the `xmake` command"
},
{
"from": "gpt",
"value": "`xmake run {{target_name}}`"
}
] |
[
{
"from": "human",
"value": "Configure a project's build targets via the `xmake` command"
},
{
"from": "gpt",
"value": "`xmake config --plat={{macosx|linux|iphoneos|...}} --arch={{x86_64|i386|arm64|...}} --mode={{debug|release}}`"
}
] |
[
{
"from": "human",
"value": "Install the compiled target to a directory via the `xmake` command"
},
{
"from": "gpt",
"value": "`xmake install -o {{path/to/directory}}`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml canonic`."
},
{
"from": "gpt",
"value": "Make XML documents canonical.\nMore information: <https://xmlstar.sourceforge.net/docs.php>.\n"
}
] |
[
{
"from": "human",
"value": "Make an XML document canonical, preserving comments via the `xml-canonic` command"
},
{
"from": "gpt",
"value": "`xml canonic {{path/to/input.xml|URI}} > {{path/to/output.xml}}`"
}
] |
[
{
"from": "human",
"value": "Make an XML document canonical, removing comments via the `xml-canonic` command"
},
{
"from": "gpt",
"value": "`xml canonic --without-comments {{path/to/input.xml|URI}} > {{path/to/output.xml}}`"
}
] |
[
{
"from": "human",
"value": "Make XML exclusively canonical, using an XPATH from a file, preserving comments via the `xml-canonic` command"
},
{
"from": "gpt",
"value": "`xml canonic --exc-with-comments {{path/to/input.xml|URI}} {{path/to/c14n.xpath}}`"
}
] |
[
{
"from": "human",
"value": "Display help via the `xml-canonic` command"
},
{
"from": "gpt",
"value": "`xml canonic --help`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml depyx`."
},
{
"from": "gpt",
"value": "Convert a PYX (ESIS - ISO 8879) document to XML format.\nMore information: <https://xmlstar.sourceforge.net/docs.php>.\n"
}
] |
[
{
"from": "human",
"value": "Convert a PYX (ESIS - ISO 8879) document to XML format via the `xml-depyx` command"
},
{
"from": "gpt",
"value": "`xml depyx {{path/to/input.pyx|URI}} > {{path/to/output.xml}}`"
}
] |
[
{
"from": "human",
"value": "Convert a PYX document from `stdin` to XML format via the `xml-depyx` command"
},
{
"from": "gpt",
"value": "`cat {{path/to/input.pyx}} | xml depyx > {{path/to/output.xml}}`"
}
] |
[
{
"from": "human",
"value": "Display help via the `xml-depyx` command"
},
{
"from": "gpt",
"value": "`xml depyx --help`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml edit`."
},
{
"from": "gpt",
"value": "Edit an XML document.\nMore information: <https://xmlstar.sourceforge.net/docs.php>.\n"
}
] |
[
{
"from": "human",
"value": "Delete elements matching an XPATH from an XML document via the `xml-edit` command"
},
{
"from": "gpt",
"value": "`xml edit --delete \"{{XPATH1}}\" {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Move an element node of an XML document from XPATH1 to XPATH2 via the `xml-edit` command"
},
{
"from": "gpt",
"value": "`xml edit --move \"{{XPATH1}}\" \"{{XPATH2}}\" {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Rename all attributes named \"id\" to \"ID\" via the `xml-edit` command"
},
{
"from": "gpt",
"value": "`xml edit --rename \"{{//*/@id}}\" -v \"{{ID}}\" {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Rename sub-elements of the element \"table\" that are named \"rec\" to \"record\" via the `xml-edit` command"
},
{
"from": "gpt",
"value": "`xml edit --rename \"{{/xml/table/rec}}\" -v \"{{record}}\" {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Update the XML table record with \"id=3\" to the value \"id=5\" via the `xml-edit` command"
},
{
"from": "gpt",
"value": "`xml edit --update \"{{xml/table/rec[@id=3]/@id}}\" -v {{5}} {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Display help via the `xml-edit` command"
},
{
"from": "gpt",
"value": "`xml edit --help`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml elements`."
},
{
"from": "gpt",
"value": "Extract elements and display the structure of an XML document.\nMore information: <https://xmlstar.sourceforge.net/docs.php>.\n"
}
] |
[
{
"from": "human",
"value": "Extract elements from an XML document (producing XPATH expressions) via the `xml-elements` command"
},
{
"from": "gpt",
"value": "`xml elements {{path/to/input.xml|URI}} > {{path/to/elements.xpath}}`"
}
] |
[
{
"from": "human",
"value": "Extract elements and their attributes from an XML document via the `xml-elements` command"
},
{
"from": "gpt",
"value": "`xml elements -a {{path/to/input.xml|URI}} > {{path/to/elements.xpath}}`"
}
] |
[
{
"from": "human",
"value": "Extract elements and their attributes and values from an XML document via the `xml-elements` command"
},
{
"from": "gpt",
"value": "`xml elements -v {{path/to/input.xml|URI}} > {{path/to/elements.xpath}}`"
}
] |
[
{
"from": "human",
"value": "Print sorted unique elements from an XML document to see its structure via the `xml-elements` command"
},
{
"from": "gpt",
"value": "`xml elements -u {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Print sorted unique elements from an XML document up to a depth of 3 via the `xml-elements` command"
},
{
"from": "gpt",
"value": "`xml elements -d{{3}} {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Display help via the `xml-elements` command"
},
{
"from": "gpt",
"value": "`xml elements --help`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml escape`."
},
{
"from": "gpt",
"value": "Escape special XML characters, e.g. `<a1>` → `<a1>`.\nMore information: <https://xmlstar.sourceforge.net/doc/xmlstarlet.pdf>.\n"
}
] |
[
{
"from": "human",
"value": "Escape special XML characters in a string via the `xml-escape` command"
},
{
"from": "gpt",
"value": "`xml escape \"{{<a1>}}\"`"
}
] |
[
{
"from": "human",
"value": "Escape special XML characters from `stdin` via the `xml-escape` command"
},
{
"from": "gpt",
"value": "`echo \"{{<a1>}}\" | xml escape`"
}
] |
[
{
"from": "human",
"value": "Display help via the `xml-escape` command"
},
{
"from": "gpt",
"value": "`xml escape --help`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml format`."
},
{
"from": "gpt",
"value": "Format an XML document.\nMore information: <https://xmlstar.sourceforge.net/docs.php>.\n"
}
] |
[
{
"from": "human",
"value": "Format an XML document, indenting with tabs via the `xml-format` command"
},
{
"from": "gpt",
"value": "`xml format --indent-tab {{path/to/input.xml|URI}} > {{path/to/output.xml}}`"
}
] |
[
{
"from": "human",
"value": "Format an HTML document, indenting with 4 spaces via the `xml-format` command"
},
{
"from": "gpt",
"value": "`xml format --html --indent-spaces {{4}} {{path/to/input.html|URI}} > {{path/to/output.html}}`"
}
] |
[
{
"from": "human",
"value": "Recover parsable parts of a malformed XML document, without indenting via the `xml-format` command"
},
{
"from": "gpt",
"value": "`xml format --recover --noindent {{path/to/malformed.xml|URI}} > {{path/to/recovered.xml}}`"
}
] |
[
{
"from": "human",
"value": "Format an XML document from `stdin`, removing the `DOCTYPE` declaration via the `xml-format` command"
},
{
"from": "gpt",
"value": "`cat {{path\\to\\input.xml}} | xml format --dropdtd > {{path/to/output.xml}}`"
}
] |
[
{
"from": "human",
"value": "Format an XML document, omitting the XML declaration via the `xml-format` command"
},
{
"from": "gpt",
"value": "`xml format --omit-decl {{path\\to\\input.xml|URI}} > {{path/to/output.xml}}`"
}
] |
[
{
"from": "human",
"value": "Display help via the `xml-format` command"
},
{
"from": "gpt",
"value": "`xml format --help`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xmllint`."
},
{
"from": "gpt",
"value": "XML parser and linter that supports XPath, a syntax for navigating XML trees.\nMore information: <https://manned.org/xmllint>.\n"
}
] |
[
{
"from": "human",
"value": "Return all nodes (tags) named \"foo\" via the `xmllint` command"
},
{
"from": "gpt",
"value": "`xmllint --xpath \"//{{foo}}\" {{source_file.xml}}`"
}
] |
[
{
"from": "human",
"value": "Return the contents of the first node named \"foo\" as a string via the `xmllint` command"
},
{
"from": "gpt",
"value": "`xmllint --xpath \"string(//{{foo}})\" {{source_file.xml}}`"
}
] |
[
{
"from": "human",
"value": "Return the href attribute of the second anchor element in an HTML file via the `xmllint` command"
},
{
"from": "gpt",
"value": "`xmllint --html --xpath \"string(//a[2]/@href)\" webpage.xhtml`"
}
] |
[
{
"from": "human",
"value": "Return human-readable (indented) XML from file via the `xmllint` command"
},
{
"from": "gpt",
"value": "`xmllint --format {{source_file.xml}}`"
}
] |
[
{
"from": "human",
"value": "Check that an XML file meets the requirements of its DOCTYPE declaration via the `xmllint` command"
},
{
"from": "gpt",
"value": "`xmllint --valid {{source_file.xml}}`"
}
] |
[
{
"from": "human",
"value": "Validate XML against DTD schema hosted online via the `xmllint` command"
},
{
"from": "gpt",
"value": "`xmllint --dtdvalid {{URL}} {{source_file.xml}}`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml list`."
},
{
"from": "gpt",
"value": "List a directory's contents (like `ls`) in XML format.\nMore information: <https://xmlstar.sourceforge.net/docs.php>.\n"
}
] |
[
{
"from": "human",
"value": "Write the current directory's listing to an XML document via the `xml-list` command"
},
{
"from": "gpt",
"value": "`xml list > {{path/to/dir_list.xml}}`"
}
] |
[
{
"from": "human",
"value": "Write the specified directory's listing to an XML document via the `xml-list` command"
},
{
"from": "gpt",
"value": "`xml list {{path/to/directory}} > {{path/to/dir_list.xml}}`"
}
] |
[
{
"from": "human",
"value": "Display help via the `xml-list` command"
},
{
"from": "gpt",
"value": "`xml list --help`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml`."
},
{
"from": "gpt",
"value": "XMLStarlet Toolkit: query, edit, check, convert and transform XML documents.\nSome subcommands such as `xml validate` have their own usage documentation.\nMore information: <https://xmlstar.sourceforge.net/docs.php>... |
[
{
"from": "human",
"value": "Display general help, including the list of subcommands via the `xml` command"
},
{
"from": "gpt",
"value": "`xml --help`"
}
] |
[
{
"from": "human",
"value": "Execute a subcommand with input from a file or URI, printing to `stdout` via the `xml` command"
},
{
"from": "gpt",
"value": "`xml {{subcommand}} {{options}} {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Execute a subcommand using `stdin` and `stdout` via the `xml` command"
},
{
"from": "gpt",
"value": "`xml {{subcommand}} {{options}}`"
}
] |
[
{
"from": "human",
"value": "Execute a subcommand with input from a file or URI and output to a file via the `xml` command"
},
{
"from": "gpt",
"value": "`xml {{subcommand}} {{options}} {{path/to/input.xml|URI}} > {{path/to/output}}`"
}
] |
[
{
"from": "human",
"value": "Display help for a specific subcommand via the `xml` command"
},
{
"from": "gpt",
"value": "`xml {{subcommand}} --help`"
}
] |
[
{
"from": "human",
"value": "Display version via the `xml` command"
},
{
"from": "gpt",
"value": "`xml --version`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml pyx`."
},
{
"from": "gpt",
"value": "Convert an XML document to PYX (ESIS - ISO 8879) format.\nMore information: <https://xmlstar.sourceforge.net/docs.php>.\n"
}
] |
[
{
"from": "human",
"value": "Convert an XML document to PYX format via the `xml-pyx` command"
},
{
"from": "gpt",
"value": "`xml pyx {{path/to/input.xml|URI}} > {{path/to/output.pyx}}`"
}
] |
[
{
"from": "human",
"value": "Convert an XML document from `stdin` to PYX format via the `xml-pyx` command"
},
{
"from": "gpt",
"value": "`cat {{path/to/input.xml}} | xml pyx > {{path/to/output.pyx}}`"
}
] |
[
{
"from": "human",
"value": "Display help via the `xml-pyx` command"
},
{
"from": "gpt",
"value": "`xml pyx --help`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xml select`."
},
{
"from": "gpt",
"value": "Select from XML documents using XPATHs.\nTip: use `xml elements` to display the XPATHs of an XML document.\nMore information: <https://xmlstar.sourceforge.net/docs.php>.\n"
}
] |
[
{
"from": "human",
"value": "Select all elements matching \"XPATH1\" and print the value of their sub-element \"XPATH2\" via the `xml-select` command"
},
{
"from": "gpt",
"value": "`xml select --template --match \"{{XPATH1}}\" --value-of \"{{XPATH2}}\" {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Match \"XPATH1\" and print the value of \"XPATH2\" as text with new-lines via the `xml-select` command"
},
{
"from": "gpt",
"value": "`xml select --text --template --match \"{{XPATH1}}\" --value-of \"{{XPATH2}}\" --nl {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Count the elements of \"XPATH1\" via the `xml-select` command"
},
{
"from": "gpt",
"value": "`xml select --template --value-of \"count({{XPATH1}})\" {{path/to/input.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Count all nodes in one or more XML documents via the `xml-select` command"
},
{
"from": "gpt",
"value": "`xml select --text --template --inp-name --output \" \" --value-of \"count(node())\" --nl {{path/to/input1.xml|URI}} {{path/to/input2.xml|URI}}`"
}
] |
[
{
"from": "human",
"value": "Display help via the `xml-select` command"
},
{
"from": "gpt",
"value": "`xml select --help`"
}
] |
[
{
"from": "human",
"value": "Tell me about `xmlstarlet`."
},
{
"from": "gpt",
"value": "A command-line XML/XSLT toolkit.\nNote: You will likely need to know XPath: <https://developer.mozilla.org/en-US/docs/Web/XPath>.\nMore information: <https://xmlstar.sourceforge.net/docs.php>.\n"
}
] |
[
{
"from": "human",
"value": "Format an XML document and print to `stdout` via the `xmlstarlet` command"
},
{
"from": "gpt",
"value": "`xmlstarlet format {{path/to/file.xml}}`"
}
] |
[
{
"from": "human",
"value": "XML document can also be piped from `stdin` via the `xmlstarlet` command"
},
{
"from": "gpt",
"value": "`{{cat path/to/file.xml}} | xmlstarlet format`"
}
] |
[
{
"from": "human",
"value": "Print all nodes that match a given XPath via the `xmlstarlet` command"
},
{
"from": "gpt",
"value": "`xmlstarlet select --template --copy-of {{xpath}} {{path/to/file.xml}}`"
}
] |
[
{
"from": "human",
"value": "Insert an attribute to all matching nodes, and print to `stdout` (source file is unchanged) via the `xmlstarlet` command"
},
{
"from": "gpt",
"value": "`xmlstarlet edit --insert {{xpath}} --type attr --name {{attribute_name}} --value {{attribute_value}} {{path/to/fil... |
[
{
"from": "human",
"value": "Update the value of all matching nodes in place (source file is changed) via the `xmlstarlet` command"
},
{
"from": "gpt",
"value": "`xmlstarlet edit --inplace --update {{xpath}} --value {{new_value}} {{file.xml}}`"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.