For my blog on email automation with AppleScript I wanted the original syntax coloring of AppleScript. I only found some very old CLI which made different CSS every time. I rewrote the CLI in Xojo and made a little free app called “Convert AppleScript to Html”.
It’s easy to use:
- Select File → Open Script File from the menu or click on the Open Script File button in the window. You can also do a copy-and-paste into the AppleScript text area.
- Click on the button “Convert to Html”. In the upper right area you will see the html in a Html viewer. The lower right area contains the html code.
- You can copy-and-paste the html into the clipboard. Or you can do a File → Save Html to save the html into a file.
The html is simple on purpose and without CSS. If you want CSS support then let me know.
Download is available at Other Applications .
4 Likes
Have you come across Prism?
It handles Applescript (amongst many other languages).
The description of Prism is full of jargon:
Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, Uno Platform and WinUI. Separate releases are available for each platform and those will be developed on independent timelines. Prism provides an implementation of a collection of design patterns that are helpful in writing well-structured and maintainable XAML applications, including MVVM, dependency injection, commands, EventAggregator, and others. Prism’s core functionality is a shared code base supported in .NET Standard 2.0, .NET Framework 4.5 / 4.7. Those things that need to be platform specific are implemented in the respective libraries for the target platform. Prism also provides great integration of these patterns with the target platform. For example, Prism for Xamarin Forms allows you to use an abstraction for navigation that is unit testable, but that layers on top of the platform concepts and APIs for navigation so that you can fully leverage what the platform itself has to offer, but done in the MVVM way.
There is no mention of AppleScript. I use Xojo and not .Net.
Apologies - I copied the wrong link.
This is the Prism I meant: https://prismjs.com
It’s a Javascript-based syntax highlighter.
1 Like
Thanks, that looks way more interesting than the other Prism. I’m using the AppleScript code on my blog where I can only use straight html. But I’ll check how I can use Prism with RapidWeaver.
1 Like