Git Product home page Git Product logo

snippit's Introduction

✂️ snippit

creates images of code snippets .

Installation

like any other go program:

go install github.com/juliusmh/snippit@latest

General

The font used is RobotoMono. Currently, this is fixed. The default render resolution is pretty low, given the default line height of 17. In order to increase resolution use the -scale X flag (default X=1). To see all available options use the -help flag.

Syntax highlighting is performed by chroma. For a list of all styles I recommend xyproto/splash's demo page. For a list of all lexers checkout chroma/lexers.

Configuration

snippit -l -w testdata/test.go 
  • -l To show line numbers
  • -w To show window

test.go

snippit -l -w -bw 0 -style solarized-light testdata/test.yaml 
  • -bw Border Width zero (hide border)
  • -style Apply stylesheet solarized-light

test.yaml

snippit -br 0 -style xcode-dark testdata/test.py
  • -br Border Radius zero

test.yaml

Upcoming

  • Filename in window header (decoration)
  • SVG output option

snippit's People

Contributors

juliusmh avatar

Stargazers

L3DLP avatar  avatar  avatar Tundara avatar Joel Hermanns avatar Wes McNamee avatar Mathijs van Veluw avatar Vertexwahn avatar Ivan Sotnikov avatar Ben B. avatar

Watchers

L3DLP avatar James Cloos avatar Tuna Aras avatar  avatar Tundara avatar

Forkers

l3dlp-sandbox

snippit's Issues

yaml is underwhelming

snippit --syntax yaml --out snippet.png --decorations --theme monokai-dark < workflow.yaml

snippet

compared to syntax highlighting in vscode:

image

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.