read through all the archive data folders and return the parsed links
(out_dir: Union[Path, str])
| 115 | |
| 116 | @enforce_types |
| 117 | def parse_json_links_details(out_dir: Union[Path, str]) -> Iterator[Link]: |
| 118 | """read through all the archive data folders and return the parsed links""" |
| 119 | |
| 120 | for entry in os.scandir(Path(out_dir) / ARCHIVE_DIR_NAME): |
| 121 | if entry.is_dir(follow_symlinks=True): |
| 122 | if (Path(entry.path) / 'index.json').exists(): |
| 123 | try: |
| 124 | link = parse_json_link_details(entry.path) |
| 125 | except KeyError: |
| 126 | link = None |
| 127 | if link: |
| 128 | yield link |
| 129 | |
| 130 | |
| 131 |
no test coverage detected