Skip to content

v0.5.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@kelko kelko released this 12 Oct 07:24
· 22 commits to main since this release
911cbe9

⚠️ CONTAINS BREAKING CHANGE ⚠️

For all commands creating textual content (SET-TEXT-CONTENT, ADD-TEXT-CONTENT, ADD-COMMENT, SET-ATTR) instead of only passing a pre-defined string value now also sub-pipelines can be used to read that string value from some place. E.g. read it from a (different) attribute of a (different) element or read the text content.

  • first step of such sub-pipeline always selects element to read the value from

    • USE-ELEMENT: take the target element and run value extraction on that
    • USE-PARENT: take the parent of the target element and run value extraction on that
    • QUERY-ELEMENT: run a CSS selector query on the target element and run value extraction on all matches
    • QUERY-PARENT: run a CSS selector query on the parent of the target element and run value extraction on all matches
    • QUERY-ROOT: run a CSS selector query on the root of the target element and run value extraction on all matches
  • second step of such sub-pipeline always defines which value to read from selected element (attr, text-content)

    • GET-ATTR: read an attribute of the selected element
    • GET-TEXT-CONTENT: read the textContent of the selected element
  • future additions:

    • value-manipulating steps will be possible (up-casing, down-casing, regex-based replace)
    • maybe: a "quote"-like command to read text content from a file

also:

  • new command "QUERY-REPLACED", usable in sub-pipelines for REPLACE

    allows to query the soon-to-be-replaced element, e.g. to extract sub-nodes

BREAKING CHANGES:

  • Rename ONLY to EXTRACT-ELEMENT (kept old name as alias, old alias is removed)
  • Rename WITHOUT to REMOVE-ELEMENT (kept old name as alias, old alias is removed)
  • Renamed alias FOR to WITH for FOR-EACH
  • Renamed READ-FROM to LOAD-FILE

Full Changelog: 0.4.2...0.5.0