I like to read source code on my Kindle, and thus I need to convert it to either epub or HTML.
I want the result to preferably have syntax highlighting and auto detection of source language. If not, even a tool to convert plain text to EPUB is enough.
Other requirements: CLI-based, unix
The best solution I have found thus far:
pandoc -s -f markdown <(ec '```python') *.py <(ec '```') -o a.epub