Pasela Posted December 5, 2021 Share Posted December 5, 2021 I want to use lowercase UUID in snippets. such as following placeholders format: "{random:UUID.lowercase}" ...transform modifiers "{random:uuid}" ...lowercase variation name I know that UUIDs are not case-sensitive. I also know that there are workflows that can achieve this. I want to use lowercase for consistency and just want to use it in snippets. Link to comment Share on other sites More sharing options...
Vero Posted December 5, 2021 Share Posted December 5, 2021 @Pasela Welcome to the forum You can add a Transform Utility after you create your random UUID to lowercase it before proceeding further. In that case, you'll need to create a Snippet Trigger rather than a standard snippet to allow for the manipulation you want to do. Cheers, Vero Link to comment Share on other sites More sharing options...
Pasela Posted December 6, 2021 Author Share Posted December 6, 2021 Thank you for your advice. It seems that Snippet Trigger needs to be enabled Auto Expansion option. I don't want to enable the option. I want to select snippets manually. This is a snippet I'd like to create. { "id": "{random:UUID.lowercase}", <- I want to use lowercase modifier here. "name": "New Item" } Link to comment Share on other sites More sharing options...
Vero Posted December 6, 2021 Share Posted December 6, 2021 @Pasela My suggestion was to create a workflow, rather than use a standard snippet, giving you more flexibility on manipulation. Take a look at this workflow, where you type "uuid" and a lowercased UUID is copied to your clipboard, ready to paste wherever you need it. https://www.dropbox.com/s/a2ai0c8yiwonj3r/Lowercasing a UUID.alfredworkflow?dl=0 The keyword is connected to a Random utility that creates your UUID, then goes through a Transform utility that lowercases it, and finally onto a Copy to Clipboard output that copies it to your clipboard. You can edit the last object to check the box to paste automatically to the frontmost app if you'd like. Hope this helps Link to comment Share on other sites More sharing options...
Pasela Posted December 6, 2021 Author Share Posted December 6, 2021 Thank you for your quick response and nice workflow! As a matter of fact, I have created such a workflow. However, I would like to use lowercase UUID in many other snippets as well. So instead of creating a lot of workflows, I want to do that with the snippets-only feature. And I use snippet viewer's hotkey apart from general Alfred hotkey. It would be nice to have custom dynamic placeholder such as "{script:user_custom_script}" in the next major version 😃 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now