Skip to content

Custom Resource provider for shell commands? _or...how to get cheat Pkl and get a UUID for something_ #1006

Answered by HT154
mobileskyfi asked this question in Q&A

You must be logged in to vote

One big obstacle here is determining what seed should when you're generating multiple identified resources! I've found a few ways to do this in different situations that might be viable:

  • Hash related data, eg. read("uuid:\(new PcfRenderer {}.renderValue(<value without uuid>).sha1)")
  • Use (or hash) the destination file path, which works decently when there's a fixed number/variety of UUIDs per file

If you're hashing you can also directly generate UUIDs from those hashes if you're clever and save all the trouble of an external reader entirely.

Replies: 1 comment 2 replies

You must be logged in to vote
2 replies
@HT154

HT154 Mar 4, 2025
Collaborator

Answer selected by mobileskyfi
@mobileskyfi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants