I want to post syntax highlighted code on my blog but I can’t find any online service
that would do that for me so I thought I could hook it up using pygments
Anyone knows how to hook it up from an emacs buffer ?
I need to invoke something like these examples but from command line.
I would recommend the use of htmlize in this case. Pygments is nice, but if you have Emacs set up with color themes and have a mode that already knows how to syntax highlight your code, htmlize will leverage that and take give you HTML that looks just like your Emacs buffer.
If you have a light background in your blog, try
color-theme-high-contrastorcolor-theme-blipp-blopp. If it is dark, trycolor-theme-taming-mr-arnesonorcolor-theme-comidia. Those are my personal favorites.