MCPcopy Create free account
hub / github.com/vladmandic/sdnext / elem_id

Method elem_id

modules/scripts_manager.py:208–211  ·  view source on GitHub ↗

helper function to generate id for a HTML element, constructs final id out of script name, tab and user-supplied item_id

(self, item_id: str)

Source from the content-addressed store, hash-verified

206 return ""
207
208 def elem_id(self, item_id: str):
209 """helper function to generate id for a HTML element, constructs final id out of script name, tab and user-supplied item_id"""
210 title = re.sub(r'[^a-z_0-9]', '', re.sub(r'\s', '_', self.title().lower()))
211 return f'script_{self.parent}_{title}_{item_id}'
212
213
214current_basedir = paths.script_path

Callers 11

uiMethod · 0.80
uiMethod · 0.80
uiMethod · 0.80
uiMethod · 0.80
uiMethod · 0.80
uiMethod · 0.80
uiMethod · 0.80
uiMethod · 0.80
uiMethod · 0.80
uiMethod · 0.80
uiMethod · 0.80

Calls 1

titleMethod · 0.95

Tested by

no test coverage detected