Jump to content

Lowercase UUID placeholder


Recommended Posts

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

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

@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. 

Screenshot 2021-12-06 at 12.26.12.png

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...