(app, tag, title)
| 269 | return (sorted(content.items()), False) |
| 270 | |
| 271 | def register_index(app, tag, title): |
| 272 | domain_class = type(tag+'Domain', (Domain, ), { |
| 273 | 'name': tag, |
| 274 | 'label': 'Container domain for tag: ' + tag, |
| 275 | 'initial_data': {'objects': []}, |
| 276 | 'merge_domaindata': tag_domain_merge_domaindata, |
| 277 | 'get_objects': tag_domain_get_objects, |
| 278 | }) |
| 279 | index_class = type(tag+'Index', (Index, ), { |
| 280 | 'name': 'tag-index', |
| 281 | 'localname': title, |
| 282 | 'shortname': tag, |
| 283 | 'generate': tag_index_generate, |
| 284 | }) |
| 285 | app.add_domain(domain_class) |
| 286 | app.add_index_to_domain(tag, index_class) |
| 287 | |
| 288 | def init_tag_indices(app): |
| 289 | os.makedirs(os.path.join(dfhack.util.DOCS_ROOT, 'tags'), mode=0o755, exist_ok=True) |
no test coverage detected