Files
obitools4/autodoc/examples/obiscript/annotate.lua
T

10 lines
279 B
Lua
Raw Normal View History

2026-04-07 08:36:50 +02:00
-- Adds a 'sample' attribute by extracting the prefix before the first underscore
function worker(sequence)
local id = sequence:id()
local sample = string.match(id, "^(.-)_")
if sample then
sequence:attribute("sample", sample)
end
return sequence
end