Header image
avatar
Sönke Ludwig • Sat, 14 Jun 2025

Exceptional Introduction of the New Snippet Feature · Release Candidate 21

Aside from the usual bug fixes that are expected for this development phase, shortly before our first official release, we decided to make an exception and add a small but very handy feature for enabling advanced workflows.

Snippet Settings

“Snippets” are a form of JavaScript (or rather ECMA script) based extension that is very easy to author and install. In contrast to the existing add-on system that enables the creation of more complex program extensions that consist of multiple menu entries and support their own extension specific set of settings, a snippet just corresponds to a single menu entry.

The big advantage is that it becomes trivial to share and install snippet based extensions — to share a useful snippet, you can simply open a thread tagged with snippet in the new Addons and Snippets section of the forums and paste the script into a code block that starts with a ```JS line. Others who want to use the snippet can copy the script to their clipboard using the button and then go to “Snippets” → “Add Snippet…” in Aspect's settings dialog to paste it into the “Source Code” field there (see the screenshot).

If the first line of the script is a single line comment (e.g. // Example Snippet), the comment will automatically be used as the caption for the corresponding menu entry and nothing else needs to be done. You can optionally go to the “Shortcuts” section to assign a keyboard shortcut, but in general, the snippet is now installed and ready to be used. The menu entry for the snippet will be in the the “File” menu on Windows and Linux and in the “Aspect” menu on macOS.

To get this started, I've posted two example snippets on the forum that solve two previously reported issues that didn't quite warrant a new core feature in the application itself:

  • Write All Keywords to Text File: This simply allows to store all keywords that have been encountered in the currently opened library to a text file — useful for authoring keyword presets.
  • Delete RAWs of Selected RAW+JPEG Pairs: Moves the RAW files corresponding to all selected RAW+JPEG pairs to the library trash. This is useful for workflows where you want to keep the JPEG for sub par photos, but delete the RAWs in order to save storage space.

Our hope with snippets is that this will enable a lot of advanced or specialized functionality much quicker and for more people than up to now, where we either had to integrate that functionality into the application directly, which is always a trade-off between adding functional power and making the application more complicated, or where someone had to write and publish an add-on, which is more involved and can't be distributed in a nice way, yet.

If you know a little bit of JavaScript and have an idea for a small feature that doesn't exist yet, feel free to take a look at the examples and the (still very basic) API documentation and post your result on the forum! As always, see the change log for the full list of changes.

0 comments