Skip to content

Effortlessly convert your code files into beautiful image snippets with syntax highlighting and customizable themes. Perfect for sharing code in a visually appealing way!

Notifications You must be signed in to change notification settings

Akai771/CodeFrame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeFrame

CodeFrame is a powerful tool for converting code files into beautifully styled image snippets. It features CLI support, syntax highlighting, and customizable themes.

Features

  • Syntax Highlighting: Supports multiple languages using highlight.js.
  • Customizable Themes: Choose from Monokai, GitHub, and Dracula themes.
  • CLI Tool: Easily convert code files from the command line.
  • Customization Options: Adjust padding, font size, background, and line numbers.

Installation

Install Globally

npm install -g codeframe-snap

Install Locally

npm install codeframe-snap

Usage

CLI Command

Use the codeframe command to convert a code file into an image:

codeframe convert <file> -o <output.png>

Example

codeframe convert example.js -o example.png

Options

  • -t, --theme <theme>: Select a theme (monokai, github, dracula). Default is monokai.
  • -p, --padding <pixels>: Set padding (in pixels). Default is 32.
  • -f, --font-size <pixels>: Set font size (in pixels). Default is 14.
  • --no-line-numbers: Hide line numbers.
  • --no-background: Use a transparent background.

Themes

Available themes:

  • Monokai
  • GitHub
  • Dracula
  • OceanWave
  • Duotone
  • AyuDark

Development

Running Tests

Run the test suite using:

npm run test

Contributing

Contributions are welcome! If you have suggestions or find issues, feel free to create an issue or pull request.

License

This project is licensed under the MIT License.

Author

Rishabh Shetty

About

Effortlessly convert your code files into beautiful image snippets with syntax highlighting and customizable themes. Perfect for sharing code in a visually appealing way!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published