Germanium is an alternative to Carbon and Silicon implemented in Go.

Germanium

Germanium is an alternative to Carbon and Silicon implemented in Go.

screenshot

Germanium can work without browser and internet like Silicon.

Usage

germanium

USAGE:
    germanium [FLAGS] [FILE]

FLAGS:
    -o                Write output image to specific filepath [default: ./output.png]
    --no-line-number        Hide the line number
    --no-window-access-bar  Hide the window access bar

Example

Generate image From file

germanium -o main.png main.go

Generate image without line number

germanium --no-line-number -o main.png main.go

Generate image without window control bar

germanium --no-window-access-bar -o main.png main.go

Install

GitHub releases

You can download from here.

Build from source

git clone https://github.com/matsuyoshi30/germanium
cd germanium && go install

Requirements

  • go1.16

LICENSE

MIT

Author

matsuyoshi30

Comments
  • Add style and list-styles options

    Add style and list-styles options

    • The default style is set to dracula
    • Background color of style gets used for window background color
    • If tokens have missing colors, white or black are used based on contrast to background. Same thing happens for line numbers.
  • Any plan to support chinese chars ?

    Any plan to support chinese chars ?

    chinese chars can not be rendered normally.

    test.go:

    package main
    
    import "fmt"
    
    func main()  {
    	fmt.Println("hello你好")
    }
    
    

    test.png: test

  • embed package

    embed package

    Hi. I wanted to try out your tool, but i get the following message when go install or go get: font.go:4:2: package embed is not in GOROOT (/usr/local/Cellar/go/1.15.8/libexec/src/embed). Appreciate your help. Cheers

  • Handle special characters when using stdin

    Handle special characters when using stdin

    The output image is unintended when executed

    echo '(germanium--remove-extra-indentation (replace-regexp-in-string "\n$" "" (buffer-substring-no-properties start end)))' | germanium -l lisp
    

    Related: https://github.com/matsuyoshi30/germanium-el/issues/7

  • Add option to remove extra indentation

    Add option to remove extra indentation

    When using germanium for contents like below,

    	err = foo.Bar()
    	if err != nil {
    		return err
    	}
    

    generated image be like

    err = foo.Bar()
    if err != nil {
    	return err
    }
    
  • Support for using fallback fonts for missing glyphs

    Support for using fallback fonts for missing glyphs

    Currently if the font you select doesn't have glyphs for some characters, it doesn't render properly. So it would be great if one could set fallback fonts.

    I found this issue that may be related, and multiface in the comments.

Related tags
A full-featured license tool to check and fix license headers and resolve dependencies' licenses.
A full-featured license tool to check and fix license headers and resolve dependencies' licenses.

SkyWalking Eyes A full-featured license tool to check and fix license headers and resolve dependencies' licenses. Usage You can use License-Eye in Git

Dec 26, 2022
A Go (golang) library for parsing and verifying versions and version constraints.

go-version is a library for parsing versions and version constraints, and verifying versions against a set of constraints. go-version can sort a collection of versions properly, handles prerelease/beta versions, can increment versions, etc.

Jan 9, 2023
🤖🤝A tool to test and analyze storage and retrieval deal capability on the Filecoin network.

Dealbot A tool to test and analyze storage and retrieval deal capability on the Filecoin network. Getting Started Clone the repo and build: git clone

Sep 10, 2022
Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.
Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Jan 2, 2023
CUE utilities and helpers for working with tree based objects in any combination of CUE, Yaml, and JSON.

Cuetils CUE utilities and helpers for working with tree based objects in any combination of CUE, Yaml, and JSON. Using As a command line binary The cu

Dec 24, 2022
Hex dump and read values of files quickly and swiftly with Go-Hex a program designed to dump any file in a hexadecimal format

Go-Hex Hex dump and read values of files quickly and swiftly with Go-Hex a program designed to dump any file in a hexadecimal format Dump Hashes ----

Oct 10, 2021
A process that receives probe information and stores it in a database for reporting and analysis

probed is a process that receives probe information and stores it in a database for reporting and analysis.

Nov 2, 2022
Golang: unify nil and empty slices and maps

unifynil, unify nil and empty slices and maps in Golang Empty slices and maps can be nil or not nil in Go. It may become a nightmare in tests and JSON

Jan 16, 2022
🍕 Enjoy a slice! A utility library for dealing with slices and maps that focuses on type safety and performance.

?? github.com/elliotchance/pie Enjoy a slice! pie is a library of utility functions for common operations on slices and maps. Quick Start FAQ What are

Dec 30, 2022
Code Generation for Functional Programming, Concurrency and Generics in Golang

goderive goderive derives mundane golang functions that you do not want to maintain and keeps them up to date. It does this by parsing your go code fo

Dec 25, 2022
Implementation of do255e and do255s in Go

Go Implementation of do255e and do255s This is a plain Go implementation of do255e and do255s. It is considered secure; all relevant functions should

Aug 15, 2022
MemBi is all the members of bugbounty and infosec project.
MemBi is all the members of bugbounty and infosec project.

Member of Bugbounty and Infosec ?? What is MemBi? MemBi is all the members of bugbounty and infosec project. If you don't know who to follow, see! ??

Sep 23, 2022
sigurls is a reconnaissance tool, it fetches URLs from AlienVault's OTX, Common Crawl, URLScan, Github and the Wayback Machine.

sigurls is a reconnaissance tool, it fetches URLs from AlienVault's OTX, Common Crawl, URLScan, Github and the Wayback Machine. DiSCLAIMER: fe

May 22, 2021
Customisable and automated HTTP header injection
Customisable  and automated HTTP header injection

headi Customisable and automated HTTP header injection. Example run from the HTB machine Control: InsecureSkipVerify is not currently configured, if y

Dec 31, 2022
A tool and library for using structural regular expressions.

Structural Regular Expressions sregx is a package and tool for using structural regular expressions as described by Rob Pike (link).

Dec 7, 2022
This project provides some working examples using Go and Hotwire Turbo.

hotwire-golang-website This project provides some working examples using Go the hotwire/turbo library published by basecamp.

Dec 29, 2022
Creates Prometheus Metrics for PolicyReports and ClusterPolicyReports. It also sends PolicyReportResults to different Targets like Grafana Loki or Slack
Creates Prometheus Metrics for PolicyReports and ClusterPolicyReports. It also sends PolicyReportResults to different Targets like Grafana Loki or Slack

PolicyReporter Motivation Kyverno ships with two types of validation. You can either enforce a rule or audit it. If you don't want to block developers

Aug 6, 2021
A directory of hardware related libs, tools, and tutorials for Go

Go + hardware This repo is a directory of tools, packages and tutorials to let you introduce Go in your hardware projects. Why Go? Go can target platf

Dec 30, 2022
Molecule is a Go library for parsing protobufs in an efficient and zero-allocation manner

Molecule Molecule is a Go library for parsing protobufs in an efficient and zero-allocation manner. The API is loosely based on this excellent Go JSON

Jan 5, 2023