Skip to content

mario-deluna/code-gifs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Gifs

Generate a GIF from a code snippet using Tempest Highlight & PHP-GLFW.

This is the source code for the following blog post.

output

Installation

Note that this requires PHP > 8.1 and the PHP-GLFW extension.

git clone git@github.com:mario-deluna/code-gifs.git
cd code-gifs
composer install

Usage

There is a file in the project root called input.txt that contains the code snippet to be rendered. Modify this to your needs, and then run the following to preview the animation:

php bin/start.php

And run the following to produce an mp4 and gif file:

php bin/render.php

Note, rendering to an mp4 and/or gif requires ffmpeg to be installed.

About

Generate a GIF from a code snippet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages