Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skanehira/code2img
generating images of source code
https://github.com/skanehira/code2img
Last synced: about 1 month ago
JSON representation
generating images of source code
- Host: GitHub
- URL: https://github.com/skanehira/code2img
- Owner: skanehira
- License: mit
- Archived: true
- Created: 2020-07-07T15:53:40.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T00:30:11.000Z (over 1 year ago)
- Last Synced: 2024-06-19T00:25:47.388Z (3 months ago)
- Language: Go
- Homepage:
- Size: 13 MB
- Stars: 64
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# code2img
`code2img` can generate image of source code.
This was inspired by [carbon](https://carbon.now.sh/) and [silicon](https://github.com/Aloxaf/silicon)![](https://i.imgur.com/TjoOQct.gif)
## Features
- Doesn't need browser & Internet
- Copy image of source code to clipboard
- Supported [some](https://xyproto.github.io/splash/docs/all.html) color schemes
- Supported [some](https://github.com/alecthomas/chroma#supported-languages) languages## Usage
```sh
$ code2img
code2img - generate image of source codeVersion: 1.2.0
Usage:
$ code2img -t monokai main.go main.png
$ echo 'fmt.Println("Hello World")' | code2img -ext go -t native -o sample.png
$ code2img -c main.go-t color theme(default: solarized-dark)
-o output file name(default: out.png)
-c copy to clipboard
-l print line
-ext file extension
```## Requirements
- `xclip` (if copy image to clipboard in linux)## Installtion
```sh
$ git clone https://github.com/skanehira/code2img
$ cd code2img && go install
```## Author
skanehira