it-tools icon indicating copy to clipboard operation
it-tools copied to clipboard

[TOOL IMPROVEMENT] Ignore linebreak indicators

Open Samurai1201 opened this issue 1 year ago • 2 comments

First of all, thank you for the awesome project, it's been helping a lot!

I've recently come across the following:

Some sources add line break indicators like \ to structure their docker run command.

Example input:

docker run -d --restart unless-stopped \
  -e DISPLAY_NAME="zoomrec" \
  -v $(pwd)/recordings:/home/zoomrec/recordings \
  -v $(pwd)/example/audio:/home/zoomrec/audio \
  -v $(pwd)/example/meetings.csv:/home/zoomrec/meetings.csv:ro \
  -p 5901:5901 \
  --security-opt seccomp:unconfined \
kastldratza/zoomrec:latest

Currently, if not removed manually, these lead to a flawd output by the docker run to docker compose converter.

Example output:

version: '3.9'
services:
    zoomrec:
        command: \
        image: zoomrec
        environment:
            - DISPLAY_NAME=
        restart: unless-stopped

Other tools (i.e. composerize) ignore these characters.

Could you please look into implementing a similar mechanism for ignoring explicit line breaks?

Samurai1201 avatar Dec 24 '23 23:12 Samurai1201

Hi @Samurai1201 and @CorentinTh, fixed in #845

sharevb avatar Feb 04 '24 20:02 sharevb