diff --git a/Dockerfile b/Dockerfile index 5b6bff2ea74d3ca08ba0c8bbdb6355a252d7b27f..15cc297d17b151779a7665827ae0e02dd597bb3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM golang:1.11-alpine3.8 as on-change +FROM golang:1.11-alpine3.8 as golang RUN apk --update add git && \ - rm -rf /var/cache/apk/* && \ - /usr/local/go/bin/go get github.com/spelufo/on-change + /usr/local/go/bin/go get github.com/spelufo/on-change && \ + /usr/local/go/bin/go get github.com/sugyan/ttyrec2gif FROM debian:buster-slim -COPY --from=on-change /go/bin/on-change /usr/local/bin +COPY --from=golang /go/bin/on-change /go/bin/ttyrec2gif /usr/local/bin/ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ fonts-font-awesome \ diff --git a/README.md b/README.md index d2b4a38e99085c8ba30f7f72cdbbc6a930f2c1bf..6cf40fcf0ac17471a102cb647eed4b17785fe112 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ See the example folder for more details. - [XeTex](http://xetex.sourceforge.net/) - [on-change](https://github.com/spelufo/on-change) - [groff](https://www.gnu.org/software/groff/) +- [ttyrec2gif](https://github.com/sugyan/ttyrec2gif) ## License diff --git a/example/Makefile b/example/Makefile index c8badc1e014a90cc0be4d9331ff9085986425b4f..5bfc7ee1e354abbf312f636bb2761e95b4689009 100644 --- a/example/Makefile +++ b/example/Makefile @@ -3,6 +3,7 @@ all: presentation.pdf presentation.pdf: diagram.pdf +presentation.pdf: prompt.gif %.pdf: %.md pandoc -t beamer $< -o $@ @@ -10,5 +11,8 @@ presentation.pdf: diagram.pdf %.pdf: %.dot dot $< -Tpdf > $@ +%.gif: %.tty + ttyrec2gif -in $< -out $@ + clean: - - rm *.pdf + - rm *.pdf *.gif diff --git a/example/presentation.md b/example/presentation.md index af2336d5497e91d9065a91b6f1ca9e77f8a16944..23bf6609a24f2ef82969e4434f7e5873e20e1534 100644 --- a/example/presentation.md +++ b/example/presentation.md @@ -13,3 +13,7 @@ author: Your name here ## Diagram  + +## Animated gif + + diff --git a/example/prompt.tty b/example/prompt.tty new file mode 100644 index 0000000000000000000000000000000000000000..038256d7b9af09ba3790cf4bbc66912662a48123 Binary files /dev/null and b/example/prompt.tty differ