All Projects → Aloxaf → Silicon

Aloxaf / Silicon

Licence: mit
Create beautiful image of your source code.

Programming Languages

rust
11053 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Silicon

Carbon
🖤 Create and share beautiful images of your source code
Stars: ✭ 29,304 (+1564.05%)
Mutual labels:  presentation, snippets, carbon
code-slides
present your code as slides in VSCode
Stars: ✭ 17 (-99.03%)
Mutual labels:  snippets, presentation
Ncm R
R autocompletion for Neovim and vim 8 📝 📊 ⚡️
Stars: ✭ 102 (-94.21%)
Mutual labels:  snippets
Rose
Simple PHP search engine that supports Russian and English morphology
Stars: ✭ 111 (-93.7%)
Mutual labels:  snippets
Glsnip
copy and paste across machines
Stars: ✭ 107 (-93.92%)
Mutual labels:  snippets
Animationmaker
Create animated presentations and export them to a video or xml file.
Stars: ✭ 103 (-94.15%)
Mutual labels:  presentation
Lh Cpp
C&C++ ftplugins suite for Vim
Stars: ✭ 108 (-93.87%)
Mutual labels:  snippets
Nodeppt
This is probably the best web presentation tool so far!
Stars: ✭ 9,589 (+444.52%)
Mutual labels:  presentation
Custom Calendar View
The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months
Stars: ✭ 113 (-93.58%)
Mutual labels:  snippets
Carbon
Carbon is one of the components of Graphite, and is responsible for receiving metrics over the network and writing them down to disk using a storage backend.
Stars: ✭ 1,435 (-18.51%)
Mutual labels:  carbon
Laravel 5 Snippets
Laravel 5 Snippets for Sublime Text
Stars: ✭ 110 (-93.75%)
Mutual labels:  snippets
Sketchup Ruby Api Tutorials
SketchUp Ruby API Tutorials and Examples
Stars: ✭ 105 (-94.04%)
Mutual labels:  snippets
Sublime Robot Framework Assistant
Robot Framework plugin for Sublime Text3
Stars: ✭ 103 (-94.15%)
Mutual labels:  snippets
Unitylibrary
📚 Library of all kind of scripts, snippets & shaders for Unity
Stars: ✭ 1,968 (+11.75%)
Mutual labels:  snippets
Dotfiles
This is a mirror from https://gitlab.com/andreyorst/dotfiles
Stars: ✭ 103 (-94.15%)
Mutual labels:  snippets
Embedme
Utility for embedding code snippets into markdown documents
Stars: ✭ 113 (-93.58%)
Mutual labels:  snippets
Atom Turbo Javascript
Commands and snippets for faster Javascript and Typescript with the Atom Editor
Stars: ✭ 100 (-94.32%)
Mutual labels:  snippets
Carbonzipper
proxy to transparently merge graphite carbon backends
Stars: ✭ 104 (-94.09%)
Mutual labels:  carbon
Regex Snippets
Organized list of useful RegEx snippets
Stars: ✭ 109 (-93.81%)
Mutual labels:  snippets
Vscode Matlab
MATLAB support for Visual Studio Code
Stars: ✭ 114 (-93.53%)
Mutual labels:  snippets

Silicon

Crates.io Documentation CI License

Silicon is an alternative to Carbon implemented in Rust.

It can render your source code into a beautiful image.

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 problems. It's is implemented in Rust and can work without browser & Internet.

Silicon can render your source code on the fly while carbon-now-cli takes several seconds on it.

Disadvantages

It's not as beautiful as Carbon...

Install

Cargo

cargo install silicon

AUR

Silicon is available on AUR (Thanks to @radmen).

You can install it with any AUR helpers you like.

eg.

pikaur -S silicon

Homebrew

You can install Silicon using Homebrew:

brew install silicon

Dependencies

Ubuntu

sudo apt install expat
sudo apt install libxml2-dev
sudo apt install pkg-config libasound2-dev libssl-dev cmake libfreetype6-dev libexpat1-dev libxcb-composite0-dev

Fedora

sudo dnf install cmake expat-devel libxcb-devel freetype-devel libxml2-devel

Arch Linux

sudo pacman -S --needed pkgconf freetype2 fontconfig libxcb xclip

Examples

Read code from file

silicon main.rs -o main.png 

Read code from clipboard, and copy the result image to clipboard

silicon --from-clipboard -l rs --to-clipboard

Specify a fallback font list and their size

silicon -o main.png -l bash -f 'Hack; SimSun=31; code2000' <<EOF
echo Hello
echo 你好
echo ∠( ᐛ 」∠)_
EOF

Highlight specified line

silicon main.rs -o main.png --highlight-lines '1; 3-4'

Custom the image

silicon ./target/test.rs -o test.png \
    --shadow-color '#555' --background '#fff' \
    --shadow-blur-radius 30 --no-window-controls

Transparent background

The color can be #RGB[A] or #RRGGBB[AA]

silicon ./target/test.rs -o test.png --background '#fff0'

see silicon --help for detail

Adding new syntaxes / themes

Silicon reads syntax-definition and theme cache from bat's cache directory.

You can find the steps to add new syntaxes / themes for bat here: sharkdp/bat#adding-new-syntaxes--language-definitions.

Configuration file

You can write some common args to silicon --config-file.

Example:

# enable shadow
--shadow-color '#555'
--background '#fff'
--shadow-blur-radius 30
--no-window-controls

Related projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].