Skip to content

Option to edit file in-place #63

Description

@mcandre

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions