Syntax highlight server for solusipse/fiche.
Piotr Czajkowski ec0eee3b35 Less is better | %!s(int64=3) %!d(string=hai) anos | |
---|---|---|
.github | %!s(int64=4) %!d(string=hai) anos | |
html | %!s(int64=4) %!d(string=hai) anos | |
testFiles | %!s(int64=4) %!d(string=hai) anos | |
.deepsource.toml | %!s(int64=3) %!d(string=hai) anos | |
LICENSE.md | %!s(int64=4) %!d(string=hai) anos | |
README.md | %!s(int64=3) %!d(string=hai) anos | |
detectLanguage.go | %!s(int64=4) %!d(string=hai) anos | |
detectLanguage_test.go | %!s(int64=4) %!d(string=hai) anos | |
generateHTML.go | %!s(int64=3) %!d(string=hai) anos | |
go.mod | %!s(int64=4) %!d(string=hai) anos | |
go.sum | %!s(int64=4) %!d(string=hai) anos | |
server.go | %!s(int64=3) %!d(string=hai) anos |
I'm using the great solusipse/fiche. It generates text files, but I want syntax highlighting and line numbers. So I've created this server.
It's using alecthomas/chroma for generating HTML files with syntax highlighting, but language detection is my own creation as chroma's one doesn't detect what I want.
By default you'll be served with HTML version of your paste, if you want TXT then simply add /t to the link, like http://localhost/xxxx/t
.
fiche's author provides his own solution. If you're not performance freak (it generates HTML with every request, not once like mine, plus it's Python) and are not afraid of Python and Flask on your server it could be better solution for you.
This project was created mainly for fun, so don't expect much;)