Skip to content
forked from Aloxaf/silicon

Create beautiful image of your source code.

License

Notifications You must be signed in to change notification settings

dreness/silicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Silicon

crates.io license

Silicon is an alternative to Carbon implemented in Rust.

Why Silicon

Carbon is a wonderful tool to create a beautiful image of your source code.

But it is a web application, which brings the following disadvantages:

  • Cannot work without Internet & browser.
  • Doesn't work well with shell. (Although there is carbon-now-cli, its experience is not very good, especially when the network is not so good.)

However, Silicon doesn't have these problem. It's is implemented in Rust and can work without browser & Internet.

Silicon can render your source code within 0.2 second while carbon-now-cli takes several seconds on it.

Disadvantages

It's not as beautiful as Carbon...

Install

cargo install silicon

xclip is required on Linux for clipboard support.

Basic Usage

Read code from file

silicon main.rs -o main.png 

Read code from clipboard, and copy the result image to clipboard(--to-clipboard is only available on Linux)

silicon --from-clipboard --language rs --to-clipboard

see silicon --help for detail

TODO

  • MVP
  • More themes
  • More syntaxes support
  • Better font support
  • Clipboard support
    • Get code from clipboard
    • Paste the image to clipboard
      • Linux
      • Windows
      • MacOS
  • Watermark

About

Create beautiful image of your source code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 99.5%
  • Shell 0.5%