https://ray.so is a little website to create stunning screenshots from code, supporting multiple languages, for example:
Invoke the workflow with ray
or ray <language>
whereas <language>
is one of ray.so's supported languages.
The workflow will use the current clipboard as source for the code, transform it and opens your standard browser with ray.so with your code.
It uses the standard settings of ray.so.
Take a look at the global variables in the workflow to change the standard settings, as well as the default language (which currently is csharp
).
- Copy the code you want to beautify
- Invoke Alfred via "ray" keyword, and optional the language you want to use
- ray.so will open in your browser, just hit CMD+C to copy the image to your clipboard
As mentioned above, the workflow will do some transformations of your code before opening ray.so.
- Remove leading and trailing blank lines
- Tries to count leading empty space (spaces and tabs) in the first line of your code and then trim all lines with that count.
- It will fail on code that has keywords that are not intended, for example in C# with
#pragma
- I may resolve or make this feature optional in a later version.
- It will fail on code that has keywords that are not intended, for example in C# with
None
Feel free to open issues and pull requests.
Workflow is downloadable on the Release page