Skip to content

trex 0.2.0

Choose a tag to compare

@MarkusMcNugen MarkusMcNugen released this 01 Oct 20:25

Added

  • The trex binary for Windows x64, Linux x64, FreeBSD x64 and macOS arm64
    on the GitHub release.
  • A fields line in pattern files, which the file trex infer saves
    carries: a saved build read again keeps its casts, record starts, nested
    fields and accessors on every surface. scan --fields prints its records
    table, and Python's Pattern.fields and Pattern.records(text) read it.
  • Python: trex.files() lists the files a scan of some paths reads,
    trex.read() gives a file's text decoded as a scan decodes it,
    trex.texture() names what a text reads as mostly, and Pattern.diff()
    and Pattern.rewrite_file() diff a rewrite of a file or write it in the
    file's own encoding.
  • PowerShell: Get-TrexFile -Binary.

Changed

  • An explanation names the token of a declared shape or kind by its
    declaration (ticket), as a token listing does.
  • The shape axis reads a region as a table only where template runs cover
    more than half of its bytes.
  • trex seam --recover FILE leaves the word count out of its header.
  • Select-TrexMatch, Edit-TrexText and Protect-TrexText write a warning
    naming a file given by -Path or -LiteralPath that holds a NUL byte.

Fixed

  • trex scan --files and Get-TrexFile listed files holding a NUL byte that
    a scan leaves unread; they leave them out unless --binary or -Binary
    asks for them.
  • rewrite, redact and scan --rules --fix passed over one named file
    holding a NUL byte without a word under --dry-run, --in-place and
    --interactive; they refuse it and exit with failure, as they do when
    writing to the standard output.
  • Python Match.explain reports the rung of the scan ladder that answered,
    as scan --explain does.
  • The PowerShell module reads a pattern's relative @file paths against
    PowerShell's current location.

Removed

  • Python Match.explain takes no route=.