Return a mapping of source_gz_sha256 → source for all stored manpages. Only includes rows that have both a sha256 and a matching parsed_manpages entry. When multiple sources share the same hash, an arbitrary one wins.
(self)
| 275 | return False |
| 276 | |
| 277 | def known_sha256s(self) -> dict[str, str]: |
| 278 | """Return a mapping of source_gz_sha256 → source for all stored manpages. |
| 279 | |
| 280 | Only includes rows that have both a sha256 and a matching parsed_manpages |
| 281 | entry. When multiple sources share the same hash, an arbitrary one wins. |
| 282 | """ |
| 283 | rows = self._conn.execute( |
| 284 | "SELECT m.source_gz_sha256, m.source FROM manpages m" |
| 285 | " JOIN parsed_manpages p ON p.source = m.source" |
| 286 | " WHERE m.source_gz_sha256 IS NOT NULL" |
| 287 | ).fetchall() |
| 288 | return {row["source_gz_sha256"]: row["source"] for row in rows} |
| 289 | |
| 290 | def extractor_info_index(self) -> dict[str, tuple[str, ExtractionMeta]]: |
| 291 | """Return source -> (extractor, meta) for all parsed manpages.""" |