src2png - Convert source code to image - OSS Daily

Daily Open Source News for IT Engineer and Designer

Breaking

Home Top Ad

Post Top Ad

Saturday, October 7, 2017

src2png - Convert source code to image

There are many services that embed source code and display it, but depending on your blog it may not be supported. In addition, it does not correspond to the syntax highlight display of the code in the first place, and the code display sometimes becomes subtle.

Let's use src2png in such a case. Although it is an image, it displays the source code beautifully.

How to use src2png


It's easy to use, just pass the source code file to the src2png command.
  1. $ src2png SOURCE_FILE
Then it will generate beautiful images.


src2png sets up an HTTP server for development named Poi, and highlights the source code there. And it is a mechanism to take a screenshot using a headless browser. Changing fonts and changing hue can be controlled with style sheets.

src2png is open source software (MIT License) made by node / JavaScript.



No comments:

Post a Comment

Post Bottom Ad