Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to edit file in-place #63

Open
mcandre opened this issue Feb 4, 2023 · 0 comments
Open

Option to edit file in-place #63

mcandre opened this issue Feb 4, 2023 · 0 comments

Comments

@mcandre
Copy link

mcandre commented Feb 4, 2023

Hi,

I like the idea of htmlq, as overall I find both xmlstarlet and tidy(-html5) and to be fairly cumbersome and antiquated. And sed, of course, is not up to the challenge of accurately performing complex edits to (X)HTML documents.

However, xmlstarlet, tidy-html5 and sed all offer command line flags for in-place editing, which is super helpful when recursing over large directories in the context of an automated shell script.

Can we please add an optional flag to output the changes back to the same input file?

Perhaps there is already a flag for in-place editing, and I may have missed this somehow :)

As a workaround, one could write to a designated temporary output file path, then manually cp the temp file onto the original input file path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant