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)
| 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 | |
| 214 | current_basedir = paths.script_path |