bash - Automatic screenshots for shell tutorial -


i'm working on small bash tutorial programming course. alternate between explanations commands , images below


lorem ipsum dolor sit amet.. first image

lorem ipsum dolor sit amet... second image


i automatically generate these images given list of commands doing manually tedious. going screenshot cropped image easy part, i'm looking solutions "commands => screenshots" part.

for example, these 2 images generated following "instructions" :

clear ls saveas "img1.png"  clear mkdir example ls saveas "img2.png" 

i've looked @ http://ascii.io/docs/about , thinking of using similar technique : python script reading "instructions" , feed them subprocessed shell , calling screenshot utility when needed.

am trying reinvent wheel ? there tool used generate these kind of images ? or simplest way achieve goal ?

imagemagick's import can used capture window images using -window. hide menu, toolbar, tabbar, , scrollbar in terminal before using. use xwininfo(1) window id.

$ import -window 0x145cba2 terminal.png 

terminal.png


Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -