If you're looking for this, but with an API, I built <a href="https://sourcecodeshots.com" rel="nofollow">https://sourcecodeshots.com</a> to power syntax highlighting and Open Graph images of code for <a href="https://essay.dev" rel="nofollow">https://essay.dev</a>.<p>I initially used carbon.now.sh, but they don't have an API, and the community-provided API is pretty slow because it uses a headless browser to generate the image.<p>Source Code Shots uses VSCode's syntax-highlighting engine, so the highlighting is about as good as you can get and I can fully support a lot of languages that CodeMirror or Highlight.js haven't gotten to.<p>The docs, <a href="https://sourcecodeshots.com/docs" rel="nofollow">https://sourcecodeshots.com/docs</a>, have plenty of examples of how to use it as an API. You can email me at daniel@onegraph.com if there's something you need that it doesn't support.
Similar website: <a href="https://carbon.now.sh/" rel="nofollow">https://carbon.now.sh/</a> . They probably have more themes but I like this conciseness.
Not trying to be argumentative but this is completely over my head and I do not understand the purpose.<p>Is there some way to get a CSS snippet out for publishing in a blog/article/presentation or is it only images?<p>edit: is this purely to add a rounded border/pad that you wouldn't get with WND+SHIFT+S / CMD+SHIFT+4 for sharing on sites where you don't control the style?
I have to say this feels rather strange next to the functionality of my PrintScreen key.<p>Maybe I'm missing the point. I get that it's easier to look at than pastebin, but I'm struggling to grasp what else. I've always agreed that LOC is a terrible measurement, and similarly I don't delude myself into thinking positioned or colored code is more functional.
Fun to play with. Most surprising is the auto-indent when typing Clojure code.<p>The #1 missing feature is the ability to select a different typeface. #2 would be the ability to serve up an image from a URL like a pastebin or a-la speedtest.net speed test (<a href="https://www.speedtest.net/result/10946633415.png" rel="nofollow">https://www.speedtest.net/result/10946633415.png</a>)
Looks great!<p>I know it should have been more obvious, but I didn't realize the text was editable. I was looking for an 'upload your code' button. Maybe put one of those "Try Me!" badges with an arrow pointing to the code like on toy boxes?
Neat! This solves a problem for me with generating slides that include code snippets. I'm sure it helps with social media images and whatnot as well. It'd be great if you could also get a HTML snippet to embed into a site that would be a11y friendly!
Love it! Congrats and cool project. I think you killed this and have something awesome in your portfolio for a long time.<p>My only suggestion is these code snippets are fire on Twitter for a lot of people getting their RT/likes/following on.<p>Specifically, that means maybe adding an option for forcing some sizes that are ideal for share graphics (width/height, auto font-size, auto centering, etc..). Take the guess work out of it. Good luck!
Beautiful but useless, I prefer sharing code with simple code tag rather than code in images, so people can copy test correct etc. For me code should be compiled, so it should be in text not in image.
There is a certain level of straightforwardness that I gravitate towards when it comes to engineering graphics. Purple/Megenta gradients are the 2020 era Stripe/Apple-inspired aesthetic. Obviously, I am an outlier here and I do not want to diminish your efforts the slightest!<p>Beauty is subjective and I do not resonate with the cliche aesthetic (gradients, flat UI, soft pastel colors, rounded corners). It's a trend and it will come and go. I am inclined towards the timelessness of the International Style, Swiss Graphics, Brutalism, ultra modernist and offensively low-aesthetic-value aesthetics such as: <a href="https://git.sr.ht/~sircmpwn/core-go/tree/master/item/server/server.go" rel="nofollow">https://git.sr.ht/~sircmpwn/core-go/tree/master/item/server/...</a>
Our screenshot tool provides additional functionalities and predefined templates, which allows users to share stunning images and by saving them on codekeep , users can link to those screenshot, where users can select the code and copy it as needed.<p>You can add emojis, custom images, place logos of your favourite programming language or service, add twitter/facbook instagram handles, custom background.<p>Apart from the screenshot module, codekeep allows you to store and share code snippets, most of the ui is inspired from google keep and i have added more features on top of that, we named it codekeep (google keep for code snippets).<p>do checkout and let us know your thought :-)
<a href="https://codekeep.io/screenshot" rel="nofollow">https://codekeep.io/screenshot</a>
Either I'm doing something wrong or there isn't really any syntax highlighting for C++, other than numbers and strings.<p>Also, there's no syntax option for plain C, but that's an understandable oversight since a good 99% of C's syntax is shared with C++ anyway.<p>Lastly, when writing C/C++ it auto-detects Objective-C.
Just a few things I detected as a primarily C & C++ developer.<p>Other languages seem to come out great, and it's really a very nifty tool in the end.<p>Update: C# and Java seem to have a similar lack of coloring.
Feature request: This seems half-the-way there to a site I've been wanting for a long time, one that will give you a printer-friendly syntax highlighted view of a codebase.
This looks really cool, I would love some way to integrate it with a program tutorial.<p>Anyway you can use some type of cloud IDE to run these examples. For JavaScript that should be pretty easy
I need a tool which can split code nicely across pages of a book. And obviously it should output SVG so it looks great on high DPI devices. Another requirement is that sometimes the code should start somewhere in the middle of a page.
I see folks wondering about the use case - so here's one: I created a Github Action for use in Github Actions. The benefits:<p>- Easy to view and understand the image of the code v/s the code block text when using a mobile device. Why? Easier to scroll images v/s text.<p>- Members will no longer have to rely on the issue reporters and commenters to format their code blocks correctly. Using the in built formatter, the code is always structured properly<p>- Maintainers can style the code blocks to suit their project's language and guidelines and not put the onus of this on the issue reporter / commenter<p>Reference: <a href="https://github.com/callmekatootie/carbonate" rel="nofollow">https://github.com/callmekatootie/carbonate</a><p>I used Carbon to generate the images in this case - but you get the gist of what one can use images of code for
A shortcoming of this would seem to be that there are no line-numbers. (?) If you send a picture of code and want to discuss it with others it would be helpful to be able to refer to parts of the code by line-number.
I may be rather opinionated on this, but there are literally
community efforts to transcribe memes and other pictures
containing text so visually impaired people get access to
content, and meanwhile about every 3-4 weeks HN features yet
another web app that basically takes human readable text and
stores it in one of the most inefficient and inaccessible ways
possible. It becomes invisible to screenreaders, impossible to
copy-paste like you'd otherwise expect from text based content.<p>I don't want to come across as all too negative, but it somehow
feels really strange to have so many websites that basically
just take a fancy screenshot of text. To me it kind of comes
across like a developer version of those Instagram pictures of
meals at restaurants.
I love it. Will definitely use this for presentations.<p>The only missing feature I really need is Elixir syntax support (even though Ruby works for most examples)