(file: Path)
| 129 | |
| 130 | |
| 131 | def _get_file_options(file: Path) -> list[str]: |
| 132 | options = [] |
| 133 | |
| 134 | for line in file.read_text().split("\n"): |
| 135 | if not line.strip(): |
| 136 | continue |
| 137 | if not line.startswith("#"): |
| 138 | break |
| 139 | if not OPTION_PATTERN.match(line): |
| 140 | continue |
| 141 | option_string = line[1:].strip() |
| 142 | if option_string: |
| 143 | options.append(option_string) |
| 144 | |
| 145 | return options |
| 146 | |
| 147 | |
| 148 | def _interactive_widget(name, with_activate_button): |