trquery 0.23.21

dotnet tool install --global trquery --version 0.23.21
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local trquery --version 0.23.21
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=trquery&version=0.23.21
                    
nuke :add-package trquery --version 0.23.21
                    

trquery

Summary

Execute a simple query of tree modifications.

Description

Reads a parse tree from stdin, executes a list of queries (insert, delete, or replace), and write the modified tree to stdout. The input and output are Parse Tree Data.

Usage

trquery insert xpath-expr string (; additional commands...)* trquery delete xpath-expr (; additional commands...)* trquery replace xpath-expr string (; additional commands...)*

Details

If '-c' option specified, read commands from the file. Otherwise, the command line args contain the commands.

For all commands, an XPath expression defines where an operation occurs. Commands are executed in order as they appear. The advantage of this command is that the parse tree does not have be re-read or written after each operation as with trinsert, trdelete, or trreplace.

Commands

grep <xpath> match-required? insert (before|after)? <xpath> match-required? <string> delete <xpath> match-required? delete-reattach <xpath> match-required? replace <xpath> match-required <string> move (before|after)? <xpath> match-required? <xpath>

Examples

Notes

If you are running MSYS2 on Windows, you may notice that XPaths are not being processed by this command correctly. To avoid the Bash shell from altering XPaths, type export MSYS2_ARG_CONV_EXCL="*", then execute your command.

Current version

0.23.21 Updated trgen templates to remove iconv call. Added assert command to trquery for parse tree validations.

License

The MIT License

Copyright (c) 2024 Ken Domino

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.23.21 0 6/6/2025
0.23.20 86 6/4/2025
0.23.19 75 6/4/2025
0.23.18 510 5/13/2025
0.23.17 3,783 3/7/2025
0.23.16 521 3/4/2025
0.23.15 132 2/25/2025
0.23.14 645 2/9/2025
0.23.13 406 1/19/2025
0.23.12 416 1/16/2025
0.23.11 2,598 12/18/2024
0.23.10 111 12/12/2024
0.23.9 123 11/29/2024
0.23.8 160 11/1/2024
0.23.7 4,237 10/9/2024
0.23.6 958 9/21/2024
0.23.5 141 9/15/2024
0.23.4 114 9/7/2024
0.23.3 1,156 8/15/2024
0.23.2 154 6/28/2024
0.23.1 129 6/22/2024
0.23.0 169 4/25/2024
0.22.0 223 2/26/2024
0.21.16 225 11/16/2023
0.21.15 131 11/16/2023
0.21.14 210 11/15/2023
0.21.13 172 11/14/2023
0.21.12 253 10/27/2023
0.21.11 318 10/24/2023
0.21.9 275 9/27/2023
0.21.8 263 9/26/2023
0.21.7 261 9/26/2023
0.21.6 256 9/20/2023
0.21.5 273 9/18/2023
0.21.4 233 9/17/2023
0.21.3 263 9/14/2023
0.21.2 222 9/4/2023
0.21.1 326 8/15/2023

# trquery
## Summary
Execute a simple query of tree modifications.
## Description
Reads a parse tree from stdin, executes a list
of queries (insert, delete, or replace),
and write the modified tree
to stdout. The input and output are Parse Tree Data.
## Usage
trquery insert xpath-expr string (; additional commands...)*
trquery delete xpath-expr (; additional commands...)*
trquery replace xpath-expr string (; additional commands...)*
## Details
If '-c' option specified, read commands from the file. Otherwise,
the command line args contain the commands.
For all commands, an XPath expression defines where an operation occurs.
Commands are executed in order as they appear. The advantage of this
command is that the parse tree does not have be re-read or written after
each operation as with trinsert, trdelete, or trreplace.
### Commands
grep <xpath> match-required?
insert (before|after)? <xpath> match-required? <string>
delete <xpath> match-required?
delete-reattach <xpath> match-required?
replace <xpath> match-required <string>
move (before|after)? <xpath> match-required? <xpath>
## Examples
## Notes
If you are running MSYS2 on Windows, you may notice that XPaths are not being
processed by this command correctly. To avoid the Bash shell from altering
XPaths, type _export MSYS2_ARG_CONV_EXCL="*"_, then execute your command.
## Current version
0.23.21 Updated trgen templates to remove iconv call. Added assert command to trquery for parse tree validations.
## License
The MIT License
Copyright (c) 2024 Ken Domino
Permission is hereby granted, free of charge,
to any person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.