diff --git a/docs/core/content.md b/docs/lib/core/content.md similarity index 100% rename from docs/core/content.md rename to docs/lib/core/content.md diff --git a/docs/core/index.md b/docs/lib/core/index.md similarity index 100% rename from docs/core/index.md rename to docs/lib/core/index.md diff --git a/docs/core/parser.md b/docs/lib/core/parser.md similarity index 100% rename from docs/core/parser.md rename to docs/lib/core/parser.md diff --git a/docs/core/scraper.md b/docs/lib/core/scraper.md similarity index 100% rename from docs/core/scraper.md rename to docs/lib/core/scraper.md diff --git a/docs/lib/csv/client.md b/docs/lib/csv/client.md new file mode 100644 index 0000000..192c801 --- /dev/null +++ b/docs/lib/csv/client.md @@ -0,0 +1,3 @@ +# Client + +::: omniread.csv.client diff --git a/docs/lib/csv/index.md b/docs/lib/csv/index.md new file mode 100644 index 0000000..5459b10 --- /dev/null +++ b/docs/lib/csv/index.md @@ -0,0 +1,3 @@ +# Csv + +::: omniread.csv diff --git a/docs/lib/csv/parser.md b/docs/lib/csv/parser.md new file mode 100644 index 0000000..cb84ff6 --- /dev/null +++ b/docs/lib/csv/parser.md @@ -0,0 +1,3 @@ +# Parser + +::: omniread.csv.parser diff --git a/docs/lib/csv/parser_base.md b/docs/lib/csv/parser_base.md new file mode 100644 index 0000000..db71308 --- /dev/null +++ b/docs/lib/csv/parser_base.md @@ -0,0 +1,3 @@ +# Parser Base + +::: omniread.csv.parser_base diff --git a/docs/lib/csv/scraper.md b/docs/lib/csv/scraper.md new file mode 100644 index 0000000..a6cd836 --- /dev/null +++ b/docs/lib/csv/scraper.md @@ -0,0 +1,3 @@ +# Scraper + +::: omniread.csv.scraper diff --git a/docs/html/index.md b/docs/lib/html/index.md similarity index 100% rename from docs/html/index.md rename to docs/lib/html/index.md diff --git a/docs/html/parser.md b/docs/lib/html/parser.md similarity index 100% rename from docs/html/parser.md rename to docs/lib/html/parser.md diff --git a/docs/html/scraper.md b/docs/lib/html/scraper.md similarity index 100% rename from docs/html/scraper.md rename to docs/lib/html/scraper.md diff --git a/docs/index.md b/docs/lib/index.md similarity index 100% rename from docs/index.md rename to docs/lib/index.md diff --git a/docs/pdf/client.md b/docs/lib/pdf/client.md similarity index 100% rename from docs/pdf/client.md rename to docs/lib/pdf/client.md diff --git a/docs/pdf/index.md b/docs/lib/pdf/index.md similarity index 100% rename from docs/pdf/index.md rename to docs/lib/pdf/index.md diff --git a/docs/pdf/parser.md b/docs/lib/pdf/parser.md similarity index 100% rename from docs/pdf/parser.md rename to docs/lib/pdf/parser.md diff --git a/docs/pdf/scraper.md b/docs/lib/pdf/scraper.md similarity index 100% rename from docs/pdf/scraper.md rename to docs/lib/pdf/scraper.md diff --git a/docs/lib/xlsx/client.md b/docs/lib/xlsx/client.md new file mode 100644 index 0000000..43ad64e --- /dev/null +++ b/docs/lib/xlsx/client.md @@ -0,0 +1,3 @@ +# Client + +::: omniread.xlsx.client diff --git a/docs/lib/xlsx/index.md b/docs/lib/xlsx/index.md new file mode 100644 index 0000000..017f313 --- /dev/null +++ b/docs/lib/xlsx/index.md @@ -0,0 +1,3 @@ +# Xlsx + +::: omniread.xlsx diff --git a/docs/lib/xlsx/parser.md b/docs/lib/xlsx/parser.md new file mode 100644 index 0000000..7eb915a --- /dev/null +++ b/docs/lib/xlsx/parser.md @@ -0,0 +1,3 @@ +# Parser + +::: omniread.xlsx.parser diff --git a/docs/lib/xlsx/parser_base.md b/docs/lib/xlsx/parser_base.md new file mode 100644 index 0000000..5cf91ea --- /dev/null +++ b/docs/lib/xlsx/parser_base.md @@ -0,0 +1,3 @@ +# Parser Base + +::: omniread.xlsx.parser_base diff --git a/docs/lib/xlsx/scraper.md b/docs/lib/xlsx/scraper.md new file mode 100644 index 0000000..c374fb7 --- /dev/null +++ b/docs/lib/xlsx/scraper.md @@ -0,0 +1,3 @@ +# Scraper + +::: omniread.xlsx.scraper diff --git a/mcp_docs/index.json b/docs/mcp/index.json similarity index 77% rename from mcp_docs/index.json rename to docs/mcp/index.json index 48b0a19..88b932a 100644 --- a/mcp_docs/index.json +++ b/docs/mcp/index.json @@ -1,6 +1,6 @@ { "project": "omniread", "type": "docforge-model", - "modules_count": 12, + "modules_count": 22, "source": "docforge" } \ No newline at end of file diff --git a/mcp_docs/modules/omniread.core.content.json b/docs/mcp/modules/omniread.core.content.json similarity index 88% rename from mcp_docs/modules/omniread.core.content.json rename to docs/mcp/modules/omniread.core.content.json index 54a56c3..b88d924 100644 --- a/mcp_docs/modules/omniread.core.content.json +++ b/docs/mcp/modules/omniread.core.content.json @@ -4,11 +4,11 @@ "path": "omniread.core.content", "docstring": "# Summary\n\nCanonical content models for OmniRead.\n\nThis module defines the **format-agnostic content representation** used across\nall parsers and scrapers in OmniRead.\n\nThe models defined here represent *what* was extracted, not *how* it was\nretrieved or parsed. Format-specific behavior and metadata must not alter\nthe semantic meaning of these models.", "objects": { - "Enum": { - "name": "Enum", + "Mapping": { + "name": "Mapping", "kind": "alias", - "path": "omniread.core.content.Enum", - "signature": "", + "path": "omniread.core.content.Mapping", + "signature": "", "docstring": null }, "dataclass": { @@ -18,6 +18,13 @@ "signature": "", "docstring": null }, + "Enum": { + "name": "Enum", + "kind": "alias", + "path": "omniread.core.content.Enum", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -25,25 +32,11 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", - "kind": "alias", - "path": "omniread.core.content.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.core.content.Optional", - "signature": "", - "docstring": null - }, "ContentType": { "name": "ContentType", "kind": "class", "path": "omniread.core.content.ContentType", - "signature": "", + "signature": "", "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", "members": { "HTML": { @@ -60,6 +53,20 @@ "signature": null, "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.core.content.ContentType.XLSX", + "signature": null, + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.core.content.ContentType.CSV", + "signature": null, + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -80,7 +87,7 @@ "name": "Content", "kind": "class", "path": "omniread.core.content.Content", - "signature": "", + "signature": "", "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", "members": { "raw": { diff --git a/mcp_docs/modules/omniread.core.json b/docs/mcp/modules/omniread.core.json similarity index 93% rename from mcp_docs/modules/omniread.core.json rename to docs/mcp/modules/omniread.core.json index 2cd7094..4e77d85 100644 --- a/mcp_docs/modules/omniread.core.json +++ b/docs/mcp/modules/omniread.core.json @@ -62,6 +62,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.core.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.core.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -138,11 +152,11 @@ "signature": null, "docstring": "# Summary\n\nCanonical content models for OmniRead.\n\nThis module defines the **format-agnostic content representation** used across\nall parsers and scrapers in OmniRead.\n\nThe models defined here represent *what* was extracted, not *how* it was\nretrieved or parsed. Format-specific behavior and metadata must not alter\nthe semantic meaning of these models.", "members": { - "Enum": { - "name": "Enum", + "Mapping": { + "name": "Mapping", "kind": "alias", - "path": "omniread.core.content.Enum", - "signature": "", + "path": "omniread.core.content.Mapping", + "signature": "", "docstring": null }, "dataclass": { @@ -152,6 +166,13 @@ "signature": "", "docstring": null }, + "Enum": { + "name": "Enum", + "kind": "alias", + "path": "omniread.core.content.Enum", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -159,25 +180,11 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", - "kind": "alias", - "path": "omniread.core.content.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.core.content.Optional", - "signature": "", - "docstring": null - }, "ContentType": { "name": "ContentType", "kind": "class", "path": "omniread.core.content.ContentType", - "signature": "", + "signature": "", "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", "members": { "HTML": { @@ -194,6 +201,20 @@ "signature": null, "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.core.content.ContentType.XLSX", + "signature": null, + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.core.content.ContentType.CSV", + "signature": null, + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -214,7 +235,7 @@ "name": "Content", "kind": "class", "path": "omniread.core.content.Content", - "signature": "", + "signature": "", "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", "members": { "raw": { @@ -284,13 +305,6 @@ "signature": "", "docstring": null }, - "Set": { - "name": "Set", - "kind": "alias", - "path": "omniread.core.parser.Set", - "signature": "", - "docstring": null - }, "Content": { "name": "Content", "kind": "class", @@ -349,6 +363,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.core.parser.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.core.parser.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -432,6 +460,13 @@ "signature": "", "docstring": null }, + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.core.scraper.Mapping", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -439,20 +474,6 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", - "kind": "alias", - "path": "omniread.core.scraper.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.core.scraper.Optional", - "signature": "", - "docstring": null - }, "Content": { "name": "Content", "kind": "class", @@ -494,14 +515,14 @@ "name": "BaseScraper", "kind": "class", "path": "omniread.core.scraper.BaseScraper", - "signature": "", + "signature": "", "docstring": "Base interface for all scrapers.\n\nNotes:\n **Responsibilities:**\n\n - A scraper is responsible ONLY for fetching raw content (bytes)\n from a source. It must not interpret or parse it.\n - A scraper is a stateless acquisition component that retrieves raw\n content from a source and returns it as a `Content` object.\n - Scrapers define how content is obtained, not what the content means.\n - Implementations may vary in transport mechanism, authentication\n strategy, retry and backoff behavior.\n\n **Constraints:**\n\n - Implementations must not parse content, modify content semantics,\n or couple scraping logic to a specific parser.", "members": { "fetch": { "name": "fetch", "kind": "function", "path": "omniread.core.scraper.BaseScraper.fetch", - "signature": "", + "signature": "", "docstring": "Fetch raw content from the given source.\n\nArgs:\n source (str):\n Location identifier (URL, file path, S3 URI, etc.).\n\n metadata (Optional[Mapping[str, Any]], optional):\n Optional hints for the scraper (headers, auth, etc.).\n\nReturns:\n Content:\n Content object containing raw bytes and metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors as defined by the implementation.\n\nNotes:\n **Responsibilities:**\n\n - Implementations must retrieve the content referenced by `source`\n and return it as raw bytes wrapped in a `Content` object." } } diff --git a/mcp_docs/modules/omniread.core.parser.json b/docs/mcp/modules/omniread.core.parser.json similarity index 92% rename from mcp_docs/modules/omniread.core.parser.json rename to docs/mcp/modules/omniread.core.parser.json index 6df349d..c10e259 100644 --- a/mcp_docs/modules/omniread.core.parser.json +++ b/docs/mcp/modules/omniread.core.parser.json @@ -32,13 +32,6 @@ "signature": "", "docstring": null }, - "Set": { - "name": "Set", - "kind": "alias", - "path": "omniread.core.parser.Set", - "signature": "", - "docstring": null - }, "Content": { "name": "Content", "kind": "class", @@ -97,6 +90,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.core.parser.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.core.parser.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", diff --git a/mcp_docs/modules/omniread.core.scraper.json b/docs/mcp/modules/omniread.core.scraper.json similarity index 94% rename from mcp_docs/modules/omniread.core.scraper.json rename to docs/mcp/modules/omniread.core.scraper.json index 2adcd11..e356471 100644 --- a/mcp_docs/modules/omniread.core.scraper.json +++ b/docs/mcp/modules/omniread.core.scraper.json @@ -18,6 +18,13 @@ "signature": "", "docstring": null }, + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.core.scraper.Mapping", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -25,20 +32,6 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", - "kind": "alias", - "path": "omniread.core.scraper.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.core.scraper.Optional", - "signature": "", - "docstring": null - }, "Content": { "name": "Content", "kind": "class", @@ -80,14 +73,14 @@ "name": "BaseScraper", "kind": "class", "path": "omniread.core.scraper.BaseScraper", - "signature": "", + "signature": "", "docstring": "Base interface for all scrapers.\n\nNotes:\n **Responsibilities:**\n\n - A scraper is responsible ONLY for fetching raw content (bytes)\n from a source. It must not interpret or parse it.\n - A scraper is a stateless acquisition component that retrieves raw\n content from a source and returns it as a `Content` object.\n - Scrapers define how content is obtained, not what the content means.\n - Implementations may vary in transport mechanism, authentication\n strategy, retry and backoff behavior.\n\n **Constraints:**\n\n - Implementations must not parse content, modify content semantics,\n or couple scraping logic to a specific parser.", "members": { "fetch": { "name": "fetch", "kind": "function", "path": "omniread.core.scraper.BaseScraper.fetch", - "signature": "", + "signature": "", "docstring": "Fetch raw content from the given source.\n\nArgs:\n source (str):\n Location identifier (URL, file path, S3 URI, etc.).\n\n metadata (Optional[Mapping[str, Any]], optional):\n Optional hints for the scraper (headers, auth, etc.).\n\nReturns:\n Content:\n Content object containing raw bytes and metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors as defined by the implementation.\n\nNotes:\n **Responsibilities:**\n\n - Implementations must retrieve the content referenced by `source`\n and return it as raw bytes wrapped in a `Content` object." } } diff --git a/docs/mcp/modules/omniread.csv.client.json b/docs/mcp/modules/omniread.csv.client.json new file mode 100644 index 0000000..af0c03e --- /dev/null +++ b/docs/mcp/modules/omniread.csv.client.json @@ -0,0 +1,69 @@ +{ + "module": "omniread.csv.client", + "content": { + "path": "omniread.csv.client", + "docstring": "# Summary\n\nCSV client abstractions for OmniRead.\n\nThis module defines the **client layer** responsible for retrieving raw\ncomma-separated-value document bytes from a concrete backing store.\n\nClients provide low-level access to csv binaries and are intentionally\ndecoupled from scraping and parsing logic. They do not perform validation,\ninterpretation, or content extraction.\n\nTypical backing stores include:\n\n- Local filesystems\n- Object storage (S3, GCS, etc.)\n- Network file systems", + "objects": { + "ABC": { + "name": "ABC", + "kind": "alias", + "path": "omniread.csv.client.ABC", + "signature": "", + "docstring": null + }, + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.csv.client.abstractmethod", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "omniread.csv.client.Path", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.csv.client.Any", + "signature": "", + "docstring": null + }, + "BaseCsvClient": { + "name": "BaseCsvClient", + "kind": "class", + "path": "omniread.csv.client.BaseCsvClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving csv bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full csv binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.client.BaseCsvClient.fetch", + "signature": "", + "docstring": "Fetch raw csv bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemCsvClient": { + "name": "FileSystemCsvClient", + "kind": "class", + "path": "omniread.csv.client.FileSystemCsvClient", + "signature": "", + "docstring": "CSV client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads csv files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.client.FileSystemCsvClient.fetch", + "signature": "", + "docstring": "Read a csv file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the csv file.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/mcp/modules/omniread.csv.json b/docs/mcp/modules/omniread.csv.json new file mode 100644 index 0000000..3ef955b --- /dev/null +++ b/docs/mcp/modules/omniread.csv.json @@ -0,0 +1,576 @@ +{ + "module": "omniread.csv", + "content": { + "path": "omniread.csv", + "docstring": "# Summary\n\nCSV subpackage for OmniRead.\n\nProvides acquisition and parsing of comma-separated-value content:\n\n- `BaseCsvClient`: abstract backing-store client for csv bytes.\n- `FileSystemCsvClient`: local filesystem implementation.\n- `CsvScraper`: wraps fetched bytes into canonical `Content`.\n- `CsvParserBase`: content-type-enforcing parser contract.\n- `CsvParser`: generic string-row parser built on the standard csv module.", + "objects": { + "BaseCsvClient": { + "name": "BaseCsvClient", + "kind": "class", + "path": "omniread.csv.BaseCsvClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving csv bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full csv binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.BaseCsvClient.fetch", + "signature": "", + "docstring": "Fetch raw csv bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemCsvClient": { + "name": "FileSystemCsvClient", + "kind": "class", + "path": "omniread.csv.FileSystemCsvClient", + "signature": "", + "docstring": "CSV client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads csv files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.FileSystemCsvClient.fetch", + "signature": "", + "docstring": "Read a csv file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the csv file.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + }, + "CsvParser": { + "name": "CsvParser", + "kind": "class", + "path": "omniread.csv.CsvParser", + "signature": "", + "docstring": "Generic csv parser producing string rows from the document.\n\nNotes:\n **Responsibilities:**\n\n - Decode the payload (UTF-8 with BOM support, Latin-1 fallback).\n - Detect the delimiter from a leading sample (`,` `;` tab `|`),\n defaulting to `,`.\n - Normalize cells into deterministic stripped string values.\n - Expose row extraction helpers mirroring `XlsxParser.rows`.\n\n **Constraints:**\n\n - All values are strings; consumers requiring typed values must\n convert on their side.\n - Quoted fields containing delimiters/newlines are handled by\n the standard ``csv`` module.", + "members": { + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.CsvParser.parse", + "signature": "", + "docstring": "Parse the document into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the document." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.csv.CsvParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from the document.\n\nArgs:\n skip_empty (bool):\n When True (default), rows whose cells are all blank are\n omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row." + } + } + }, + "CsvParserBase": { + "name": "CsvParserBase", + "kind": "class", + "path": "omniread.csv.CsvParserBase", + "signature": "", + "docstring": "Base csv parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces csv content-type compatibility and provides\n the extension point for implementing concrete csv parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.CsvParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (CSV only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.CsvParserBase.parse", + "signature": "", + "docstring": "Parse csv content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "CsvScraper": { + "name": "CsvScraper", + "kind": "class", + "path": "omniread.csv.CsvScraper", + "signature": "", + "docstring": "Scraper for csv documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw csv bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n CSV content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.CsvScraper.fetch", + "signature": "", + "docstring": "Fetch a csv document from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw csv bytes, source\n identifier, CSV content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + }, + "client": { + "name": "client", + "kind": "module", + "path": "omniread.csv.client", + "signature": null, + "docstring": "# Summary\n\nCSV client abstractions for OmniRead.\n\nThis module defines the **client layer** responsible for retrieving raw\ncomma-separated-value document bytes from a concrete backing store.\n\nClients provide low-level access to csv binaries and are intentionally\ndecoupled from scraping and parsing logic. They do not perform validation,\ninterpretation, or content extraction.\n\nTypical backing stores include:\n\n- Local filesystems\n- Object storage (S3, GCS, etc.)\n- Network file systems", + "members": { + "ABC": { + "name": "ABC", + "kind": "alias", + "path": "omniread.csv.client.ABC", + "signature": "", + "docstring": null + }, + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.csv.client.abstractmethod", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "omniread.csv.client.Path", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.csv.client.Any", + "signature": "", + "docstring": null + }, + "BaseCsvClient": { + "name": "BaseCsvClient", + "kind": "class", + "path": "omniread.csv.client.BaseCsvClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving csv bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full csv binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.client.BaseCsvClient.fetch", + "signature": "", + "docstring": "Fetch raw csv bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemCsvClient": { + "name": "FileSystemCsvClient", + "kind": "class", + "path": "omniread.csv.client.FileSystemCsvClient", + "signature": "", + "docstring": "CSV client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads csv files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.client.FileSystemCsvClient.fetch", + "signature": "", + "docstring": "Read a csv file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the csv file.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + } + } + }, + "parser": { + "name": "parser", + "kind": "module", + "path": "omniread.csv.parser", + "signature": null, + "docstring": "# Summary\n\nCSV parser implementations for OmniRead.\n\nThis module provides a concrete, generic parser for comma-separated-value\ndocuments. It exposes records as lists of string cells so downstream\nconsumers can interpret tabular content without depending on the ``csv``\nmodule directly.\n\nThe parser is intentionally statement-agnostic: it performs no header\ndetection or column interpretation beyond basic cell normalization and\ndelimiter detection.", + "members": { + "Sniffer": { + "name": "Sniffer", + "kind": "alias", + "path": "omniread.csv.parser.Sniffer", + "signature": "", + "docstring": null + }, + "reader": { + "name": "reader", + "kind": "alias", + "path": "omniread.csv.parser.reader", + "signature": "", + "docstring": null + }, + "StringIO": { + "name": "StringIO", + "kind": "alias", + "path": "omniread.csv.parser.StringIO", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.csv.parser.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.csv.parser.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.csv.parser.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.csv.parser.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.csv.parser.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "CsvParserBase": { + "name": "CsvParserBase", + "kind": "class", + "path": "omniread.csv.parser.CsvParserBase", + "signature": "", + "docstring": "Base csv parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces csv content-type compatibility and provides\n the extension point for implementing concrete csv parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.parser.CsvParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (CSV only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser.CsvParserBase.parse", + "signature": "", + "docstring": "Parse csv content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "CsvParser": { + "name": "CsvParser", + "kind": "class", + "path": "omniread.csv.parser.CsvParser", + "signature": "", + "docstring": "Generic csv parser producing string rows from the document.\n\nNotes:\n **Responsibilities:**\n\n - Decode the payload (UTF-8 with BOM support, Latin-1 fallback).\n - Detect the delimiter from a leading sample (`,` `;` tab `|`),\n defaulting to `,`.\n - Normalize cells into deterministic stripped string values.\n - Expose row extraction helpers mirroring `XlsxParser.rows`.\n\n **Constraints:**\n\n - All values are strings; consumers requiring typed values must\n convert on their side.\n - Quoted fields containing delimiters/newlines are handled by\n the standard ``csv`` module.", + "members": { + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser.CsvParser.parse", + "signature": "", + "docstring": "Parse the document into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the document." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.csv.parser.CsvParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from the document.\n\nArgs:\n skip_empty (bool):\n When True (default), rows whose cells are all blank are\n omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row." + } + } + } + } + }, + "parser_base": { + "name": "parser_base", + "kind": "module", + "path": "omniread.csv.parser_base", + "signature": null, + "docstring": "# Summary\n\nCSV parser base implementation for OmniRead.\n\nThis module defines the **CSV-specific parser contract**, extending the\nformat-agnostic `BaseParser` with constraints appropriate for\ncomma-separated-value documents.", + "members": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.csv.parser_base.abstractmethod", + "signature": "", + "docstring": null + }, + "Generic": { + "name": "Generic", + "kind": "alias", + "path": "omniread.csv.parser_base.Generic", + "signature": "", + "docstring": null + }, + "TypeVar": { + "name": "TypeVar", + "kind": "alias", + "path": "omniread.csv.parser_base.TypeVar", + "signature": "", + "docstring": null + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.csv.parser_base.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseParser": { + "name": "BaseParser", + "kind": "class", + "path": "omniread.csv.parser_base.BaseParser", + "signature": "", + "docstring": "Base interface for all parsers.\n\nNotes:\n **Guarantees:**\n\n - A parser is a self-contained object that owns the `Content` it is\n responsible for interpreting.\n - Consumers may rely on early validation of content compatibility\n and type-stable return values from `parse()`.\n\n **Responsibilities:**\n\n - Implementations must declare supported content types via `supported_types`.\n - Implementations must raise parsing-specific exceptions from `parse()`.\n - Implementations must remain deterministic for a given input.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.parser_base.BaseParser.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser. An empty set indicates that the parser is content-type agnostic." + }, + "content": { + "name": "content", + "kind": "attribute", + "path": "omniread.csv.parser_base.BaseParser.content", + "signature": "", + "docstring": null + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser_base.BaseParser.parse", + "signature": "", + "docstring": "Parse the owned content into structured output.\n\nReturns:\n T:\n Parsed, structured representation.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation.\n\nNotes:\n **Responsibilities:**\n\n - Implementations must fully consume the provided content and\n return a deterministic, structured output." + }, + "supports": { + "name": "supports", + "kind": "function", + "path": "omniread.csv.parser_base.BaseParser.supports", + "signature": "", + "docstring": "Check whether this parser supports the content's type.\n\nReturns:\n bool:\n True if the content type is supported; False otherwise." + } + } + }, + "T": { + "name": "T", + "kind": "attribute", + "path": "omniread.csv.parser_base.T", + "signature": null, + "docstring": null + }, + "CsvParserBase": { + "name": "CsvParserBase", + "kind": "class", + "path": "omniread.csv.parser_base.CsvParserBase", + "signature": "", + "docstring": "Base csv parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces csv content-type compatibility and provides\n the extension point for implementing concrete csv parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.parser_base.CsvParserBase.supported_types", + "signature": null, + "docstring": "Set of content types supported by this parser (CSV only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser_base.CsvParserBase.parse", + "signature": "", + "docstring": "Parse csv content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + } + } + }, + "scraper": { + "name": "scraper", + "kind": "module", + "path": "omniread.csv.scraper", + "signature": null, + "docstring": "# Summary\n\nCSV scraper for OmniRead.\n\nThis module defines the scraper responsible for acquiring raw\ncomma-separated-value document content from a backing store via a\nconfigured client.\n\nThe scraper does not interpret or parse the acquired bytes; it wraps them in\nthe canonical `Content` model.", + "members": { + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.csv.scraper.Mapping", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.csv.scraper.Any", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.csv.scraper.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.csv.scraper.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseCsvClient": { + "name": "BaseCsvClient", + "kind": "class", + "path": "omniread.csv.scraper.BaseCsvClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving csv bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full csv binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.scraper.BaseCsvClient.fetch", + "signature": "", + "docstring": "Fetch raw csv bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "CsvScraper": { + "name": "CsvScraper", + "kind": "class", + "path": "omniread.csv.scraper.CsvScraper", + "signature": "", + "docstring": "Scraper for csv documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw csv bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n CSV content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.scraper.CsvScraper.fetch", + "signature": "", + "docstring": "Fetch a csv document from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw csv bytes, source\n identifier, CSV content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/mcp/modules/omniread.csv.parser.json b/docs/mcp/modules/omniread.csv.parser.json new file mode 100644 index 0000000..6479db7 --- /dev/null +++ b/docs/mcp/modules/omniread.csv.parser.json @@ -0,0 +1,113 @@ +{ + "module": "omniread.csv.parser", + "content": { + "path": "omniread.csv.parser", + "docstring": "# Summary\n\nCSV parser implementations for OmniRead.\n\nThis module provides a concrete, generic parser for comma-separated-value\ndocuments. It exposes records as lists of string cells so downstream\nconsumers can interpret tabular content without depending on the ``csv``\nmodule directly.\n\nThe parser is intentionally statement-agnostic: it performs no header\ndetection or column interpretation beyond basic cell normalization and\ndelimiter detection.", + "objects": { + "Sniffer": { + "name": "Sniffer", + "kind": "alias", + "path": "omniread.csv.parser.Sniffer", + "signature": "", + "docstring": null + }, + "reader": { + "name": "reader", + "kind": "alias", + "path": "omniread.csv.parser.reader", + "signature": "", + "docstring": null + }, + "StringIO": { + "name": "StringIO", + "kind": "alias", + "path": "omniread.csv.parser.StringIO", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.csv.parser.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.csv.parser.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.csv.parser.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.csv.parser.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.csv.parser.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "CsvParserBase": { + "name": "CsvParserBase", + "kind": "class", + "path": "omniread.csv.parser.CsvParserBase", + "signature": "", + "docstring": "Base csv parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces csv content-type compatibility and provides\n the extension point for implementing concrete csv parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.parser.CsvParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (CSV only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser.CsvParserBase.parse", + "signature": "", + "docstring": "Parse csv content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "CsvParser": { + "name": "CsvParser", + "kind": "class", + "path": "omniread.csv.parser.CsvParser", + "signature": "", + "docstring": "Generic csv parser producing string rows from the document.\n\nNotes:\n **Responsibilities:**\n\n - Decode the payload (UTF-8 with BOM support, Latin-1 fallback).\n - Detect the delimiter from a leading sample (`,` `;` tab `|`),\n defaulting to `,`.\n - Normalize cells into deterministic stripped string values.\n - Expose row extraction helpers mirroring `XlsxParser.rows`.\n\n **Constraints:**\n\n - All values are strings; consumers requiring typed values must\n convert on their side.\n - Quoted fields containing delimiters/newlines are handled by\n the standard ``csv`` module.", + "members": { + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser.CsvParser.parse", + "signature": "", + "docstring": "Parse the document into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the document." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.csv.parser.CsvParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from the document.\n\nArgs:\n skip_empty (bool):\n When True (default), rows whose cells are all blank are\n omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row." + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/mcp/modules/omniread.csv.parser_base.json b/docs/mcp/modules/omniread.csv.parser_base.json new file mode 100644 index 0000000..a0f7802 --- /dev/null +++ b/docs/mcp/modules/omniread.csv.parser_base.json @@ -0,0 +1,148 @@ +{ + "module": "omniread.csv.parser_base", + "content": { + "path": "omniread.csv.parser_base", + "docstring": "# Summary\n\nCSV parser base implementation for OmniRead.\n\nThis module defines the **CSV-specific parser contract**, extending the\nformat-agnostic `BaseParser` with constraints appropriate for\ncomma-separated-value documents.", + "objects": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.csv.parser_base.abstractmethod", + "signature": "", + "docstring": null + }, + "Generic": { + "name": "Generic", + "kind": "alias", + "path": "omniread.csv.parser_base.Generic", + "signature": "", + "docstring": null + }, + "TypeVar": { + "name": "TypeVar", + "kind": "alias", + "path": "omniread.csv.parser_base.TypeVar", + "signature": "", + "docstring": null + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.csv.parser_base.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseParser": { + "name": "BaseParser", + "kind": "class", + "path": "omniread.csv.parser_base.BaseParser", + "signature": "", + "docstring": "Base interface for all parsers.\n\nNotes:\n **Guarantees:**\n\n - A parser is a self-contained object that owns the `Content` it is\n responsible for interpreting.\n - Consumers may rely on early validation of content compatibility\n and type-stable return values from `parse()`.\n\n **Responsibilities:**\n\n - Implementations must declare supported content types via `supported_types`.\n - Implementations must raise parsing-specific exceptions from `parse()`.\n - Implementations must remain deterministic for a given input.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.parser_base.BaseParser.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser. An empty set indicates that the parser is content-type agnostic." + }, + "content": { + "name": "content", + "kind": "attribute", + "path": "omniread.csv.parser_base.BaseParser.content", + "signature": "", + "docstring": null + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser_base.BaseParser.parse", + "signature": "", + "docstring": "Parse the owned content into structured output.\n\nReturns:\n T:\n Parsed, structured representation.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation.\n\nNotes:\n **Responsibilities:**\n\n - Implementations must fully consume the provided content and\n return a deterministic, structured output." + }, + "supports": { + "name": "supports", + "kind": "function", + "path": "omniread.csv.parser_base.BaseParser.supports", + "signature": "", + "docstring": "Check whether this parser supports the content's type.\n\nReturns:\n bool:\n True if the content type is supported; False otherwise." + } + } + }, + "T": { + "name": "T", + "kind": "attribute", + "path": "omniread.csv.parser_base.T", + "signature": null, + "docstring": null + }, + "CsvParserBase": { + "name": "CsvParserBase", + "kind": "class", + "path": "omniread.csv.parser_base.CsvParserBase", + "signature": "", + "docstring": "Base csv parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces csv content-type compatibility and provides\n the extension point for implementing concrete csv parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.parser_base.CsvParserBase.supported_types", + "signature": null, + "docstring": "Set of content types supported by this parser (CSV only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser_base.CsvParserBase.parse", + "signature": "", + "docstring": "Parse csv content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/mcp/modules/omniread.csv.scraper.json b/docs/mcp/modules/omniread.csv.scraper.json new file mode 100644 index 0000000..0a95bb6 --- /dev/null +++ b/docs/mcp/modules/omniread.csv.scraper.json @@ -0,0 +1,143 @@ +{ + "module": "omniread.csv.scraper", + "content": { + "path": "omniread.csv.scraper", + "docstring": "# Summary\n\nCSV scraper for OmniRead.\n\nThis module defines the scraper responsible for acquiring raw\ncomma-separated-value document content from a backing store via a\nconfigured client.\n\nThe scraper does not interpret or parse the acquired bytes; it wraps them in\nthe canonical `Content` model.", + "objects": { + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.csv.scraper.Mapping", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.csv.scraper.Any", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.csv.scraper.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.csv.scraper.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseCsvClient": { + "name": "BaseCsvClient", + "kind": "class", + "path": "omniread.csv.scraper.BaseCsvClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving csv bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full csv binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.scraper.BaseCsvClient.fetch", + "signature": "", + "docstring": "Fetch raw csv bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "CsvScraper": { + "name": "CsvScraper", + "kind": "class", + "path": "omniread.csv.scraper.CsvScraper", + "signature": "", + "docstring": "Scraper for csv documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw csv bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n CSV content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.scraper.CsvScraper.fetch", + "signature": "", + "docstring": "Fetch a csv document from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw csv bytes, source\n identifier, CSV content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + } + } + } +} \ No newline at end of file diff --git a/mcp_docs/modules/omniread.html.json b/docs/mcp/modules/omniread.html.json similarity index 94% rename from mcp_docs/modules/omniread.html.json rename to docs/mcp/modules/omniread.html.json index e079b2d..a9fa58f 100644 --- a/mcp_docs/modules/omniread.html.json +++ b/docs/mcp/modules/omniread.html.json @@ -92,6 +92,13 @@ "signature": null, "docstring": "# Summary\n\nHTML parser base implementations for OmniRead.\n\nThis module provides reusable HTML parsing utilities built on top of\nthe abstract parser contracts defined in `omniread.core.parser`.\n\nIt supplies:\n\n- Content-type enforcement for HTML inputs\n- BeautifulSoup initialization and lifecycle management\n- Common helper methods for extracting structured data from HTML elements\n\nConcrete parsers must subclass `HTMLParser` and implement the `parse()` method\nto return a structured representation appropriate for their use case.", "members": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.html.parser.abstractmethod", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -113,20 +120,6 @@ "signature": "", "docstring": null }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.html.parser.Optional", - "signature": "", - "docstring": null - }, - "abstractmethod": { - "name": "abstractmethod", - "kind": "alias", - "path": "omniread.html.parser.abstractmethod", - "signature": "", - "docstring": null - }, "BeautifulSoup": { "name": "BeautifulSoup", "kind": "alias", @@ -141,43 +134,6 @@ "signature": "", "docstring": null }, - "ContentType": { - "name": "ContentType", - "kind": "class", - "path": "omniread.html.parser.ContentType", - "signature": "", - "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", - "members": { - "HTML": { - "name": "HTML", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.HTML", - "signature": "", - "docstring": "HTML document content." - }, - "PDF": { - "name": "PDF", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.PDF", - "signature": "", - "docstring": "PDF document content." - }, - "JSON": { - "name": "JSON", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.JSON", - "signature": "", - "docstring": "JSON document content." - }, - "XML": { - "name": "XML", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.XML", - "signature": "", - "docstring": "XML document content." - } - } - }, "Content": { "name": "Content", "kind": "class", @@ -215,6 +171,57 @@ } } }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.html.parser.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, "BaseParser": { "name": "BaseParser", "kind": "class", @@ -263,7 +270,7 @@ "name": "HTMLParser", "kind": "class", "path": "omniread.html.parser.HTMLParser", - "signature": "", + "signature": "", "docstring": "Base HTML parser.\n\nNotes:\n **Responsibilities:**\n\n - This class extends the core `BaseParser` with HTML-specific behavior,\n including DOM parsing via BeautifulSoup and reusable extraction helpers.\n - Provides reusable helpers for HTML extraction. Concrete parsers must\n explicitly define the return type.\n\n **Guarantees:**\n\n - Accepts only HTML content.\n - Owns a parsed BeautifulSoup DOM tree.\n - Provides pure helper utilities for common HTML structures.\n\n **Constraints:**\n\n - Concrete subclasses must define the output type `T` and implement\n the `parse()` method.", "members": { "supported_types": { @@ -298,31 +305,17 @@ "name": "parse_table", "kind": "function", "path": "omniread.html.parser.HTMLParser.parse_table", - "signature": "", + "signature": "", "docstring": "Parse an HTML table into a 2D list of strings.\n\nArgs:\n table (Tag):\n BeautifulSoup tag representing a ``.\n\nReturns:\n list[list[str]]:\n A list of rows, where each row is a list of cell text values." }, "parse_meta": { "name": "parse_meta", "kind": "function", "path": "omniread.html.parser.HTMLParser.parse_meta", - "signature": "", + "signature": "", "docstring": "Extract high-level metadata from the HTML document.\n\nReturns:\n dict[str, Any]:\n Dictionary containing extracted metadata.\n\nNotes:\n **Responsibilities:**\n\n - Extract high-level metadata from the HTML document.\n - This includes: Document title, `` tag name/property to\n content mappings." } } - }, - "list": { - "name": "list", - "kind": "alias", - "path": "omniread.html.parser.list", - "signature": "", - "docstring": null - }, - "dict": { - "name": "dict", - "kind": "alias", - "path": "omniread.html.parser.dict", - "signature": "", - "docstring": null } } }, @@ -333,11 +326,11 @@ "signature": null, "docstring": "# Summary\n\nHTML scraping implementation for OmniRead.\n\nThis module provides an HTTP-based scraper for retrieving HTML documents.\nIt implements the core `BaseScraper` contract using `httpx` as the transport\nlayer.\n\nThis scraper is responsible for:\n\n- Fetching raw HTML bytes over HTTP(S)\n- Validating response content type\n- Attaching HTTP metadata to the returned content\n\nThis scraper is not responsible for:\n\n- Parsing or interpreting HTML\n- Retrying failed requests\n- Managing crawl policies or rate limiting", "members": { - "httpx": { - "name": "httpx", + "Mapping": { + "name": "Mapping", "kind": "alias", - "path": "omniread.html.scraper.httpx", - "signature": "", + "path": "omniread.html.scraper.Mapping", + "signature": "", "docstring": null }, "Any": { @@ -347,18 +340,11 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", + "httpx": { + "name": "httpx", "kind": "alias", - "path": "omniread.html.scraper.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.html.scraper.Optional", - "signature": "", + "path": "omniread.html.scraper.httpx", + "signature": "", "docstring": null }, "Content": { @@ -419,6 +405,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.html.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.html.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -455,7 +455,7 @@ "name": "HTMLScraper", "kind": "class", "path": "omniread.html.scraper.HTMLScraper", - "signature": "", + "signature": "", "docstring": "Base HTML scraper using `httpx`.\n\nNotes:\n **Responsibilities:**\n\n - This scraper retrieves HTML documents over HTTP(S) and returns\n them as raw content wrapped in a `Content` object.\n - Fetches raw bytes and metadata only.\n - The scraper uses `httpx.Client` for HTTP requests, enforces an\n HTML content type, and preserves HTTP response metadata.\n\n **Constraints:**\n\n - The scraper does not: Parse HTML, perform retries or backoff,\n handle non-HTML responses.", "members": { "content_type": { @@ -469,7 +469,7 @@ "name": "validate_content_type", "kind": "function", "path": "omniread.html.scraper.HTMLScraper.validate_content_type", - "signature": "", + "signature": "", "docstring": "Validate that the HTTP response contains HTML content.\n\nArgs:\n response (httpx.Response):\n HTTP response returned by `httpx`.\n\nRaises:\n ValueError:\n If the `Content-Type` header is missing or does not indicate HTML content." }, "fetch": { diff --git a/mcp_docs/modules/omniread.html.parser.json b/docs/mcp/modules/omniread.html.parser.json similarity index 94% rename from mcp_docs/modules/omniread.html.parser.json rename to docs/mcp/modules/omniread.html.parser.json index c607d2d..f682df4 100644 --- a/mcp_docs/modules/omniread.html.parser.json +++ b/docs/mcp/modules/omniread.html.parser.json @@ -4,6 +4,13 @@ "path": "omniread.html.parser", "docstring": "# Summary\n\nHTML parser base implementations for OmniRead.\n\nThis module provides reusable HTML parsing utilities built on top of\nthe abstract parser contracts defined in `omniread.core.parser`.\n\nIt supplies:\n\n- Content-type enforcement for HTML inputs\n- BeautifulSoup initialization and lifecycle management\n- Common helper methods for extracting structured data from HTML elements\n\nConcrete parsers must subclass `HTMLParser` and implement the `parse()` method\nto return a structured representation appropriate for their use case.", "objects": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.html.parser.abstractmethod", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -25,20 +32,6 @@ "signature": "", "docstring": null }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.html.parser.Optional", - "signature": "", - "docstring": null - }, - "abstractmethod": { - "name": "abstractmethod", - "kind": "alias", - "path": "omniread.html.parser.abstractmethod", - "signature": "", - "docstring": null - }, "BeautifulSoup": { "name": "BeautifulSoup", "kind": "alias", @@ -53,43 +46,6 @@ "signature": "", "docstring": null }, - "ContentType": { - "name": "ContentType", - "kind": "class", - "path": "omniread.html.parser.ContentType", - "signature": "", - "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", - "members": { - "HTML": { - "name": "HTML", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.HTML", - "signature": "", - "docstring": "HTML document content." - }, - "PDF": { - "name": "PDF", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.PDF", - "signature": "", - "docstring": "PDF document content." - }, - "JSON": { - "name": "JSON", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.JSON", - "signature": "", - "docstring": "JSON document content." - }, - "XML": { - "name": "XML", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.XML", - "signature": "", - "docstring": "XML document content." - } - } - }, "Content": { "name": "Content", "kind": "class", @@ -127,6 +83,57 @@ } } }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.html.parser.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, "BaseParser": { "name": "BaseParser", "kind": "class", @@ -175,7 +182,7 @@ "name": "HTMLParser", "kind": "class", "path": "omniread.html.parser.HTMLParser", - "signature": "", + "signature": "", "docstring": "Base HTML parser.\n\nNotes:\n **Responsibilities:**\n\n - This class extends the core `BaseParser` with HTML-specific behavior,\n including DOM parsing via BeautifulSoup and reusable extraction helpers.\n - Provides reusable helpers for HTML extraction. Concrete parsers must\n explicitly define the return type.\n\n **Guarantees:**\n\n - Accepts only HTML content.\n - Owns a parsed BeautifulSoup DOM tree.\n - Provides pure helper utilities for common HTML structures.\n\n **Constraints:**\n\n - Concrete subclasses must define the output type `T` and implement\n the `parse()` method.", "members": { "supported_types": { @@ -210,31 +217,17 @@ "name": "parse_table", "kind": "function", "path": "omniread.html.parser.HTMLParser.parse_table", - "signature": "", + "signature": "", "docstring": "Parse an HTML table into a 2D list of strings.\n\nArgs:\n table (Tag):\n BeautifulSoup tag representing a `
`.\n\nReturns:\n list[list[str]]:\n A list of rows, where each row is a list of cell text values." }, "parse_meta": { "name": "parse_meta", "kind": "function", "path": "omniread.html.parser.HTMLParser.parse_meta", - "signature": "", + "signature": "", "docstring": "Extract high-level metadata from the HTML document.\n\nReturns:\n dict[str, Any]:\n Dictionary containing extracted metadata.\n\nNotes:\n **Responsibilities:**\n\n - Extract high-level metadata from the HTML document.\n - This includes: Document title, `` tag name/property to\n content mappings." } } - }, - "list": { - "name": "list", - "kind": "alias", - "path": "omniread.html.parser.list", - "signature": "", - "docstring": null - }, - "dict": { - "name": "dict", - "kind": "alias", - "path": "omniread.html.parser.dict", - "signature": "", - "docstring": null } } } diff --git a/mcp_docs/modules/omniread.html.scraper.json b/docs/mcp/modules/omniread.html.scraper.json similarity index 92% rename from mcp_docs/modules/omniread.html.scraper.json rename to docs/mcp/modules/omniread.html.scraper.json index e1865d9..54d0448 100644 --- a/mcp_docs/modules/omniread.html.scraper.json +++ b/docs/mcp/modules/omniread.html.scraper.json @@ -4,11 +4,11 @@ "path": "omniread.html.scraper", "docstring": "# Summary\n\nHTML scraping implementation for OmniRead.\n\nThis module provides an HTTP-based scraper for retrieving HTML documents.\nIt implements the core `BaseScraper` contract using `httpx` as the transport\nlayer.\n\nThis scraper is responsible for:\n\n- Fetching raw HTML bytes over HTTP(S)\n- Validating response content type\n- Attaching HTTP metadata to the returned content\n\nThis scraper is not responsible for:\n\n- Parsing or interpreting HTML\n- Retrying failed requests\n- Managing crawl policies or rate limiting", "objects": { - "httpx": { - "name": "httpx", + "Mapping": { + "name": "Mapping", "kind": "alias", - "path": "omniread.html.scraper.httpx", - "signature": "", + "path": "omniread.html.scraper.Mapping", + "signature": "", "docstring": null }, "Any": { @@ -18,18 +18,11 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", + "httpx": { + "name": "httpx", "kind": "alias", - "path": "omniread.html.scraper.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.html.scraper.Optional", - "signature": "", + "path": "omniread.html.scraper.httpx", + "signature": "", "docstring": null }, "Content": { @@ -90,6 +83,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.html.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.html.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -126,7 +133,7 @@ "name": "HTMLScraper", "kind": "class", "path": "omniread.html.scraper.HTMLScraper", - "signature": "", + "signature": "", "docstring": "Base HTML scraper using `httpx`.\n\nNotes:\n **Responsibilities:**\n\n - This scraper retrieves HTML documents over HTTP(S) and returns\n them as raw content wrapped in a `Content` object.\n - Fetches raw bytes and metadata only.\n - The scraper uses `httpx.Client` for HTTP requests, enforces an\n HTML content type, and preserves HTTP response metadata.\n\n **Constraints:**\n\n - The scraper does not: Parse HTML, perform retries or backoff,\n handle non-HTML responses.", "members": { "content_type": { @@ -140,7 +147,7 @@ "name": "validate_content_type", "kind": "function", "path": "omniread.html.scraper.HTMLScraper.validate_content_type", - "signature": "", + "signature": "", "docstring": "Validate that the HTTP response contains HTML content.\n\nArgs:\n response (httpx.Response):\n HTTP response returned by `httpx`.\n\nRaises:\n ValueError:\n If the `Content-Type` header is missing or does not indicate HTML content." }, "fetch": { diff --git a/mcp_docs/modules/omniread.json b/docs/mcp/modules/omniread.json similarity index 52% rename from mcp_docs/modules/omniread.json rename to docs/mcp/modules/omniread.json index 8b122a6..af90016 100644 --- a/mcp_docs/modules/omniread.json +++ b/docs/mcp/modules/omniread.json @@ -2,7 +2,7 @@ "module": "omniread", "content": { "path": "omniread", - "docstring": "# Summary\n\n`OmniRead` — format-agnostic content acquisition and parsing framework.\n\n`OmniRead` provides a **cleanly layered architecture** for fetching, parsing,\nand normalizing content from heterogeneous sources such as HTML documents\nand PDF files.\n\nThe library is structured around three core concepts:\n\n1. **`Content`**: A canonical, format-agnostic container representing raw content\n bytes and minimal contextual metadata.\n2. **`Scrapers`**: Components responsible for *acquiring* raw content from a\n source (HTTP, filesystem, object storage, etc.). `Scrapers` never interpret\n content.\n3. **`Parsers`**: Components responsible for *interpreting* acquired content and\n converting it into structured, typed representations.\n\n`OmniRead` deliberately separates these responsibilities to ensure:\n\n- Clear boundaries between IO and interpretation.\n- Replaceable implementations per format.\n- Predictable, testable behavior.\n\n# Installation\n\nInstall `OmniRead` using pip:\n\n```bash\npip install omniread\n```\n\nInstall OmniRead using Poetry:\n```bash\npoetry add omniread\n```\n\n---\n\n## Quick start\n\nExample:\n HTML example:\n ```python\n from omniread import HTMLScraper, HTMLParser\n\n scraper = HTMLScraper()\n content = scraper.fetch(\"https://example.com\")\n\n class TitleParser(HTMLParser[str]):\n def parse(self) -> str:\n return self._soup.title.string\n\n parser = TitleParser(content)\n title = parser.parse()\n ```\n\n PDF example:\n ```python\n from omniread import FileSystemPDFClient, PDFScraper, PDFParser\n from pathlib import Path\n\n client = FileSystemPDFClient()\n scraper = PDFScraper(client=client)\n content = scraper.fetch(Path(\"document.pdf\"))\n\n class TextPDFParser(PDFParser[str]):\n def parse(self) -> str:\n # implement PDF text extraction\n ...\n\n parser = TextPDFParser(content)\n result = parser.parse()\n ```\n\n---\n\n# Public API\n\nThis module re-exports the **recommended public entry points** of OmniRead.\nConsumers are encouraged to import from this namespace rather than from\nformat-specific submodules directly, unless advanced customization is\nrequired.\n\n- `Content`: Canonical content model.\n- `ContentType`: Supported media types.\n- `HTMLScraper`: HTTP-based HTML acquisition.\n- `HTMLParser`: Base parser for HTML DOM interpretation.\n- `FileSystemPDFClient`: Local filesystem PDF access.\n- `PDFScraper`: PDF-specific content acquisition.\n- `PDFParser`: Base parser for PDF binary interpretation.\n\n---\n\n# Core Philosophy\n\n`OmniRead` is designed as a **decoupled content engine**:\n\n1. **Separation of Concerns**: Scrapers *fetch*, Parsers *interpret*. Neither\n knows about the other.\n2. **Normalized Exchange**: All components communicate via the `Content` model,\n ensuring a consistent contract.\n3. **Format Agnosticism**: The core logic is independent of whether the input\n is HTML, PDF, or JSON.\n\n---", + "docstring": "# Summary\n\n`OmniRead` — format-agnostic content acquisition and parsing framework.\n\n`OmniRead` provides a **cleanly layered architecture** for fetching, parsing,\nand normalizing content from heterogeneous sources such as HTML documents\nand PDF files.\n\nThe library is structured around three core concepts:\n\n1. **`Content`**: A canonical, format-agnostic container representing raw content\n bytes and minimal contextual metadata.\n2. **`Scrapers`**: Components responsible for *acquiring* raw content from a\n source (HTTP, filesystem, object storage, etc.). `Scrapers` never interpret\n content.\n3. **`Parsers`**: Components responsible for *interpreting* acquired content and\n converting it into structured, typed representations.\n\n`OmniRead` deliberately separates these responsibilities to ensure:\n\n- Clear boundaries between IO and interpretation.\n- Replaceable implementations per format.\n- Predictable, testable behavior.\n\n# Installation\n\nInstall `OmniRead` using pip:\n\n```bash\npip install omniread\n```\n\nInstall OmniRead using Poetry:\n```bash\npoetry add omniread\n```\n\n---\n\n## Quick start\n\nExample:\n HTML example:\n ```python\n from omniread import HTMLScraper, HTMLParser\n\n scraper = HTMLScraper()\n content = scraper.fetch(\"https://example.com\")\n\n class TitleParser(HTMLParser[str]):\n def parse(self) -> str:\n return self._soup.title.string\n\n parser = TitleParser(content)\n title = parser.parse()\n ```\n\n PDF example:\n ```python\n from omniread import FileSystemPDFClient, PDFScraper, PDFParser\n from pathlib import Path\n\n client = FileSystemPDFClient()\n scraper = PDFScraper(client=client)\n content = scraper.fetch(Path(\"document.pdf\"))\n\n class TextPDFParser(PDFParser[str]):\n def parse(self) -> str:\n # implement PDF text extraction\n ...\n\n parser = TextPDFParser(content)\n result = parser.parse()\n ```\n\n---\n\n# Public API\n\nThis module re-exports the **recommended public entry points** of OmniRead.\nConsumers are encouraged to import from this namespace rather than from\nformat-specific submodules directly, unless advanced customization is\nrequired.\n\n- `Content`: Canonical content model.\n- `ContentType`: Supported media types.\n- `HTMLScraper`: HTTP-based HTML acquisition.\n- `HTMLParser`: Base parser for HTML DOM interpretation.\n- `FileSystemPDFClient`: Local filesystem PDF access.\n- `PDFScraper`: PDF-specific content acquisition.\n- `PDFParser`: Base parser for PDF binary interpretation.\n- `FileSystemXlsxClient`: Local filesystem spreadsheet access.\n- `XlsxScraper`: XLSX-specific content acquisition.\n- `XlsxParser`: Generic string-row parser for xlsx workbooks.\n\n---\n\n# Core Philosophy\n\n`OmniRead` is designed as a **decoupled content engine**:\n\n1. **Separation of Concerns**: Scrapers *fetch*, Parsers *interpret*. Neither\n knows about the other.\n2. **Normalized Exchange**: All components communicate via the `Content` model,\n ensuring a consistent contract.\n3. **Format Agnosticism**: The core logic is independent of whether the input\n is HTML, PDF, or JSON.\n\n---", "objects": { "Content": { "name": "Content", @@ -62,6 +62,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -78,6 +92,100 @@ } } }, + "BaseCsvClient": { + "name": "BaseCsvClient", + "kind": "class", + "path": "omniread.BaseCsvClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving csv bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full csv binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.BaseCsvClient.fetch", + "signature": "", + "docstring": "Fetch raw csv bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "CsvParser": { + "name": "CsvParser", + "kind": "class", + "path": "omniread.CsvParser", + "signature": "", + "docstring": "Generic csv parser producing string rows from the document.\n\nNotes:\n **Responsibilities:**\n\n - Decode the payload (UTF-8 with BOM support, Latin-1 fallback).\n - Detect the delimiter from a leading sample (`,` `;` tab `|`),\n defaulting to `,`.\n - Normalize cells into deterministic stripped string values.\n - Expose row extraction helpers mirroring `XlsxParser.rows`.\n\n **Constraints:**\n\n - All values are strings; consumers requiring typed values must\n convert on their side.\n - Quoted fields containing delimiters/newlines are handled by\n the standard ``csv`` module.", + "members": { + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.CsvParser.parse", + "signature": "", + "docstring": "Parse the document into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the document." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.CsvParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from the document.\n\nArgs:\n skip_empty (bool):\n When True (default), rows whose cells are all blank are\n omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row." + } + } + }, + "CsvParserBase": { + "name": "CsvParserBase", + "kind": "class", + "path": "omniread.CsvParserBase", + "signature": "", + "docstring": "Base csv parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces csv content-type compatibility and provides\n the extension point for implementing concrete csv parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.CsvParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (CSV only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.CsvParserBase.parse", + "signature": "", + "docstring": "Parse csv content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "CsvScraper": { + "name": "CsvScraper", + "kind": "class", + "path": "omniread.CsvScraper", + "signature": "", + "docstring": "Scraper for csv documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw csv bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n CSV content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.CsvScraper.fetch", + "signature": "", + "docstring": "Fetch a csv document from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw csv bytes, source\n identifier, CSV content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + }, + "FileSystemCsvClient": { + "name": "FileSystemCsvClient", + "kind": "class", + "path": "omniread.FileSystemCsvClient", + "signature": "", + "docstring": "CSV client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads csv files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.FileSystemCsvClient.fetch", + "signature": "", + "docstring": "Read a csv file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the csv file.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + }, "HTMLScraper": { "name": "HTMLScraper", "kind": "class", @@ -214,6 +322,114 @@ } } }, + "BaseXlsxClient": { + "name": "BaseXlsxClient", + "kind": "class", + "path": "omniread.BaseXlsxClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving spreadsheet bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full xlsx binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.BaseXlsxClient.fetch", + "signature": "", + "docstring": "Fetch raw xlsx bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemXlsxClient": { + "name": "FileSystemXlsxClient", + "kind": "class", + "path": "omniread.FileSystemXlsxClient", + "signature": "", + "docstring": "XLSX client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads spreadsheet files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.FileSystemXlsxClient.fetch", + "signature": "", + "docstring": "Read an xlsx file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the spreadsheet file.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + }, + "XlsxParser": { + "name": "XlsxParser", + "kind": "class", + "path": "omniread.XlsxParser", + "signature": "", + "docstring": "Generic xlsx parser producing string rows from a worksheet.\n\nNotes:\n **Responsibilities:**\n\n - Lazily load the workbook owned by the parser's content.\n - Normalize cells (including dates and numeric values) into\n deterministic string representations.\n - Expose sheet discovery and row extraction helpers.\n\n **Constraints:**\n\n - Cells are rendered with ``str(value)`` after trimming; date and\n datetime values are rendered in ISO format. Consumers requiring\n locale-specific formatting must convert on their side.", + "members": { + "workbook": { + "name": "workbook", + "kind": "attribute", + "path": "omniread.XlsxParser.workbook", + "signature": "", + "docstring": "The lazily loaded workbook backing this parser's content." + }, + "sheet_names": { + "name": "sheet_names", + "kind": "attribute", + "path": "omniread.XlsxParser.sheet_names", + "signature": "", + "docstring": "Names of all worksheets contained in the workbook." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.XlsxParser.parse", + "signature": "", + "docstring": "Parse the first worksheet into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the default (first) worksheet." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.XlsxParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from a worksheet.\n\nArgs:\n sheet (Optional[Union[int, str]]):\n Worksheet index or title; defaults to the first worksheet.\n skip_empty (bool):\n When True (default), rows whose cells are all blank are omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row.\n\nRaises:\n ValueError:\n If the requested sheet does not exist." + } + } + }, + "XlsxParserBase": { + "name": "XlsxParserBase", + "kind": "class", + "path": "omniread.XlsxParserBase", + "signature": "", + "docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.XlsxParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (XLSX only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.XlsxParserBase.parse", + "signature": "", + "docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "XlsxScraper": { + "name": "XlsxScraper", + "kind": "class", + "path": "omniread.XlsxScraper", + "signature": "", + "docstring": "Scraper for xlsx spreadsheet documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw xlsx bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n XLSX content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.XlsxScraper.fetch", + "signature": "", + "docstring": "Fetch an xlsx document from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw xlsx bytes, source\n identifier, XLSX content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + }, "core": { "name": "core", "kind": "module", @@ -279,6 +495,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.core.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.core.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -355,11 +585,11 @@ "signature": null, "docstring": "# Summary\n\nCanonical content models for OmniRead.\n\nThis module defines the **format-agnostic content representation** used across\nall parsers and scrapers in OmniRead.\n\nThe models defined here represent *what* was extracted, not *how* it was\nretrieved or parsed. Format-specific behavior and metadata must not alter\nthe semantic meaning of these models.", "members": { - "Enum": { - "name": "Enum", + "Mapping": { + "name": "Mapping", "kind": "alias", - "path": "omniread.core.content.Enum", - "signature": "", + "path": "omniread.core.content.Mapping", + "signature": "", "docstring": null }, "dataclass": { @@ -369,6 +599,13 @@ "signature": "", "docstring": null }, + "Enum": { + "name": "Enum", + "kind": "alias", + "path": "omniread.core.content.Enum", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -376,25 +613,11 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", - "kind": "alias", - "path": "omniread.core.content.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.core.content.Optional", - "signature": "", - "docstring": null - }, "ContentType": { "name": "ContentType", "kind": "class", "path": "omniread.core.content.ContentType", - "signature": "", + "signature": "", "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", "members": { "HTML": { @@ -411,6 +634,20 @@ "signature": null, "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.core.content.ContentType.XLSX", + "signature": null, + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.core.content.ContentType.CSV", + "signature": null, + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -431,7 +668,7 @@ "name": "Content", "kind": "class", "path": "omniread.core.content.Content", - "signature": "", + "signature": "", "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", "members": { "raw": { @@ -501,13 +738,6 @@ "signature": "", "docstring": null }, - "Set": { - "name": "Set", - "kind": "alias", - "path": "omniread.core.parser.Set", - "signature": "", - "docstring": null - }, "Content": { "name": "Content", "kind": "class", @@ -566,6 +796,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.core.parser.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.core.parser.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -649,6 +893,13 @@ "signature": "", "docstring": null }, + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.core.scraper.Mapping", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -656,20 +907,6 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", - "kind": "alias", - "path": "omniread.core.scraper.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.core.scraper.Optional", - "signature": "", - "docstring": null - }, "Content": { "name": "Content", "kind": "class", @@ -711,14 +948,14 @@ "name": "BaseScraper", "kind": "class", "path": "omniread.core.scraper.BaseScraper", - "signature": "", + "signature": "", "docstring": "Base interface for all scrapers.\n\nNotes:\n **Responsibilities:**\n\n - A scraper is responsible ONLY for fetching raw content (bytes)\n from a source. It must not interpret or parse it.\n - A scraper is a stateless acquisition component that retrieves raw\n content from a source and returns it as a `Content` object.\n - Scrapers define how content is obtained, not what the content means.\n - Implementations may vary in transport mechanism, authentication\n strategy, retry and backoff behavior.\n\n **Constraints:**\n\n - Implementations must not parse content, modify content semantics,\n or couple scraping logic to a specific parser.", "members": { "fetch": { "name": "fetch", "kind": "function", "path": "omniread.core.scraper.BaseScraper.fetch", - "signature": "", + "signature": "", "docstring": "Fetch raw content from the given source.\n\nArgs:\n source (str):\n Location identifier (URL, file path, S3 URI, etc.).\n\n metadata (Optional[Mapping[str, Any]], optional):\n Optional hints for the scraper (headers, auth, etc.).\n\nReturns:\n Content:\n Content object containing raw bytes and metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors as defined by the implementation.\n\nNotes:\n **Responsibilities:**\n\n - Implementations must retrieve the content referenced by `source`\n and return it as raw bytes wrapped in a `Content` object." } } @@ -727,6 +964,582 @@ } } }, + "csv": { + "name": "csv", + "kind": "module", + "path": "omniread.csv", + "signature": null, + "docstring": "# Summary\n\nCSV subpackage for OmniRead.\n\nProvides acquisition and parsing of comma-separated-value content:\n\n- `BaseCsvClient`: abstract backing-store client for csv bytes.\n- `FileSystemCsvClient`: local filesystem implementation.\n- `CsvScraper`: wraps fetched bytes into canonical `Content`.\n- `CsvParserBase`: content-type-enforcing parser contract.\n- `CsvParser`: generic string-row parser built on the standard csv module.", + "members": { + "BaseCsvClient": { + "name": "BaseCsvClient", + "kind": "class", + "path": "omniread.csv.BaseCsvClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving csv bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full csv binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.BaseCsvClient.fetch", + "signature": "", + "docstring": "Fetch raw csv bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemCsvClient": { + "name": "FileSystemCsvClient", + "kind": "class", + "path": "omniread.csv.FileSystemCsvClient", + "signature": "", + "docstring": "CSV client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads csv files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.FileSystemCsvClient.fetch", + "signature": "", + "docstring": "Read a csv file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the csv file.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + }, + "CsvParser": { + "name": "CsvParser", + "kind": "class", + "path": "omniread.csv.CsvParser", + "signature": "", + "docstring": "Generic csv parser producing string rows from the document.\n\nNotes:\n **Responsibilities:**\n\n - Decode the payload (UTF-8 with BOM support, Latin-1 fallback).\n - Detect the delimiter from a leading sample (`,` `;` tab `|`),\n defaulting to `,`.\n - Normalize cells into deterministic stripped string values.\n - Expose row extraction helpers mirroring `XlsxParser.rows`.\n\n **Constraints:**\n\n - All values are strings; consumers requiring typed values must\n convert on their side.\n - Quoted fields containing delimiters/newlines are handled by\n the standard ``csv`` module.", + "members": { + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.CsvParser.parse", + "signature": "", + "docstring": "Parse the document into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the document." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.csv.CsvParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from the document.\n\nArgs:\n skip_empty (bool):\n When True (default), rows whose cells are all blank are\n omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row." + } + } + }, + "CsvParserBase": { + "name": "CsvParserBase", + "kind": "class", + "path": "omniread.csv.CsvParserBase", + "signature": "", + "docstring": "Base csv parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces csv content-type compatibility and provides\n the extension point for implementing concrete csv parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.CsvParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (CSV only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.CsvParserBase.parse", + "signature": "", + "docstring": "Parse csv content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "CsvScraper": { + "name": "CsvScraper", + "kind": "class", + "path": "omniread.csv.CsvScraper", + "signature": "", + "docstring": "Scraper for csv documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw csv bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n CSV content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.CsvScraper.fetch", + "signature": "", + "docstring": "Fetch a csv document from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw csv bytes, source\n identifier, CSV content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + }, + "client": { + "name": "client", + "kind": "module", + "path": "omniread.csv.client", + "signature": null, + "docstring": "# Summary\n\nCSV client abstractions for OmniRead.\n\nThis module defines the **client layer** responsible for retrieving raw\ncomma-separated-value document bytes from a concrete backing store.\n\nClients provide low-level access to csv binaries and are intentionally\ndecoupled from scraping and parsing logic. They do not perform validation,\ninterpretation, or content extraction.\n\nTypical backing stores include:\n\n- Local filesystems\n- Object storage (S3, GCS, etc.)\n- Network file systems", + "members": { + "ABC": { + "name": "ABC", + "kind": "alias", + "path": "omniread.csv.client.ABC", + "signature": "", + "docstring": null + }, + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.csv.client.abstractmethod", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "omniread.csv.client.Path", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.csv.client.Any", + "signature": "", + "docstring": null + }, + "BaseCsvClient": { + "name": "BaseCsvClient", + "kind": "class", + "path": "omniread.csv.client.BaseCsvClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving csv bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full csv binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.client.BaseCsvClient.fetch", + "signature": "", + "docstring": "Fetch raw csv bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemCsvClient": { + "name": "FileSystemCsvClient", + "kind": "class", + "path": "omniread.csv.client.FileSystemCsvClient", + "signature": "", + "docstring": "CSV client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads csv files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.client.FileSystemCsvClient.fetch", + "signature": "", + "docstring": "Read a csv file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the csv file.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + } + } + }, + "parser": { + "name": "parser", + "kind": "module", + "path": "omniread.csv.parser", + "signature": null, + "docstring": "# Summary\n\nCSV parser implementations for OmniRead.\n\nThis module provides a concrete, generic parser for comma-separated-value\ndocuments. It exposes records as lists of string cells so downstream\nconsumers can interpret tabular content without depending on the ``csv``\nmodule directly.\n\nThe parser is intentionally statement-agnostic: it performs no header\ndetection or column interpretation beyond basic cell normalization and\ndelimiter detection.", + "members": { + "Sniffer": { + "name": "Sniffer", + "kind": "alias", + "path": "omniread.csv.parser.Sniffer", + "signature": "", + "docstring": null + }, + "reader": { + "name": "reader", + "kind": "alias", + "path": "omniread.csv.parser.reader", + "signature": "", + "docstring": null + }, + "StringIO": { + "name": "StringIO", + "kind": "alias", + "path": "omniread.csv.parser.StringIO", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.csv.parser.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.csv.parser.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.csv.parser.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.csv.parser.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.csv.parser.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "CsvParserBase": { + "name": "CsvParserBase", + "kind": "class", + "path": "omniread.csv.parser.CsvParserBase", + "signature": "", + "docstring": "Base csv parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces csv content-type compatibility and provides\n the extension point for implementing concrete csv parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.parser.CsvParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (CSV only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser.CsvParserBase.parse", + "signature": "", + "docstring": "Parse csv content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "CsvParser": { + "name": "CsvParser", + "kind": "class", + "path": "omniread.csv.parser.CsvParser", + "signature": "", + "docstring": "Generic csv parser producing string rows from the document.\n\nNotes:\n **Responsibilities:**\n\n - Decode the payload (UTF-8 with BOM support, Latin-1 fallback).\n - Detect the delimiter from a leading sample (`,` `;` tab `|`),\n defaulting to `,`.\n - Normalize cells into deterministic stripped string values.\n - Expose row extraction helpers mirroring `XlsxParser.rows`.\n\n **Constraints:**\n\n - All values are strings; consumers requiring typed values must\n convert on their side.\n - Quoted fields containing delimiters/newlines are handled by\n the standard ``csv`` module.", + "members": { + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser.CsvParser.parse", + "signature": "", + "docstring": "Parse the document into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the document." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.csv.parser.CsvParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from the document.\n\nArgs:\n skip_empty (bool):\n When True (default), rows whose cells are all blank are\n omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row." + } + } + } + } + }, + "parser_base": { + "name": "parser_base", + "kind": "module", + "path": "omniread.csv.parser_base", + "signature": null, + "docstring": "# Summary\n\nCSV parser base implementation for OmniRead.\n\nThis module defines the **CSV-specific parser contract**, extending the\nformat-agnostic `BaseParser` with constraints appropriate for\ncomma-separated-value documents.", + "members": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.csv.parser_base.abstractmethod", + "signature": "", + "docstring": null + }, + "Generic": { + "name": "Generic", + "kind": "alias", + "path": "omniread.csv.parser_base.Generic", + "signature": "", + "docstring": null + }, + "TypeVar": { + "name": "TypeVar", + "kind": "alias", + "path": "omniread.csv.parser_base.TypeVar", + "signature": "", + "docstring": null + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.csv.parser_base.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.csv.parser_base.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseParser": { + "name": "BaseParser", + "kind": "class", + "path": "omniread.csv.parser_base.BaseParser", + "signature": "", + "docstring": "Base interface for all parsers.\n\nNotes:\n **Guarantees:**\n\n - A parser is a self-contained object that owns the `Content` it is\n responsible for interpreting.\n - Consumers may rely on early validation of content compatibility\n and type-stable return values from `parse()`.\n\n **Responsibilities:**\n\n - Implementations must declare supported content types via `supported_types`.\n - Implementations must raise parsing-specific exceptions from `parse()`.\n - Implementations must remain deterministic for a given input.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.parser_base.BaseParser.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser. An empty set indicates that the parser is content-type agnostic." + }, + "content": { + "name": "content", + "kind": "attribute", + "path": "omniread.csv.parser_base.BaseParser.content", + "signature": "", + "docstring": null + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser_base.BaseParser.parse", + "signature": "", + "docstring": "Parse the owned content into structured output.\n\nReturns:\n T:\n Parsed, structured representation.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation.\n\nNotes:\n **Responsibilities:**\n\n - Implementations must fully consume the provided content and\n return a deterministic, structured output." + }, + "supports": { + "name": "supports", + "kind": "function", + "path": "omniread.csv.parser_base.BaseParser.supports", + "signature": "", + "docstring": "Check whether this parser supports the content's type.\n\nReturns:\n bool:\n True if the content type is supported; False otherwise." + } + } + }, + "T": { + "name": "T", + "kind": "attribute", + "path": "omniread.csv.parser_base.T", + "signature": null, + "docstring": null + }, + "CsvParserBase": { + "name": "CsvParserBase", + "kind": "class", + "path": "omniread.csv.parser_base.CsvParserBase", + "signature": "", + "docstring": "Base csv parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces csv content-type compatibility and provides\n the extension point for implementing concrete csv parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.csv.parser_base.CsvParserBase.supported_types", + "signature": null, + "docstring": "Set of content types supported by this parser (CSV only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.csv.parser_base.CsvParserBase.parse", + "signature": "", + "docstring": "Parse csv content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + } + } + }, + "scraper": { + "name": "scraper", + "kind": "module", + "path": "omniread.csv.scraper", + "signature": null, + "docstring": "# Summary\n\nCSV scraper for OmniRead.\n\nThis module defines the scraper responsible for acquiring raw\ncomma-separated-value document content from a backing store via a\nconfigured client.\n\nThe scraper does not interpret or parse the acquired bytes; it wraps them in\nthe canonical `Content` model.", + "members": { + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.csv.scraper.Mapping", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.csv.scraper.Any", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.csv.scraper.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.csv.scraper.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.csv.scraper.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.csv.scraper.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseCsvClient": { + "name": "BaseCsvClient", + "kind": "class", + "path": "omniread.csv.scraper.BaseCsvClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving csv bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full csv binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.scraper.BaseCsvClient.fetch", + "signature": "", + "docstring": "Fetch raw csv bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw csv bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "CsvScraper": { + "name": "CsvScraper", + "kind": "class", + "path": "omniread.csv.scraper.CsvScraper", + "signature": "", + "docstring": "Scraper for csv documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw csv bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n CSV content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.csv.scraper.CsvScraper.fetch", + "signature": "", + "docstring": "Fetch a csv document from the given source.\n\nArgs:\n source (Any):\n Identifier of the csv source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw csv bytes, source\n identifier, CSV content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + } + } + } + } + }, "html": { "name": "html", "kind": "module", @@ -822,6 +1635,13 @@ "signature": null, "docstring": "# Summary\n\nHTML parser base implementations for OmniRead.\n\nThis module provides reusable HTML parsing utilities built on top of\nthe abstract parser contracts defined in `omniread.core.parser`.\n\nIt supplies:\n\n- Content-type enforcement for HTML inputs\n- BeautifulSoup initialization and lifecycle management\n- Common helper methods for extracting structured data from HTML elements\n\nConcrete parsers must subclass `HTMLParser` and implement the `parse()` method\nto return a structured representation appropriate for their use case.", "members": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.html.parser.abstractmethod", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -843,20 +1663,6 @@ "signature": "", "docstring": null }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.html.parser.Optional", - "signature": "", - "docstring": null - }, - "abstractmethod": { - "name": "abstractmethod", - "kind": "alias", - "path": "omniread.html.parser.abstractmethod", - "signature": "", - "docstring": null - }, "BeautifulSoup": { "name": "BeautifulSoup", "kind": "alias", @@ -871,43 +1677,6 @@ "signature": "", "docstring": null }, - "ContentType": { - "name": "ContentType", - "kind": "class", - "path": "omniread.html.parser.ContentType", - "signature": "", - "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", - "members": { - "HTML": { - "name": "HTML", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.HTML", - "signature": "", - "docstring": "HTML document content." - }, - "PDF": { - "name": "PDF", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.PDF", - "signature": "", - "docstring": "PDF document content." - }, - "JSON": { - "name": "JSON", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.JSON", - "signature": "", - "docstring": "JSON document content." - }, - "XML": { - "name": "XML", - "kind": "attribute", - "path": "omniread.html.parser.ContentType.XML", - "signature": "", - "docstring": "XML document content." - } - } - }, "Content": { "name": "Content", "kind": "class", @@ -945,6 +1714,57 @@ } } }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.html.parser.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.html.parser.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, "BaseParser": { "name": "BaseParser", "kind": "class", @@ -993,7 +1813,7 @@ "name": "HTMLParser", "kind": "class", "path": "omniread.html.parser.HTMLParser", - "signature": "", + "signature": "", "docstring": "Base HTML parser.\n\nNotes:\n **Responsibilities:**\n\n - This class extends the core `BaseParser` with HTML-specific behavior,\n including DOM parsing via BeautifulSoup and reusable extraction helpers.\n - Provides reusable helpers for HTML extraction. Concrete parsers must\n explicitly define the return type.\n\n **Guarantees:**\n\n - Accepts only HTML content.\n - Owns a parsed BeautifulSoup DOM tree.\n - Provides pure helper utilities for common HTML structures.\n\n **Constraints:**\n\n - Concrete subclasses must define the output type `T` and implement\n the `parse()` method.", "members": { "supported_types": { @@ -1028,31 +1848,17 @@ "name": "parse_table", "kind": "function", "path": "omniread.html.parser.HTMLParser.parse_table", - "signature": "", + "signature": "", "docstring": "Parse an HTML table into a 2D list of strings.\n\nArgs:\n table (Tag):\n BeautifulSoup tag representing a `
`.\n\nReturns:\n list[list[str]]:\n A list of rows, where each row is a list of cell text values." }, "parse_meta": { "name": "parse_meta", "kind": "function", "path": "omniread.html.parser.HTMLParser.parse_meta", - "signature": "", + "signature": "", "docstring": "Extract high-level metadata from the HTML document.\n\nReturns:\n dict[str, Any]:\n Dictionary containing extracted metadata.\n\nNotes:\n **Responsibilities:**\n\n - Extract high-level metadata from the HTML document.\n - This includes: Document title, `` tag name/property to\n content mappings." } } - }, - "list": { - "name": "list", - "kind": "alias", - "path": "omniread.html.parser.list", - "signature": "", - "docstring": null - }, - "dict": { - "name": "dict", - "kind": "alias", - "path": "omniread.html.parser.dict", - "signature": "", - "docstring": null } } }, @@ -1063,11 +1869,11 @@ "signature": null, "docstring": "# Summary\n\nHTML scraping implementation for OmniRead.\n\nThis module provides an HTTP-based scraper for retrieving HTML documents.\nIt implements the core `BaseScraper` contract using `httpx` as the transport\nlayer.\n\nThis scraper is responsible for:\n\n- Fetching raw HTML bytes over HTTP(S)\n- Validating response content type\n- Attaching HTTP metadata to the returned content\n\nThis scraper is not responsible for:\n\n- Parsing or interpreting HTML\n- Retrying failed requests\n- Managing crawl policies or rate limiting", "members": { - "httpx": { - "name": "httpx", + "Mapping": { + "name": "Mapping", "kind": "alias", - "path": "omniread.html.scraper.httpx", - "signature": "", + "path": "omniread.html.scraper.Mapping", + "signature": "", "docstring": null }, "Any": { @@ -1077,18 +1883,11 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", + "httpx": { + "name": "httpx", "kind": "alias", - "path": "omniread.html.scraper.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.html.scraper.Optional", - "signature": "", + "path": "omniread.html.scraper.httpx", + "signature": "", "docstring": null }, "Content": { @@ -1149,6 +1948,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.html.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.html.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -1185,7 +1998,7 @@ "name": "HTMLScraper", "kind": "class", "path": "omniread.html.scraper.HTMLScraper", - "signature": "", + "signature": "", "docstring": "Base HTML scraper using `httpx`.\n\nNotes:\n **Responsibilities:**\n\n - This scraper retrieves HTML documents over HTTP(S) and returns\n them as raw content wrapped in a `Content` object.\n - Fetches raw bytes and metadata only.\n - The scraper uses `httpx.Client` for HTTP requests, enforces an\n HTML content type, and preserves HTTP response metadata.\n\n **Constraints:**\n\n - The scraper does not: Parse HTML, perform retries or backoff,\n handle non-HTML responses.", "members": { "content_type": { @@ -1199,7 +2012,7 @@ "name": "validate_content_type", "kind": "function", "path": "omniread.html.scraper.HTMLScraper.validate_content_type", - "signature": "", + "signature": "", "docstring": "Validate that the HTTP response contains HTML content.\n\nArgs:\n response (httpx.Response):\n HTTP response returned by `httpx`.\n\nRaises:\n ValueError:\n If the `Content-Type` header is missing or does not indicate HTML content." }, "fetch": { @@ -1284,13 +2097,6 @@ "signature": null, "docstring": "# Summary\n\nPDF client abstractions for OmniRead.\n\nThis module defines the **client layer** responsible for retrieving raw PDF\nbytes from a concrete backing store.\n\nClients provide low-level access to PDF binaries and are intentionally\ndecoupled from scraping and parsing logic. They do not perform validation,\ninterpretation, or content extraction.\n\nTypical backing stores include:\n\n- Local filesystems\n- Object storage (S3, GCS, etc.)\n- Network file systems", "members": { - "Any": { - "name": "Any", - "kind": "alias", - "path": "omniread.pdf.client.Any", - "signature": "", - "docstring": null - }, "ABC": { "name": "ABC", "kind": "alias", @@ -1312,6 +2118,13 @@ "signature": "", "docstring": null }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.pdf.client.Any", + "signature": "", + "docstring": null + }, "BasePDFClient": { "name": "BasePDFClient", "kind": "class", @@ -1353,6 +2166,13 @@ "signature": null, "docstring": "# Summary\n\nPDF parser base implementations for OmniRead.\n\nThis module defines the **PDF-specific parser contract**, extending the\nformat-agnostic `BaseParser` with constraints appropriate for PDF content.\n\nPDF parsers are responsible for interpreting binary PDF data and producing\nstructured representations suitable for downstream consumption.", "members": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.pdf.parser.abstractmethod", + "signature": "", + "docstring": null + }, "Generic": { "name": "Generic", "kind": "alias", @@ -1367,13 +2187,6 @@ "signature": "", "docstring": null }, - "abstractmethod": { - "name": "abstractmethod", - "kind": "alias", - "path": "omniread.pdf.parser.abstractmethod", - "signature": "", - "docstring": null - }, "ContentType": { "name": "ContentType", "kind": "class", @@ -1395,6 +2208,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.pdf.parser.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.pdf.parser.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -1487,6 +2314,13 @@ "signature": null, "docstring": "# Summary\n\nPDF scraping implementation for OmniRead.\n\nThis module provides a PDF-specific scraper that coordinates PDF byte\nretrieval via a client and normalizes the result into a `Content` object.\n\nThe scraper implements the core `BaseScraper` contract while delegating\nall storage and access concerns to a `BasePDFClient` implementation.", "members": { + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.pdf.scraper.Mapping", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -1494,20 +2328,6 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", - "kind": "alias", - "path": "omniread.pdf.scraper.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.pdf.scraper.Optional", - "signature": "", - "docstring": null - }, "Content": { "name": "Content", "kind": "class", @@ -1566,6 +2386,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.pdf.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.pdf.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -1618,14 +2452,14 @@ "name": "PDFScraper", "kind": "class", "path": "omniread.pdf.scraper.PDFScraper", - "signature": "", + "signature": "", "docstring": "Scraper for PDF sources.\n\nNotes:\n **Responsibilities:**\n\n - Delegates byte retrieval to a PDF client and normalizes output\n into `Content`.\n - Preserves caller-provided metadata.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", "members": { "fetch": { "name": "fetch", "kind": "function", "path": "omniread.pdf.scraper.PDFScraper.fetch", - "signature": "", + "signature": "", "docstring": "Fetch a PDF document from the given source.\n\nArgs:\n source (Any):\n Identifier of the PDF source as understood by the configured PDF client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw PDF bytes, source identifier, PDF content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the PDF client." } } @@ -1633,6 +2467,617 @@ } } } + }, + "xlsx": { + "name": "xlsx", + "kind": "module", + "path": "omniread.xlsx", + "signature": null, + "docstring": "# Summary\n\nXLSX subpackage for OmniRead.\n\nProvides acquisition and parsing of Office Open XML spreadsheet (xlsx)\ncontent:\n\n- `BaseXlsxClient`: abstract backing-store client for xlsx bytes.\n- `FileSystemXlsxClient`: local filesystem implementation.\n- `XlsxScraper`: wraps fetched bytes into canonical `Content`.\n- `XlsxParserBase`: content-type-enforcing parser contract.\n- `XlsxParser`: generic string-row parser built on openpyxl.", + "members": { + "BaseXlsxClient": { + "name": "BaseXlsxClient", + "kind": "class", + "path": "omniread.xlsx.BaseXlsxClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving spreadsheet bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full xlsx binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.BaseXlsxClient.fetch", + "signature": "", + "docstring": "Fetch raw xlsx bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemXlsxClient": { + "name": "FileSystemXlsxClient", + "kind": "class", + "path": "omniread.xlsx.FileSystemXlsxClient", + "signature": "", + "docstring": "XLSX client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads spreadsheet files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.FileSystemXlsxClient.fetch", + "signature": "", + "docstring": "Read an xlsx file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the spreadsheet file.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + }, + "XlsxParser": { + "name": "XlsxParser", + "kind": "class", + "path": "omniread.xlsx.XlsxParser", + "signature": "", + "docstring": "Generic xlsx parser producing string rows from a worksheet.\n\nNotes:\n **Responsibilities:**\n\n - Lazily load the workbook owned by the parser's content.\n - Normalize cells (including dates and numeric values) into\n deterministic string representations.\n - Expose sheet discovery and row extraction helpers.\n\n **Constraints:**\n\n - Cells are rendered with ``str(value)`` after trimming; date and\n datetime values are rendered in ISO format. Consumers requiring\n locale-specific formatting must convert on their side.", + "members": { + "workbook": { + "name": "workbook", + "kind": "attribute", + "path": "omniread.xlsx.XlsxParser.workbook", + "signature": "", + "docstring": "The lazily loaded workbook backing this parser's content." + }, + "sheet_names": { + "name": "sheet_names", + "kind": "attribute", + "path": "omniread.xlsx.XlsxParser.sheet_names", + "signature": "", + "docstring": "Names of all worksheets contained in the workbook." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.XlsxParser.parse", + "signature": "", + "docstring": "Parse the first worksheet into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the default (first) worksheet." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.xlsx.XlsxParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from a worksheet.\n\nArgs:\n sheet (Optional[Union[int, str]]):\n Worksheet index or title; defaults to the first worksheet.\n skip_empty (bool):\n When True (default), rows whose cells are all blank are omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row.\n\nRaises:\n ValueError:\n If the requested sheet does not exist." + } + } + }, + "XlsxParserBase": { + "name": "XlsxParserBase", + "kind": "class", + "path": "omniread.xlsx.XlsxParserBase", + "signature": "", + "docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.XlsxParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (XLSX only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.XlsxParserBase.parse", + "signature": "", + "docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "XlsxScraper": { + "name": "XlsxScraper", + "kind": "class", + "path": "omniread.xlsx.XlsxScraper", + "signature": "", + "docstring": "Scraper for xlsx spreadsheet documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw xlsx bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n XLSX content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.XlsxScraper.fetch", + "signature": "", + "docstring": "Fetch an xlsx document from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw xlsx bytes, source\n identifier, XLSX content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + }, + "client": { + "name": "client", + "kind": "module", + "path": "omniread.xlsx.client", + "signature": null, + "docstring": "# Summary\n\nXLSX client abstractions for OmniRead.\n\nThis module defines the **client layer** responsible for retrieving raw\nOffice Open XML spreadsheet bytes from a concrete backing store.\n\nClients provide low-level access to xlsx binaries and are intentionally\ndecoupled from scraping and parsing logic. They do not perform validation,\ninterpretation, or content extraction.\n\nTypical backing stores include:\n\n- Local filesystems\n- Object storage (S3, GCS, etc.)\n- Network file systems", + "members": { + "ABC": { + "name": "ABC", + "kind": "alias", + "path": "omniread.xlsx.client.ABC", + "signature": "", + "docstring": null + }, + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.xlsx.client.abstractmethod", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "omniread.xlsx.client.Path", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.xlsx.client.Any", + "signature": "", + "docstring": null + }, + "BaseXlsxClient": { + "name": "BaseXlsxClient", + "kind": "class", + "path": "omniread.xlsx.client.BaseXlsxClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving spreadsheet bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full xlsx binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.client.BaseXlsxClient.fetch", + "signature": "", + "docstring": "Fetch raw xlsx bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemXlsxClient": { + "name": "FileSystemXlsxClient", + "kind": "class", + "path": "omniread.xlsx.client.FileSystemXlsxClient", + "signature": "", + "docstring": "XLSX client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads spreadsheet files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.client.FileSystemXlsxClient.fetch", + "signature": "", + "docstring": "Read an xlsx file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the spreadsheet file.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + } + } + }, + "parser": { + "name": "parser", + "kind": "module", + "path": "omniread.xlsx.parser", + "signature": null, + "docstring": "# Summary\n\nXLSX parser implementations for OmniRead.\n\nThis module provides a concrete, generic parser for Office Open XML\nspreadsheets. It exposes workbook sheets as lists of string rows so\ndownstream consumers can interpret tabular content without depending on\nopenpyxl directly.\n\nThe parser is intentionally statement-agnostic: it performs no header\ndetection or column interpretation beyond basic cell normalization.", + "members": { + "datetime": { + "name": "datetime", + "kind": "alias", + "path": "omniread.xlsx.parser.datetime", + "signature": "", + "docstring": null + }, + "BytesIO": { + "name": "BytesIO", + "kind": "alias", + "path": "omniread.xlsx.parser.BytesIO", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.xlsx.parser.Any", + "signature": "", + "docstring": null + }, + "openpyxl": { + "name": "openpyxl", + "kind": "alias", + "path": "omniread.xlsx.parser.openpyxl", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.xlsx.parser.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "XlsxParserBase": { + "name": "XlsxParserBase", + "kind": "class", + "path": "omniread.xlsx.parser.XlsxParserBase", + "signature": "", + "docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.parser.XlsxParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (XLSX only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser.XlsxParserBase.parse", + "signature": "", + "docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "XlsxParser": { + "name": "XlsxParser", + "kind": "class", + "path": "omniread.xlsx.parser.XlsxParser", + "signature": "", + "docstring": "Generic xlsx parser producing string rows from a worksheet.\n\nNotes:\n **Responsibilities:**\n\n - Lazily load the workbook owned by the parser's content.\n - Normalize cells (including dates and numeric values) into\n deterministic string representations.\n - Expose sheet discovery and row extraction helpers.\n\n **Constraints:**\n\n - Cells are rendered with ``str(value)`` after trimming; date and\n datetime values are rendered in ISO format. Consumers requiring\n locale-specific formatting must convert on their side.", + "members": { + "workbook": { + "name": "workbook", + "kind": "attribute", + "path": "omniread.xlsx.parser.XlsxParser.workbook", + "signature": null, + "docstring": "The lazily loaded workbook backing this parser's content." + }, + "sheet_names": { + "name": "sheet_names", + "kind": "attribute", + "path": "omniread.xlsx.parser.XlsxParser.sheet_names", + "signature": null, + "docstring": "Names of all worksheets contained in the workbook." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser.XlsxParser.parse", + "signature": "", + "docstring": "Parse the first worksheet into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the default (first) worksheet." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.xlsx.parser.XlsxParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from a worksheet.\n\nArgs:\n sheet (Optional[Union[int, str]]):\n Worksheet index or title; defaults to the first worksheet.\n skip_empty (bool):\n When True (default), rows whose cells are all blank are omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row.\n\nRaises:\n ValueError:\n If the requested sheet does not exist." + } + } + } + } + }, + "parser_base": { + "name": "parser_base", + "kind": "module", + "path": "omniread.xlsx.parser_base", + "signature": null, + "docstring": "# Summary\n\nXLSX parser base implementation for OmniRead.\n\nThis module defines the **XLSX-specific parser contract**, extending the\nformat-agnostic `BaseParser` with constraints appropriate for Office Open\nXML spreadsheet content.", + "members": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.xlsx.parser_base.abstractmethod", + "signature": "", + "docstring": null + }, + "Generic": { + "name": "Generic", + "kind": "alias", + "path": "omniread.xlsx.parser_base.Generic", + "signature": "", + "docstring": null + }, + "TypeVar": { + "name": "TypeVar", + "kind": "alias", + "path": "omniread.xlsx.parser_base.TypeVar", + "signature": "", + "docstring": null + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.xlsx.parser_base.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseParser": { + "name": "BaseParser", + "kind": "class", + "path": "omniread.xlsx.parser_base.BaseParser", + "signature": "", + "docstring": "Base interface for all parsers.\n\nNotes:\n **Guarantees:**\n\n - A parser is a self-contained object that owns the `Content` it is\n responsible for interpreting.\n - Consumers may rely on early validation of content compatibility\n and type-stable return values from `parse()`.\n\n **Responsibilities:**\n\n - Implementations must declare supported content types via `supported_types`.\n - Implementations must raise parsing-specific exceptions from `parse()`.\n - Implementations must remain deterministic for a given input.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.BaseParser.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser. An empty set indicates that the parser is content-type agnostic." + }, + "content": { + "name": "content", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.BaseParser.content", + "signature": "", + "docstring": null + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser_base.BaseParser.parse", + "signature": "", + "docstring": "Parse the owned content into structured output.\n\nReturns:\n T:\n Parsed, structured representation.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation.\n\nNotes:\n **Responsibilities:**\n\n - Implementations must fully consume the provided content and\n return a deterministic, structured output." + }, + "supports": { + "name": "supports", + "kind": "function", + "path": "omniread.xlsx.parser_base.BaseParser.supports", + "signature": "", + "docstring": "Check whether this parser supports the content's type.\n\nReturns:\n bool:\n True if the content type is supported; False otherwise." + } + } + }, + "T": { + "name": "T", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.T", + "signature": null, + "docstring": null + }, + "XlsxParserBase": { + "name": "XlsxParserBase", + "kind": "class", + "path": "omniread.xlsx.parser_base.XlsxParserBase", + "signature": "", + "docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.XlsxParserBase.supported_types", + "signature": null, + "docstring": "Set of content types supported by this parser (XLSX only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser_base.XlsxParserBase.parse", + "signature": "", + "docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + } + } + }, + "scraper": { + "name": "scraper", + "kind": "module", + "path": "omniread.xlsx.scraper", + "signature": null, + "docstring": "# Summary\n\nXLSX scraper for OmniRead.\n\nThis module defines the scraper responsible for acquiring raw Office Open\nXML spreadsheet content from a backing store via a configured client.\n\nThe scraper does not interpret or parse the acquired bytes; it wraps them in\nthe canonical `Content` model.", + "members": { + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.xlsx.scraper.Mapping", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.xlsx.scraper.Any", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.xlsx.scraper.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.xlsx.scraper.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseXlsxClient": { + "name": "BaseXlsxClient", + "kind": "class", + "path": "omniread.xlsx.scraper.BaseXlsxClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving spreadsheet bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full xlsx binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.scraper.BaseXlsxClient.fetch", + "signature": "", + "docstring": "Fetch raw xlsx bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "XlsxScraper": { + "name": "XlsxScraper", + "kind": "class", + "path": "omniread.xlsx.scraper.XlsxScraper", + "signature": "", + "docstring": "Scraper for xlsx spreadsheet documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw xlsx bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n XLSX content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.scraper.XlsxScraper.fetch", + "signature": "", + "docstring": "Fetch an xlsx document from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw xlsx bytes, source\n identifier, XLSX content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + } + } + } + } } } } diff --git a/mcp_docs/modules/omniread.pdf.client.json b/docs/mcp/modules/omniread.pdf.client.json similarity index 100% rename from mcp_docs/modules/omniread.pdf.client.json rename to docs/mcp/modules/omniread.pdf.client.json index d7e0484..ea9dcfe 100644 --- a/mcp_docs/modules/omniread.pdf.client.json +++ b/docs/mcp/modules/omniread.pdf.client.json @@ -4,13 +4,6 @@ "path": "omniread.pdf.client", "docstring": "# Summary\n\nPDF client abstractions for OmniRead.\n\nThis module defines the **client layer** responsible for retrieving raw PDF\nbytes from a concrete backing store.\n\nClients provide low-level access to PDF binaries and are intentionally\ndecoupled from scraping and parsing logic. They do not perform validation,\ninterpretation, or content extraction.\n\nTypical backing stores include:\n\n- Local filesystems\n- Object storage (S3, GCS, etc.)\n- Network file systems", "objects": { - "Any": { - "name": "Any", - "kind": "alias", - "path": "omniread.pdf.client.Any", - "signature": "", - "docstring": null - }, "ABC": { "name": "ABC", "kind": "alias", @@ -32,6 +25,13 @@ "signature": "", "docstring": null }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.pdf.client.Any", + "signature": "", + "docstring": null + }, "BasePDFClient": { "name": "BasePDFClient", "kind": "class", diff --git a/mcp_docs/modules/omniread.pdf.json b/docs/mcp/modules/omniread.pdf.json similarity index 94% rename from mcp_docs/modules/omniread.pdf.json rename to docs/mcp/modules/omniread.pdf.json index ca41c24..25a5b86 100644 --- a/mcp_docs/modules/omniread.pdf.json +++ b/docs/mcp/modules/omniread.pdf.json @@ -66,13 +66,6 @@ "signature": null, "docstring": "# Summary\n\nPDF client abstractions for OmniRead.\n\nThis module defines the **client layer** responsible for retrieving raw PDF\nbytes from a concrete backing store.\n\nClients provide low-level access to PDF binaries and are intentionally\ndecoupled from scraping and parsing logic. They do not perform validation,\ninterpretation, or content extraction.\n\nTypical backing stores include:\n\n- Local filesystems\n- Object storage (S3, GCS, etc.)\n- Network file systems", "members": { - "Any": { - "name": "Any", - "kind": "alias", - "path": "omniread.pdf.client.Any", - "signature": "", - "docstring": null - }, "ABC": { "name": "ABC", "kind": "alias", @@ -94,6 +87,13 @@ "signature": "", "docstring": null }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.pdf.client.Any", + "signature": "", + "docstring": null + }, "BasePDFClient": { "name": "BasePDFClient", "kind": "class", @@ -135,6 +135,13 @@ "signature": null, "docstring": "# Summary\n\nPDF parser base implementations for OmniRead.\n\nThis module defines the **PDF-specific parser contract**, extending the\nformat-agnostic `BaseParser` with constraints appropriate for PDF content.\n\nPDF parsers are responsible for interpreting binary PDF data and producing\nstructured representations suitable for downstream consumption.", "members": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.pdf.parser.abstractmethod", + "signature": "", + "docstring": null + }, "Generic": { "name": "Generic", "kind": "alias", @@ -149,13 +156,6 @@ "signature": "", "docstring": null }, - "abstractmethod": { - "name": "abstractmethod", - "kind": "alias", - "path": "omniread.pdf.parser.abstractmethod", - "signature": "", - "docstring": null - }, "ContentType": { "name": "ContentType", "kind": "class", @@ -177,6 +177,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.pdf.parser.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.pdf.parser.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -269,6 +283,13 @@ "signature": null, "docstring": "# Summary\n\nPDF scraping implementation for OmniRead.\n\nThis module provides a PDF-specific scraper that coordinates PDF byte\nretrieval via a client and normalizes the result into a `Content` object.\n\nThe scraper implements the core `BaseScraper` contract while delegating\nall storage and access concerns to a `BasePDFClient` implementation.", "members": { + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.pdf.scraper.Mapping", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -276,20 +297,6 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", - "kind": "alias", - "path": "omniread.pdf.scraper.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.pdf.scraper.Optional", - "signature": "", - "docstring": null - }, "Content": { "name": "Content", "kind": "class", @@ -348,6 +355,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.pdf.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.pdf.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -400,14 +421,14 @@ "name": "PDFScraper", "kind": "class", "path": "omniread.pdf.scraper.PDFScraper", - "signature": "", + "signature": "", "docstring": "Scraper for PDF sources.\n\nNotes:\n **Responsibilities:**\n\n - Delegates byte retrieval to a PDF client and normalizes output\n into `Content`.\n - Preserves caller-provided metadata.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", "members": { "fetch": { "name": "fetch", "kind": "function", "path": "omniread.pdf.scraper.PDFScraper.fetch", - "signature": "", + "signature": "", "docstring": "Fetch a PDF document from the given source.\n\nArgs:\n source (Any):\n Identifier of the PDF source as understood by the configured PDF client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw PDF bytes, source identifier, PDF content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the PDF client." } } diff --git a/mcp_docs/modules/omniread.pdf.parser.json b/docs/mcp/modules/omniread.pdf.parser.json similarity index 91% rename from mcp_docs/modules/omniread.pdf.parser.json rename to docs/mcp/modules/omniread.pdf.parser.json index e4fccb5..8fe1584 100644 --- a/mcp_docs/modules/omniread.pdf.parser.json +++ b/docs/mcp/modules/omniread.pdf.parser.json @@ -4,6 +4,13 @@ "path": "omniread.pdf.parser", "docstring": "# Summary\n\nPDF parser base implementations for OmniRead.\n\nThis module defines the **PDF-specific parser contract**, extending the\nformat-agnostic `BaseParser` with constraints appropriate for PDF content.\n\nPDF parsers are responsible for interpreting binary PDF data and producing\nstructured representations suitable for downstream consumption.", "objects": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.pdf.parser.abstractmethod", + "signature": "", + "docstring": null + }, "Generic": { "name": "Generic", "kind": "alias", @@ -18,13 +25,6 @@ "signature": "", "docstring": null }, - "abstractmethod": { - "name": "abstractmethod", - "kind": "alias", - "path": "omniread.pdf.parser.abstractmethod", - "signature": "", - "docstring": null - }, "ContentType": { "name": "ContentType", "kind": "class", @@ -46,6 +46,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.pdf.parser.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.pdf.parser.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", diff --git a/mcp_docs/modules/omniread.pdf.scraper.json b/docs/mcp/modules/omniread.pdf.scraper.json similarity index 92% rename from mcp_docs/modules/omniread.pdf.scraper.json rename to docs/mcp/modules/omniread.pdf.scraper.json index 23de5a1..03b4d6b 100644 --- a/mcp_docs/modules/omniread.pdf.scraper.json +++ b/docs/mcp/modules/omniread.pdf.scraper.json @@ -4,6 +4,13 @@ "path": "omniread.pdf.scraper", "docstring": "# Summary\n\nPDF scraping implementation for OmniRead.\n\nThis module provides a PDF-specific scraper that coordinates PDF byte\nretrieval via a client and normalizes the result into a `Content` object.\n\nThe scraper implements the core `BaseScraper` contract while delegating\nall storage and access concerns to a `BasePDFClient` implementation.", "objects": { + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.pdf.scraper.Mapping", + "signature": "", + "docstring": null + }, "Any": { "name": "Any", "kind": "alias", @@ -11,20 +18,6 @@ "signature": "", "docstring": null }, - "Mapping": { - "name": "Mapping", - "kind": "alias", - "path": "omniread.pdf.scraper.Mapping", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "omniread.pdf.scraper.Optional", - "signature": "", - "docstring": null - }, "Content": { "name": "Content", "kind": "class", @@ -83,6 +76,20 @@ "signature": "", "docstring": "PDF document content." }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.pdf.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.pdf.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, "JSON": { "name": "JSON", "kind": "attribute", @@ -135,14 +142,14 @@ "name": "PDFScraper", "kind": "class", "path": "omniread.pdf.scraper.PDFScraper", - "signature": "", + "signature": "", "docstring": "Scraper for PDF sources.\n\nNotes:\n **Responsibilities:**\n\n - Delegates byte retrieval to a PDF client and normalizes output\n into `Content`.\n - Preserves caller-provided metadata.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", "members": { "fetch": { "name": "fetch", "kind": "function", "path": "omniread.pdf.scraper.PDFScraper.fetch", - "signature": "", + "signature": "", "docstring": "Fetch a PDF document from the given source.\n\nArgs:\n source (Any):\n Identifier of the PDF source as understood by the configured PDF client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw PDF bytes, source identifier, PDF content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the PDF client." } } diff --git a/docs/mcp/modules/omniread.xlsx.client.json b/docs/mcp/modules/omniread.xlsx.client.json new file mode 100644 index 0000000..de78b9a --- /dev/null +++ b/docs/mcp/modules/omniread.xlsx.client.json @@ -0,0 +1,69 @@ +{ + "module": "omniread.xlsx.client", + "content": { + "path": "omniread.xlsx.client", + "docstring": "# Summary\n\nXLSX client abstractions for OmniRead.\n\nThis module defines the **client layer** responsible for retrieving raw\nOffice Open XML spreadsheet bytes from a concrete backing store.\n\nClients provide low-level access to xlsx binaries and are intentionally\ndecoupled from scraping and parsing logic. They do not perform validation,\ninterpretation, or content extraction.\n\nTypical backing stores include:\n\n- Local filesystems\n- Object storage (S3, GCS, etc.)\n- Network file systems", + "objects": { + "ABC": { + "name": "ABC", + "kind": "alias", + "path": "omniread.xlsx.client.ABC", + "signature": "", + "docstring": null + }, + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.xlsx.client.abstractmethod", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "omniread.xlsx.client.Path", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.xlsx.client.Any", + "signature": "", + "docstring": null + }, + "BaseXlsxClient": { + "name": "BaseXlsxClient", + "kind": "class", + "path": "omniread.xlsx.client.BaseXlsxClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving spreadsheet bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full xlsx binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.client.BaseXlsxClient.fetch", + "signature": "", + "docstring": "Fetch raw xlsx bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemXlsxClient": { + "name": "FileSystemXlsxClient", + "kind": "class", + "path": "omniread.xlsx.client.FileSystemXlsxClient", + "signature": "", + "docstring": "XLSX client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads spreadsheet files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.client.FileSystemXlsxClient.fetch", + "signature": "", + "docstring": "Read an xlsx file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the spreadsheet file.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/mcp/modules/omniread.xlsx.json b/docs/mcp/modules/omniread.xlsx.json new file mode 100644 index 0000000..eb6e107 --- /dev/null +++ b/docs/mcp/modules/omniread.xlsx.json @@ -0,0 +1,611 @@ +{ + "module": "omniread.xlsx", + "content": { + "path": "omniread.xlsx", + "docstring": "# Summary\n\nXLSX subpackage for OmniRead.\n\nProvides acquisition and parsing of Office Open XML spreadsheet (xlsx)\ncontent:\n\n- `BaseXlsxClient`: abstract backing-store client for xlsx bytes.\n- `FileSystemXlsxClient`: local filesystem implementation.\n- `XlsxScraper`: wraps fetched bytes into canonical `Content`.\n- `XlsxParserBase`: content-type-enforcing parser contract.\n- `XlsxParser`: generic string-row parser built on openpyxl.", + "objects": { + "BaseXlsxClient": { + "name": "BaseXlsxClient", + "kind": "class", + "path": "omniread.xlsx.BaseXlsxClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving spreadsheet bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full xlsx binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.BaseXlsxClient.fetch", + "signature": "", + "docstring": "Fetch raw xlsx bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemXlsxClient": { + "name": "FileSystemXlsxClient", + "kind": "class", + "path": "omniread.xlsx.FileSystemXlsxClient", + "signature": "", + "docstring": "XLSX client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads spreadsheet files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.FileSystemXlsxClient.fetch", + "signature": "", + "docstring": "Read an xlsx file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the spreadsheet file.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + }, + "XlsxParser": { + "name": "XlsxParser", + "kind": "class", + "path": "omniread.xlsx.XlsxParser", + "signature": "", + "docstring": "Generic xlsx parser producing string rows from a worksheet.\n\nNotes:\n **Responsibilities:**\n\n - Lazily load the workbook owned by the parser's content.\n - Normalize cells (including dates and numeric values) into\n deterministic string representations.\n - Expose sheet discovery and row extraction helpers.\n\n **Constraints:**\n\n - Cells are rendered with ``str(value)`` after trimming; date and\n datetime values are rendered in ISO format. Consumers requiring\n locale-specific formatting must convert on their side.", + "members": { + "workbook": { + "name": "workbook", + "kind": "attribute", + "path": "omniread.xlsx.XlsxParser.workbook", + "signature": "", + "docstring": "The lazily loaded workbook backing this parser's content." + }, + "sheet_names": { + "name": "sheet_names", + "kind": "attribute", + "path": "omniread.xlsx.XlsxParser.sheet_names", + "signature": "", + "docstring": "Names of all worksheets contained in the workbook." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.XlsxParser.parse", + "signature": "", + "docstring": "Parse the first worksheet into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the default (first) worksheet." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.xlsx.XlsxParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from a worksheet.\n\nArgs:\n sheet (Optional[Union[int, str]]):\n Worksheet index or title; defaults to the first worksheet.\n skip_empty (bool):\n When True (default), rows whose cells are all blank are omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row.\n\nRaises:\n ValueError:\n If the requested sheet does not exist." + } + } + }, + "XlsxParserBase": { + "name": "XlsxParserBase", + "kind": "class", + "path": "omniread.xlsx.XlsxParserBase", + "signature": "", + "docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.XlsxParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (XLSX only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.XlsxParserBase.parse", + "signature": "", + "docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "XlsxScraper": { + "name": "XlsxScraper", + "kind": "class", + "path": "omniread.xlsx.XlsxScraper", + "signature": "", + "docstring": "Scraper for xlsx spreadsheet documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw xlsx bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n XLSX content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.XlsxScraper.fetch", + "signature": "", + "docstring": "Fetch an xlsx document from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw xlsx bytes, source\n identifier, XLSX content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + }, + "client": { + "name": "client", + "kind": "module", + "path": "omniread.xlsx.client", + "signature": null, + "docstring": "# Summary\n\nXLSX client abstractions for OmniRead.\n\nThis module defines the **client layer** responsible for retrieving raw\nOffice Open XML spreadsheet bytes from a concrete backing store.\n\nClients provide low-level access to xlsx binaries and are intentionally\ndecoupled from scraping and parsing logic. They do not perform validation,\ninterpretation, or content extraction.\n\nTypical backing stores include:\n\n- Local filesystems\n- Object storage (S3, GCS, etc.)\n- Network file systems", + "members": { + "ABC": { + "name": "ABC", + "kind": "alias", + "path": "omniread.xlsx.client.ABC", + "signature": "", + "docstring": null + }, + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.xlsx.client.abstractmethod", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "omniread.xlsx.client.Path", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.xlsx.client.Any", + "signature": "", + "docstring": null + }, + "BaseXlsxClient": { + "name": "BaseXlsxClient", + "kind": "class", + "path": "omniread.xlsx.client.BaseXlsxClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving spreadsheet bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full xlsx binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.client.BaseXlsxClient.fetch", + "signature": "", + "docstring": "Fetch raw xlsx bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "FileSystemXlsxClient": { + "name": "FileSystemXlsxClient", + "kind": "class", + "path": "omniread.xlsx.client.FileSystemXlsxClient", + "signature": "", + "docstring": "XLSX client that reads from the local filesystem.\n\nNotes:\n **Guarantees:**\n\n - This client reads spreadsheet files directly from the disk and\n returns their raw binary contents.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.client.FileSystemXlsxClient.fetch", + "signature": "", + "docstring": "Read an xlsx file from the local filesystem.\n\nArgs:\n path (Path):\n Filesystem path to the spreadsheet file.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n FileNotFoundError:\n If the path does not exist.\n ValueError:\n If the path exists but is not a file." + } + } + } + } + }, + "parser": { + "name": "parser", + "kind": "module", + "path": "omniread.xlsx.parser", + "signature": null, + "docstring": "# Summary\n\nXLSX parser implementations for OmniRead.\n\nThis module provides a concrete, generic parser for Office Open XML\nspreadsheets. It exposes workbook sheets as lists of string rows so\ndownstream consumers can interpret tabular content without depending on\nopenpyxl directly.\n\nThe parser is intentionally statement-agnostic: it performs no header\ndetection or column interpretation beyond basic cell normalization.", + "members": { + "datetime": { + "name": "datetime", + "kind": "alias", + "path": "omniread.xlsx.parser.datetime", + "signature": "", + "docstring": null + }, + "BytesIO": { + "name": "BytesIO", + "kind": "alias", + "path": "omniread.xlsx.parser.BytesIO", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.xlsx.parser.Any", + "signature": "", + "docstring": null + }, + "openpyxl": { + "name": "openpyxl", + "kind": "alias", + "path": "omniread.xlsx.parser.openpyxl", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.xlsx.parser.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "XlsxParserBase": { + "name": "XlsxParserBase", + "kind": "class", + "path": "omniread.xlsx.parser.XlsxParserBase", + "signature": "", + "docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.parser.XlsxParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (XLSX only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser.XlsxParserBase.parse", + "signature": "", + "docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "XlsxParser": { + "name": "XlsxParser", + "kind": "class", + "path": "omniread.xlsx.parser.XlsxParser", + "signature": "", + "docstring": "Generic xlsx parser producing string rows from a worksheet.\n\nNotes:\n **Responsibilities:**\n\n - Lazily load the workbook owned by the parser's content.\n - Normalize cells (including dates and numeric values) into\n deterministic string representations.\n - Expose sheet discovery and row extraction helpers.\n\n **Constraints:**\n\n - Cells are rendered with ``str(value)`` after trimming; date and\n datetime values are rendered in ISO format. Consumers requiring\n locale-specific formatting must convert on their side.", + "members": { + "workbook": { + "name": "workbook", + "kind": "attribute", + "path": "omniread.xlsx.parser.XlsxParser.workbook", + "signature": null, + "docstring": "The lazily loaded workbook backing this parser's content." + }, + "sheet_names": { + "name": "sheet_names", + "kind": "attribute", + "path": "omniread.xlsx.parser.XlsxParser.sheet_names", + "signature": null, + "docstring": "Names of all worksheets contained in the workbook." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser.XlsxParser.parse", + "signature": "", + "docstring": "Parse the first worksheet into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the default (first) worksheet." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.xlsx.parser.XlsxParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from a worksheet.\n\nArgs:\n sheet (Optional[Union[int, str]]):\n Worksheet index or title; defaults to the first worksheet.\n skip_empty (bool):\n When True (default), rows whose cells are all blank are omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row.\n\nRaises:\n ValueError:\n If the requested sheet does not exist." + } + } + } + } + }, + "parser_base": { + "name": "parser_base", + "kind": "module", + "path": "omniread.xlsx.parser_base", + "signature": null, + "docstring": "# Summary\n\nXLSX parser base implementation for OmniRead.\n\nThis module defines the **XLSX-specific parser contract**, extending the\nformat-agnostic `BaseParser` with constraints appropriate for Office Open\nXML spreadsheet content.", + "members": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.xlsx.parser_base.abstractmethod", + "signature": "", + "docstring": null + }, + "Generic": { + "name": "Generic", + "kind": "alias", + "path": "omniread.xlsx.parser_base.Generic", + "signature": "", + "docstring": null + }, + "TypeVar": { + "name": "TypeVar", + "kind": "alias", + "path": "omniread.xlsx.parser_base.TypeVar", + "signature": "", + "docstring": null + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.xlsx.parser_base.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseParser": { + "name": "BaseParser", + "kind": "class", + "path": "omniread.xlsx.parser_base.BaseParser", + "signature": "", + "docstring": "Base interface for all parsers.\n\nNotes:\n **Guarantees:**\n\n - A parser is a self-contained object that owns the `Content` it is\n responsible for interpreting.\n - Consumers may rely on early validation of content compatibility\n and type-stable return values from `parse()`.\n\n **Responsibilities:**\n\n - Implementations must declare supported content types via `supported_types`.\n - Implementations must raise parsing-specific exceptions from `parse()`.\n - Implementations must remain deterministic for a given input.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.BaseParser.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser. An empty set indicates that the parser is content-type agnostic." + }, + "content": { + "name": "content", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.BaseParser.content", + "signature": "", + "docstring": null + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser_base.BaseParser.parse", + "signature": "", + "docstring": "Parse the owned content into structured output.\n\nReturns:\n T:\n Parsed, structured representation.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation.\n\nNotes:\n **Responsibilities:**\n\n - Implementations must fully consume the provided content and\n return a deterministic, structured output." + }, + "supports": { + "name": "supports", + "kind": "function", + "path": "omniread.xlsx.parser_base.BaseParser.supports", + "signature": "", + "docstring": "Check whether this parser supports the content's type.\n\nReturns:\n bool:\n True if the content type is supported; False otherwise." + } + } + }, + "T": { + "name": "T", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.T", + "signature": null, + "docstring": null + }, + "XlsxParserBase": { + "name": "XlsxParserBase", + "kind": "class", + "path": "omniread.xlsx.parser_base.XlsxParserBase", + "signature": "", + "docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.XlsxParserBase.supported_types", + "signature": null, + "docstring": "Set of content types supported by this parser (XLSX only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser_base.XlsxParserBase.parse", + "signature": "", + "docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + } + } + }, + "scraper": { + "name": "scraper", + "kind": "module", + "path": "omniread.xlsx.scraper", + "signature": null, + "docstring": "# Summary\n\nXLSX scraper for OmniRead.\n\nThis module defines the scraper responsible for acquiring raw Office Open\nXML spreadsheet content from a backing store via a configured client.\n\nThe scraper does not interpret or parse the acquired bytes; it wraps them in\nthe canonical `Content` model.", + "members": { + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.xlsx.scraper.Mapping", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.xlsx.scraper.Any", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.xlsx.scraper.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.xlsx.scraper.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseXlsxClient": { + "name": "BaseXlsxClient", + "kind": "class", + "path": "omniread.xlsx.scraper.BaseXlsxClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving spreadsheet bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full xlsx binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.scraper.BaseXlsxClient.fetch", + "signature": "", + "docstring": "Fetch raw xlsx bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "XlsxScraper": { + "name": "XlsxScraper", + "kind": "class", + "path": "omniread.xlsx.scraper.XlsxScraper", + "signature": "", + "docstring": "Scraper for xlsx spreadsheet documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw xlsx bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n XLSX content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.scraper.XlsxScraper.fetch", + "signature": "", + "docstring": "Fetch an xlsx document from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw xlsx bytes, source\n identifier, XLSX content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/mcp/modules/omniread.xlsx.parser.json b/docs/mcp/modules/omniread.xlsx.parser.json new file mode 100644 index 0000000..906ffd3 --- /dev/null +++ b/docs/mcp/modules/omniread.xlsx.parser.json @@ -0,0 +1,134 @@ +{ + "module": "omniread.xlsx.parser", + "content": { + "path": "omniread.xlsx.parser", + "docstring": "# Summary\n\nXLSX parser implementations for OmniRead.\n\nThis module provides a concrete, generic parser for Office Open XML\nspreadsheets. It exposes workbook sheets as lists of string rows so\ndownstream consumers can interpret tabular content without depending on\nopenpyxl directly.\n\nThe parser is intentionally statement-agnostic: it performs no header\ndetection or column interpretation beyond basic cell normalization.", + "objects": { + "datetime": { + "name": "datetime", + "kind": "alias", + "path": "omniread.xlsx.parser.datetime", + "signature": "", + "docstring": null + }, + "BytesIO": { + "name": "BytesIO", + "kind": "alias", + "path": "omniread.xlsx.parser.BytesIO", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.xlsx.parser.Any", + "signature": "", + "docstring": null + }, + "openpyxl": { + "name": "openpyxl", + "kind": "alias", + "path": "omniread.xlsx.parser.openpyxl", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.xlsx.parser.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.xlsx.parser.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "XlsxParserBase": { + "name": "XlsxParserBase", + "kind": "class", + "path": "omniread.xlsx.parser.XlsxParserBase", + "signature": "", + "docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.parser.XlsxParserBase.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser (XLSX only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser.XlsxParserBase.parse", + "signature": "", + "docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + }, + "XlsxParser": { + "name": "XlsxParser", + "kind": "class", + "path": "omniread.xlsx.parser.XlsxParser", + "signature": "", + "docstring": "Generic xlsx parser producing string rows from a worksheet.\n\nNotes:\n **Responsibilities:**\n\n - Lazily load the workbook owned by the parser's content.\n - Normalize cells (including dates and numeric values) into\n deterministic string representations.\n - Expose sheet discovery and row extraction helpers.\n\n **Constraints:**\n\n - Cells are rendered with ``str(value)`` after trimming; date and\n datetime values are rendered in ISO format. Consumers requiring\n locale-specific formatting must convert on their side.", + "members": { + "workbook": { + "name": "workbook", + "kind": "attribute", + "path": "omniread.xlsx.parser.XlsxParser.workbook", + "signature": null, + "docstring": "The lazily loaded workbook backing this parser's content." + }, + "sheet_names": { + "name": "sheet_names", + "kind": "attribute", + "path": "omniread.xlsx.parser.XlsxParser.sheet_names", + "signature": null, + "docstring": "Names of all worksheets contained in the workbook." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser.XlsxParser.parse", + "signature": "", + "docstring": "Parse the first worksheet into normalized string rows.\n\nReturns:\n List[List[str]]:\n Rows of the default (first) worksheet." + }, + "rows": { + "name": "rows", + "kind": "function", + "path": "omniread.xlsx.parser.XlsxParser.rows", + "signature": "", + "docstring": "Extract normalized string rows from a worksheet.\n\nArgs:\n sheet (Optional[Union[int, str]]):\n Worksheet index or title; defaults to the first worksheet.\n skip_empty (bool):\n When True (default), rows whose cells are all blank are omitted.\n\nReturns:\n List[List[str]]:\n Normalized rows; trailing blank cells are trimmed per row.\n\nRaises:\n ValueError:\n If the requested sheet does not exist." + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/mcp/modules/omniread.xlsx.parser_base.json b/docs/mcp/modules/omniread.xlsx.parser_base.json new file mode 100644 index 0000000..598340d --- /dev/null +++ b/docs/mcp/modules/omniread.xlsx.parser_base.json @@ -0,0 +1,148 @@ +{ + "module": "omniread.xlsx.parser_base", + "content": { + "path": "omniread.xlsx.parser_base", + "docstring": "# Summary\n\nXLSX parser base implementation for OmniRead.\n\nThis module defines the **XLSX-specific parser contract**, extending the\nformat-agnostic `BaseParser` with constraints appropriate for Office Open\nXML spreadsheet content.", + "objects": { + "abstractmethod": { + "name": "abstractmethod", + "kind": "alias", + "path": "omniread.xlsx.parser_base.abstractmethod", + "signature": "", + "docstring": null + }, + "Generic": { + "name": "Generic", + "kind": "alias", + "path": "omniread.xlsx.parser_base.Generic", + "signature": "", + "docstring": null + }, + "TypeVar": { + "name": "TypeVar", + "kind": "alias", + "path": "omniread.xlsx.parser_base.TypeVar", + "signature": "", + "docstring": null + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.xlsx.parser_base.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseParser": { + "name": "BaseParser", + "kind": "class", + "path": "omniread.xlsx.parser_base.BaseParser", + "signature": "", + "docstring": "Base interface for all parsers.\n\nNotes:\n **Guarantees:**\n\n - A parser is a self-contained object that owns the `Content` it is\n responsible for interpreting.\n - Consumers may rely on early validation of content compatibility\n and type-stable return values from `parse()`.\n\n **Responsibilities:**\n\n - Implementations must declare supported content types via `supported_types`.\n - Implementations must raise parsing-specific exceptions from `parse()`.\n - Implementations must remain deterministic for a given input.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.BaseParser.supported_types", + "signature": "", + "docstring": "Set of content types supported by this parser. An empty set indicates that the parser is content-type agnostic." + }, + "content": { + "name": "content", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.BaseParser.content", + "signature": "", + "docstring": null + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser_base.BaseParser.parse", + "signature": "", + "docstring": "Parse the owned content into structured output.\n\nReturns:\n T:\n Parsed, structured representation.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation.\n\nNotes:\n **Responsibilities:**\n\n - Implementations must fully consume the provided content and\n return a deterministic, structured output." + }, + "supports": { + "name": "supports", + "kind": "function", + "path": "omniread.xlsx.parser_base.BaseParser.supports", + "signature": "", + "docstring": "Check whether this parser supports the content's type.\n\nReturns:\n bool:\n True if the content type is supported; False otherwise." + } + } + }, + "T": { + "name": "T", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.T", + "signature": null, + "docstring": null + }, + "XlsxParserBase": { + "name": "XlsxParserBase", + "kind": "class", + "path": "omniread.xlsx.parser_base.XlsxParserBase", + "signature": "", + "docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.", + "members": { + "supported_types": { + "name": "supported_types", + "kind": "attribute", + "path": "omniread.xlsx.parser_base.XlsxParserBase.supported_types", + "signature": null, + "docstring": "Set of content types supported by this parser (XLSX only)." + }, + "parse": { + "name": "parse", + "kind": "function", + "path": "omniread.xlsx.parser_base.XlsxParserBase.parse", + "signature": "", + "docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation." + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/mcp/modules/omniread.xlsx.scraper.json b/docs/mcp/modules/omniread.xlsx.scraper.json new file mode 100644 index 0000000..9e2f6a9 --- /dev/null +++ b/docs/mcp/modules/omniread.xlsx.scraper.json @@ -0,0 +1,143 @@ +{ + "module": "omniread.xlsx.scraper", + "content": { + "path": "omniread.xlsx.scraper", + "docstring": "# Summary\n\nXLSX scraper for OmniRead.\n\nThis module defines the scraper responsible for acquiring raw Office Open\nXML spreadsheet content from a backing store via a configured client.\n\nThe scraper does not interpret or parse the acquired bytes; it wraps them in\nthe canonical `Content` model.", + "objects": { + "Mapping": { + "name": "Mapping", + "kind": "alias", + "path": "omniread.xlsx.scraper.Mapping", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "omniread.xlsx.scraper.Any", + "signature": "", + "docstring": null + }, + "Content": { + "name": "Content", + "kind": "class", + "path": "omniread.xlsx.scraper.Content", + "signature": "", + "docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.", + "members": { + "raw": { + "name": "raw", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.raw", + "signature": "", + "docstring": "Raw content bytes as retrieved from the source." + }, + "source": { + "name": "source", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.source", + "signature": "", + "docstring": "Identifier of the content origin (URL, file path, or logical name)." + }, + "content_type": { + "name": "content_type", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.content_type", + "signature": "", + "docstring": "Optional MIME type of the content, if known." + }, + "metadata": { + "name": "metadata", + "kind": "attribute", + "path": "omniread.xlsx.scraper.Content.metadata", + "signature": "", + "docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)." + } + } + }, + "ContentType": { + "name": "ContentType", + "kind": "class", + "path": "omniread.xlsx.scraper.ContentType", + "signature": "", + "docstring": "Supported MIME types for extracted content.\n\nNotes:\n **Guarantees:**\n\n - This enum represents the declared or inferred media type of the\n content source.\n - It is primarily used for routing content to the appropriate\n parser or downstream consumer.", + "members": { + "HTML": { + "name": "HTML", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.HTML", + "signature": "", + "docstring": "HTML document content." + }, + "PDF": { + "name": "PDF", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.PDF", + "signature": "", + "docstring": "PDF document content." + }, + "XLSX": { + "name": "XLSX", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.XLSX", + "signature": "", + "docstring": "Office Open XML spreadsheet (xlsx/xlsm) content." + }, + "CSV": { + "name": "CSV", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.CSV", + "signature": "", + "docstring": "Comma-separated-value document content." + }, + "JSON": { + "name": "JSON", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.JSON", + "signature": "", + "docstring": "JSON document content." + }, + "XML": { + "name": "XML", + "kind": "attribute", + "path": "omniread.xlsx.scraper.ContentType.XML", + "signature": "", + "docstring": "XML document content." + } + } + }, + "BaseXlsxClient": { + "name": "BaseXlsxClient", + "kind": "class", + "path": "omniread.xlsx.scraper.BaseXlsxClient", + "signature": "", + "docstring": "Abstract client responsible for retrieving spreadsheet bytes.\n\nRetrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).\n\nNotes:\n **Responsibilities:**\n\n - Implementations must accept a source identifier appropriate to\n the backing store.\n - Return the full xlsx binary payload.\n - Raise retrieval-specific errors on failure.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.scraper.BaseXlsxClient.fetch", + "signature": "", + "docstring": "Fetch raw xlsx bytes from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet location, such as a file path,\n object storage key, or remote reference.\n\nReturns:\n bytes:\n Raw xlsx bytes.\n\nRaises:\n Exception:\n Retrieval-specific errors defined by the implementation." + } + } + }, + "XlsxScraper": { + "name": "XlsxScraper", + "kind": "class", + "path": "omniread.xlsx.scraper.XlsxScraper", + "signature": "", + "docstring": "Scraper for xlsx spreadsheet documents.\n\nNotes:\n **Responsibilities:**\n\n - Fetch raw xlsx bytes via the configured client.\n - Wrap the payload in a canonical `Content` instance with the\n XLSX content type and source identifier.\n\n **Constraints:**\n\n - The scraper does not perform parsing or interpretation.\n - Does not assume a specific storage backend.", + "members": { + "fetch": { + "name": "fetch", + "kind": "function", + "path": "omniread.xlsx.scraper.XlsxScraper.fetch", + "signature": "", + "docstring": "Fetch an xlsx document from the given source.\n\nArgs:\n source (Any):\n Identifier of the spreadsheet source as understood by the\n configured client.\n metadata (Optional[Mapping[str, Any]], optional):\n Optional metadata to attach to the returned content.\n\nReturns:\n Content:\n A `Content` instance containing raw xlsx bytes, source\n identifier, XLSX content type, and optional metadata.\n\nRaises:\n Exception:\n Retrieval-specific errors raised by the client." + } + } + } + } + } +} \ No newline at end of file diff --git a/mcp_docs/nav.json b/docs/mcp/nav.json similarity index 53% rename from mcp_docs/nav.json rename to docs/mcp/nav.json index 61b75cc..03767b4 100644 --- a/mcp_docs/nav.json +++ b/docs/mcp/nav.json @@ -19,6 +19,26 @@ "module": "omniread.core.scraper", "resource": "doc://modules/omniread.core.scraper" }, + { + "module": "omniread.csv", + "resource": "doc://modules/omniread.csv" + }, + { + "module": "omniread.csv.client", + "resource": "doc://modules/omniread.csv.client" + }, + { + "module": "omniread.csv.parser", + "resource": "doc://modules/omniread.csv.parser" + }, + { + "module": "omniread.csv.parser_base", + "resource": "doc://modules/omniread.csv.parser_base" + }, + { + "module": "omniread.csv.scraper", + "resource": "doc://modules/omniread.csv.scraper" + }, { "module": "omniread.html", "resource": "doc://modules/omniread.html" @@ -46,5 +66,25 @@ { "module": "omniread.pdf.scraper", "resource": "doc://modules/omniread.pdf.scraper" + }, + { + "module": "omniread.xlsx", + "resource": "doc://modules/omniread.xlsx" + }, + { + "module": "omniread.xlsx.client", + "resource": "doc://modules/omniread.xlsx.client" + }, + { + "module": "omniread.xlsx.parser", + "resource": "doc://modules/omniread.xlsx.parser" + }, + { + "module": "omniread.xlsx.parser_base", + "resource": "doc://modules/omniread.xlsx.parser_base" + }, + { + "module": "omniread.xlsx.scraper", + "resource": "doc://modules/omniread.xlsx.scraper" } ] \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 4ab42e7..5a79b21 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -63,6 +63,7 @@ markdown_extensions: - pymdownx.tilde - pymdownx.mark site_name: omniread +docs_dir: docs/lib nav: - Home: index.md - Core API: