ceps icon indicating copy to clipboard operation
ceps copied to clipboard

add recipe extension cep

Open wolfv opened this issue 1 year ago • 4 comments

wolfv avatar Apr 13 '24 09:04 wolfv

Discussion:

Technically, it would be nicer to solve this with a flexible script. Challenge: we only want to run over the new files in the prefix.

Should we leak "rust" regex features? Would be easy to use them from Python as well. We can also turn off the regex feature where capture groups can be referenced easily with $....

Example from Rust docs:

string: "Springsteen, Bruce"
regex: (?<last>[^,\s]+),\s+(?<first>\S+)
replacement: "$first $last"
result: "Bruce Springsteen"

wolfv avatar Apr 13 '24 09:04 wolfv

Python has \g<name> and \g<number> for that. So maybe there's a way to convert things more or less easily. The $ syntax is reasonable enough to me.

jaimergp avatar Apr 15 '24 16:04 jaimergp

Challenge: we only want to run over the new files in the prefix.

Can that be injected in the post_build namespace? A \0 separated list of paths in an env var or something? Maybe it overflows 😬. Maybe a file can be placed somewhere strategically which, upon parsing, returns the newly detected files.

jaimergp avatar Apr 15 '24 16:04 jaimergp

TODO:

  • [ ] I have recently been thinking about adding the compression settings to the build section so that compression can be configured easily per-output.

wolfv avatar May 10 '24 07:05 wolfv