Skip to content

Conversation

@voiski
Copy link

@voiski voiski commented Feb 11, 2019

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.

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 and easy to backup. Docker will give this easy solution.
Follow the instructions to build the image from here: https://docs.docker.com/docker-hub/builds/
I made a example here: https://cloud.docker.com/repository/docker/voiski/svg-term-cli/tags
> voiski/svg-term-cli may be out since it is more for demonstration
@marionebl
Copy link
Owner

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
Copy link
Author

voiski commented Feb 28, 2019

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
Copy link

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

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

Successfully merging this pull request may close these issues.

3 participants