Skip to content

Releases: kelko/html-streaming-editor

v0.8.0

02 Jan 08:37
Compare
Choose a tag to compare
v0.8.0 Pre-release
Pre-release

0.8 Features

  • Add support for input & output file being same
    Now output is only opened after processing is complete so hse can read from and write into same file

v0.7.1

19 Oct 16:04
f7f9509
Compare
Choose a tag to compare
v0.7.1 Pre-release
Pre-release

0.7.1 Features

  • Support CRLF Newline

    Additionally to simple space, tab and Unix new line (\n) also support Windows new line (\r\n) wherever whitespaces are supported

0.7 Features

  • Implement "Append" & "Prepend" instead of "Add" for element processing

    • The following commands have been removed:

      • ADD-ELEMENT
      • ADD-COMMENT
      • ADD-TEXT-CONTENT
    • Instead there are following, new commands:

      • APPEND-ELEMENT: same behaviour as previous ADD-ELEMENT
      • APPEND-COMMENT: same behaviour as previous ADD-COMMENT
      • APPEND-TEXT-CONTENT: same behaviour as previous ADD-TEXT-CONTENT
      • PREPEND-ELEMENT: similar to APPEND-ELEMENT, but new element is
        added as first child
      • PREPEND-COMMENT: similar to APPEND-COMMENT, but new comment is
        added as first child
      • PREPEND-TEXT-CONTENT: similar to APPEND-TEXT-CONTENT, but new text
        content is added as first child
  • Add support for DOCTYPE

    If a <!DOCTYPE > tag is present in the input it will be kept and
    written into the output, unless EXTRACT-ELEMENT is used to return only
    parts.

    ⚠️ KNOWN ISSUE ⚠️
    If present any DOCTYPE will be interpreted as HTML5. Originates in
    underlying lib.

  • Add support to read pipeline definition from file

    instead of passing the pipeline as parameter a file-named, prefixed by '@', can passed.
    The rest of the parameter will be interpreted as filename and opened to read the pipeline definition from there.

  • Allow for more whitespaces around pipe symbol

    multi-line pipeline definitions now possible

0.7 Bug Fixes

  • Fix bug with SET-TEXT-CONTENT: couldn't GET-TEXT-CONTENT while SET-TEXT-CONTENT on same element

Full Changelog: 0.6.0...0.7.1

v0.7.0

17 Oct 21:51
5f17878
Compare
Choose a tag to compare
v0.7.0 Pre-release
Pre-release

⚠️ CONTAINS BREAKING CHANGE ⚠️

Features

  • Implement "Append" & "Prepend" instead of "Add" for element processing

    • The following commands have been removed:

      • ADD-ELEMENT
      • ADD-COMMENT
      • ADD-TEXT-CONTENT
    • Instead there are following, new commands:

      • APPEND-ELEMENT: same behaviour as previous ADD-ELEMENT
      • APPEND-COMMENT: same behaviour as previous ADD-COMMENT
      • APPEND-TEXT-CONTENT: same behaviour as previous ADD-TEXT-CONTENT
      • PREPEND-ELEMENT: similar to APPEND-ELEMENT, but new element is
        added as first child
      • PREPEND-COMMENT: similar to APPEND-COMMENT, but new comment is
        added as first child
      • PREPEND-TEXT-CONTENT: similar to APPEND-TEXT-CONTENT, but new text
        content is added as first child
  • Add support for DOCTYPE

    If a <!DOCTYPE > tag is present in the input it will be kept and
    written into the output, unless EXTRACT-ELEMENT is used to return only
    parts.

    ⚠️ KNOWN ISSUE ⚠️
    If present any DOCTYPE will be interpreted as HTML5. Originates in
    underlying lib.

  • Add support to read pipeline definition from file

    instead of passing the pipeline as parameter a file-named, prefixed by '@', can passed.
    The rest of the parameter will be interpreted as filename and opened to read the pipeline definition from there.

  • Allow for more whitespaces around pipe symbol

    multi-line pipeline definitions now possible

Bug Fixes

  • Fix bug with SET-TEXT-CONTENT: couldn't GET-TEXT-CONTENT while SET-TEXT-CONTENT on same element

Full Changelog: 0.6.0...0.7.0

v0.6.0

13 Oct 09:18
478cb64
Compare
Choose a tag to compare
v0.6.0 Pre-release
Pre-release

⚠️ CONTAINS BREAKING CHANGE ⚠️

add commands for value processing inside string-value creating pipelines:

  • REGEX-REPLACE: Replace all string content matching a given regular expression with the given replacement (can use groups)
  • TO-UPPER: upper-case all text
  • TO-LOWER: lower-case all text
  • ADD-PREFIX: add a string prefix before the text
  • ADD-SUFFIX: add a string suffix after the text

BREAKING CHANGES:

  • Rename REPLACE to REPLACE-ELEMENT (alias MAP is kept)

Full Changelog: 0.5.0...0.6.0

v0.5.0

12 Oct 07:24
911cbe9
Compare
Choose a tag to compare
v0.5.0 Pre-release
Pre-release

⚠️ 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

v0.4.0

29 Sep 20:24
Compare
Choose a tag to compare
v0.4.0 Pre-release
Pre-release

new command:

  • READ-FROM{"file.html"}: read content from other HTML file and put it through the rest of the pipeline (for ADD-CONTENT or REPLACE)

v0.3.1

29 Sep 17:18
Compare
Choose a tag to compare
v0.3.1 Pre-release
Pre-release

Bug-fixing

  • handle empty comments correctly
  • use error handling instead of unwrap
  • add alias FOR for FOR-EACH

v0.3.0

28 Sep 22:17
Compare
Choose a tag to compare
v0.3.0 Pre-release
Pre-release

new command:

  • `REPLACE{selector ↤ _sub_pipeline}

v0.2.0

28 Sep 06:08
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release

new commands:

  • ADD-ELEMENT{ _sub_pipeline_ }: Adds the result of a sub pipeline as latest element of the currently selected elements
  • CREATE-ELEMENT{name}: Create a new HTML element with the given name

v0.0.8

25 Sep 09:24
Compare
Choose a tag to compare
v0.0.8 Pre-release
Pre-release

new commands:

  • SET-ATTR{attr_name ↤ 'string value}: sets or adds a given attribute
  • SET-TEXT-CONTENT{'string value'}: remove all children of an element and replaces it with a new text content child
  • ADD-TEXT-CONTENT{'string value'}: adds a new text content child
  • ADD-COMMENT{'string value'}: adds a new comment child