Closed auerswal closed 4 years ago
@mbj4668 I'd love it if the tool could read from stdin. I see that this earlier fix was to remove any claim to support it, but would you consider a patch to restore stdin support? Probably (like the old rfcstrip) stdin would be used implicitly if no files are supplied, and also permitted via an explicit "-".
Sure, a PR that adds this support is welcome! The current code opens the input file twice; it first uses head -n 1
in order to guess the input format, and then parses the entire file (text or xml). So this needs to be changed.
The code tries to handle reading from STDIN by using
-
instead of a file name. This does not work in my tests on Ubuntu GNU/Linux 18.04 LTS:The usage output actually requires a file argument. A minimal patch to require a file argumet in the code as well would be: