marionebl / svg-term-cli

Share terminal sessions via SVG and CSS
MIT License
3.48k stars 116 forks source link

Propose a simple docker image #40

Open voiski opened 5 years ago

voiski commented 5 years ago

Wrap the tool inside the docker to let its simple use without the need to install node in the environment. It could sound useless for some folks, but imagine if you need to handle a ruby, java, etc. tools? Some will prefer to keep the environment clean. Docker will give this easy solution.

Follow the instructions to automate the docker image publishing: https://docs.docker.com/docker-hub/builds/ Example of build: https://cloud.docker.com/repository/registry-1.docker.io/voiski/svg-term-cli/builds/187f1043-9cfd-4961-9e12-101667e6b512

Please let me know if I should remove that image, I did more for demonstration and test.

marionebl commented 5 years ago

This is interesting, thank you. I am on an extended vacation and will be able to dig a bit deeper in March. I‘ll be in touch then

voiski commented 5 years ago

I have this function that I run locally to record my bash sessions:

function bash-record(){
    [ -z "$1" ] && echo "Usage: $0 <name>" && return 1
    asciinema rec "/tmp/$1.cast" -y --overwrite
    time docker run --rm -v /tmp:/tmp -v $PWD:/data asciinema/asciicast2gif \
        -s 10 \
        -S 1 \
        "/tmp/$1.cast" "./$1.gif"
}

function bash-record-svg(){
    [ -z "$1" ] && echo "Usage: $0 <name>" && return 1
    asciinema rec "/tmp/$1.cast" -y --overwrite
    time docker run --rm -v /tmp:/tmp -v $PWD:/data voiski/svg-term-cli \
        --in "/tmp/$1.cast" --out "/data/$1.svg"
        # Missing speed
}

I'm sad that we can't show svg in github =(

liudonghua123 commented 4 years ago

I like this features, Does it support term/profile options?