JFLarvoire / SysToolsLib

A library of Windows and Linux system management tools
Apache License 2.0
314 stars 93 forks source link

[Feature request | inicomp] Passing FILE1 and FILE2 via pipe #41

Open ohault opened 1 month ago

ohault commented 1 month ago

The goal would be to support a command like the following

c:>type FILE1.REG FILE2.REG | inicomp -f

Combined with https://github.com/JFLarvoire/SysToolsLib/issues/39, this will provide even more possibilities.

JFLarvoire commented 1 month ago

This is not possible, as there is no way to know where file 1 ends and file 2 begins.

What could be done is to pipe a single file on stdin, and use the special argument "-" to refer to that stream instead of a file name on the command line. Still I don't see a practical use case where this would be useful. (This makes sense only if .ini files themselves are piped-out by other commands.)

ohault commented 1 month ago

Indeed, I forgot to add a delimiter!

The goal would be to ingest into inicomp the result of a pre-processing performed both on FILE1 and FILE2 via for each a pipe

FILE1.ini | compact (1 + 2 =>)| inicomp > result.txt FILE2.ini | compact

Is there a standard and/or predefined delimiter for this purpose?

We can contextualize this as being related to graphics-based processing more akin to https://docs.pipewire.org/ for audio/video than pipe support in the OS.

Are there any graph-based processing tools/frameworks for file management or could Pipewire be used with text files as well?