If you're looking for this, but with an API, I built https://sourcecodeshots.com to power syntax highlighting and Open Graph images of code for https://essay.dev . 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. Source Code Shots uses VSCode's syntax-highlighting engine, so the highlighting is about as…
Show HN: Ray.so – Create images of your code
91–100 of 129 posts
Re: Show HN: Ray.so – Create images of your code
#92Earlier quoted context omitted.
Engineering documentation shouldn't be about making pretty pictures, it should be about functionalism and putting that at the top of the list just below accessibility. What do you know, people love fancy and decorative things. Just human nature.
When engineering and art combine though, you get beautiful things like 1970s NASA documentation: https://standardsmanual.com/products/nasa-graphics-standards...
The other is documentation for code, something that visually impaired people are able to do if the documentation is accessible.
Re: Show HN: Ray.so – Create images of your code
#93Maybe 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.
Re: Show HN: Ray.so – Create images of your code
#94I 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…
Sure let me watch your boring 25 minutes video just to MAYBE get a glance on that one line of code i am looking for...
Re: Show HN: Ray.so – Create images of your code
#95I 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…
I use fancy code display tools when making slide shows. Though in my case I have a plugin for Notepad++ that lets me copy syntax highlighted code from NP++ and paste it into PowerPoint with all the highlighting and formatting maintained. Super cool plugin. I can't just screenshot my editor (VSCode) because I use a theme that many people find violently irritating (DOS Edit). Anyway, this looks like someone's fun littl…
If this tool created an accessible SVG instead of a PNG then I think it would be getting a lot less criticism. There are accepted ways[0] to make SVGs accessible, and they are better for performance than the alternatives.
When you give people shiny tools that make it hard for visually impaired people to consume information, then more of that sort of content will be embedded in blogs, presentations, MOOCs or whatever else.
PowerPoint and Google Slides should really just get their act together with regards to rendering code blocks. It’s quite sad that in today’s world they still don’t have a built in way to show code on slides in a formatted and colorized way.
Re: Show HN: Ray.so – Create images of your code
#96Earlier quoted context omitted.
I use fancy code display tools when making slide shows. Though in my case I have a plugin for Notepad++ that lets me copy syntax highlighted code from NP++ and paste it into PowerPoint with all the highlighting and formatting maintained. Super cool plugin. I can't just screenshot my editor (VSCode) because I use a theme that many people find violently irritating (DOS Edit). Anyway, this looks like someone's fun littl…
The parent’s point is regarding accessibility of code examples, and your comment seems to be about the convenience of pasting an image of code into a tool that should make accessible text easy, but falls short when it comes to code. If this tool created an accessible SVG instead of a PNG then I think it would be getting a lot less criticism. There are accepted ways[0] to make SVGs accessible, and they are better for…
Re: Show HN: Ray.so – Create images of your code
#97Earlier quoted context omitted.
What would be great is if it generated an SVG with the screen-reader accessible title and description built in. [title] [long description] ...
Why do you even need SVG if you're on the web already though? Nothing in these code pictures requires more than basic CSS and HTML. You can go wild with fonts, gradients, shadows, etc. to make beautiful looking pre and code elements. Tools like prismjs will syntax highlight with spans. Everything is in plain old semantic HTML with aria properties where appropriate.
Re: Show HN: Ray.so – Create images of your code
#98If you're looking for this, but with an API, I built https://sourcecodeshots.com to power syntax highlighting and Open Graph images of code for https://essay.dev . 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. Source Code Shots uses VSCode's syntax-highlighting engine, so the highlighting is about as…
How do you create images without a headless browser?
Re: Show HN: Ray.so – Create images of your code
#99I 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…
I use fancy code display tools when making slide shows. Though in my case I have a plugin for Notepad++ that lets me copy syntax highlighted code from NP++ and paste it into PowerPoint with all the highlighting and formatting maintained. Super cool plugin. I can't just screenshot my editor (VSCode) because I use a theme that many people find violently irritating (DOS Edit). Anyway, this looks like someone's fun littl…
Re: Show HN: Ray.so – Create images of your code
#100If you're looking for this, but with an API, I built https://sourcecodeshots.com to power syntax highlighting and Open Graph images of code for https://essay.dev . 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. Source Code Shots uses VSCode's syntax-highlighting engine, so the highlighting is about as…
How do you create images without a headless browser?
It's a very imperative process and fairly slow on a cpu, but the nice thing is that I can run the same code in the browser to speed up development. The Rust project, https://github.com/Aloxaf/silicon, mentioned in another part of the comments is probably faster, but I didn't find it when I was searching for a solution.