mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Docs: Improve cmd index
Lists all commands with their short help. Also link to it.
This commit is contained in:
		
							parent
							
								
									14a5cd6c4c
								
							
						
					
					
						commit
						c770c1e39d
					
				
					 2 changed files with 6 additions and 3 deletions
				
			
		|  | @ -12,6 +12,8 @@ Command reference | |||
| 
 | ||||
| .. todo:: Can we warn on command groups that aren't included anywhere? | ||||
| 
 | ||||
| :ref:`List of all commands<cmd-cmd>` | ||||
| 
 | ||||
| .. toctree:: | ||||
|    :maxdepth: 2 | ||||
| 
 | ||||
|  |  | |||
|  | @ -474,7 +474,7 @@ class TagIndex(Index): | |||
|                 lis.append(( | ||||
|                     dispname, 0, docname, | ||||
|                     anchor, | ||||
|                     docname, '', typ | ||||
|                     '', '', '' | ||||
|                 )) | ||||
|         ret = [(k, v) for k, v in sorted(content.items())] | ||||
| 
 | ||||
|  | @ -513,18 +513,19 @@ class CommandIndex(Index): | |||
|         Qualifier and description are not rendered e.g. in LaTeX output. | ||||
|         """ | ||||
| 
 | ||||
|         content = {} | ||||
|         content: dict[str, list[tuple]] = {} | ||||
|         items = ((name, dispname, typ, docname, anchor) | ||||
|                  for name, dispname, typ, docname, anchor, prio | ||||
|                  in self.domain.get_objects() | ||||
|                  if typ == self.name) | ||||
|         items = sorted(items, key=lambda item: item[0]) | ||||
|         for name, dispname, typ, docname, anchor in items: | ||||
|             title = self.domain.data['obj2title'].get(name) | ||||
|             lis = content.setdefault(self.shortname, []) | ||||
|             lis.append(( | ||||
|                 dispname, 0, docname, | ||||
|                 anchor, | ||||
|                 '', '', typ | ||||
|                 '', '', title  | ||||
|             )) | ||||
|         ret = [(k, v) for k, v in sorted(content.items())] | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue