Coder Social home page Coder Social logo

tomeraberbach / src2img-cli Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 201 KB

🖼️ Converts source code to high quality images.

Home Page: https://npm.im/src2img-cli

License: MIT License

JavaScript 100.00%
filename src image renderer cli images screenshot beautiful src2img-cli converts-source

src2img-cli's Introduction

src2img-cli

Converts source code to high quality images.

Install

$ npm i src2img-cli

Install

$ npm i src2img-cli -g

If you encounter permission errors run the following instead:

$ sudo npm i src2img-cli -g --unsafe-perm=true --allow-root

The permission errors are related to puppeteer. See this issue.

Usage

Display the help information:

$ src2img

Output:

Usage: src2img [options] [command]

Options:
  -h, --help                       display help for command

Commands:
  render [options] <filenames...>  converts source code to high quality images
  presets                          lists saved presets
  open                             opens the presets file
  help [command]                   display help for command

Display the render help information:

$ src2img help render

Output:

Usage: src2img render [options] <filenames...>

converts source code to high quality images

Options:
  -o, --out <dir>      specifies an output directory (default: ".")
  -t, --type <type>    specifies an output file type (png or jpeg)
                       (default: "png")
  -n, --port <number>  specifies a port number (default: 8888)
  -p, --preset <name>  uses a preset
  -h, --help           display help for command

Simple rendering example:

$ src2img render myfile.js

Follow the prompts as they pop up and feel free to save a preset! You can reuse a saved preset using the -p or --preset flag as shown above.

Note that the best way to increase the resolution of the rendered image is to choose a high font size in the prompts.

Some rendered code:

example

Related

Contributing

Stars are always welcome!

For bugs and feature requests, please create an issue.

License

MIT © Tomer Aberbach

src2img-cli's People

Contributors

tomeraberbach avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.