{"id":13872200,"url":"https://github.com/witekbobrowski/EPUBKit","last_synced_at":"2025-07-16T01:33:16.954Z","repository":{"id":45732800,"uuid":"94194849","full_name":"witekbobrowski/EPUBKit","owner":"witekbobrowski","description":"📚 Simple EPUB Parser in Swift","archived":false,"fork":false,"pushed_at":"2023-12-17T04:37:21.000Z","size":3540,"stargazers_count":161,"open_issues_count":3,"forks_count":27,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-14T12:10:32.357Z","etag":null,"topics":["cocoapods","epub","hacktoberfest","ios","library","macos","parser","spm","swift","swift-library","swift-package-manager","tvos"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/witekbobrowski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-13T09:23:09.000Z","updated_at":"2024-06-21T04:19:11.159Z","dependencies_parsed_at":"2024-06-21T04:19:09.118Z","dependency_job_id":"bb1a4fd8-9460-45fc-8289-8a30d3001450","html_url":"https://github.com/witekbobrowski/EPUBKit","commit_stats":{"total_commits":100,"total_committers":3,"mean_commits":"33.333333333333336","dds":0.06999999999999995,"last_synced_commit":"0f7c196c87f79daa66baf3b807150c045543686e"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/witekbobrowski%2FEPUBKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/witekbobrowski%2FEPUBKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/witekbobrowski%2FEPUBKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/witekbobrowski%2FEPUBKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/witekbobrowski","download_url":"https://codeload.github.com/witekbobrowski/EPUBKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225888220,"owners_count":17540144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cocoapods","epub","hacktoberfest","ios","library","macos","parser","spm","swift","swift-library","swift-package-manager","tvos"],"created_at":"2024-08-05T23:00:36.395Z","updated_at":"2025-07-16T01:33:16.940Z","avatar_url":"https://github.com/witekbobrowski.png","language":"Swift","readme":"\u003cpicture align=\"center\"\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/user-attachments/assets/9087903e-a267-4f74-b870-75b6ab72c175\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/user-attachments/assets/82afe8de-1617-4745-ba80-ce7d4b10959c\"\u003e\n  \u003cimg alt=\"Fallback image description\" src=\"https://github.com/user-attachments/assets/82afe8de-1617-4745-ba80-ce7d4b10959c\"\u003e\n\u003c/picture\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://swift.org/package-manager\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg\" alt=\"Swift Package Manager\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://swift.org\"\u003e\n        \u003cimg src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fwitekbobrowski%2FEPUBKit%2Fbadge%3Ftype%3Dswift-versions\" alt=\"Swift Version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://swiftpackageindex.com/witekbobrowski/EPUBKit\"\u003e\n        \u003cimg src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fwitekbobrowski%2FEPUBKit%2Fbadge%3Ftype%3Dplatforms\" alt=\"Platforms\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/witekbobrowski/EPUBKit/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/witekbobrowski/EPUBKit\" alt=\"License\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003eA powerful and modern Swift library for parsing EPUB documents\u003c/strong\u003e\n\u003c/p\u003e\n\nEPUBKit provides a comprehensive solution for parsing and extracting information from EPUB files in Swift. Built with modern Swift practices and designed for reliability, it supports both EPUB 2 and EPUB 3 specifications while maintaining a clean, intuitive API.\n\n## Features\n\n- 📚 **Complete EPUB Support**: Full parsing of EPUB 2 and EPUB 3 documents\n- 🏗️ **Modern Swift**: Built with Swift 6+, leveraging modern language features\n- 📋 **Rich Metadata**: Extract comprehensive Dublin Core metadata\n- 🗂️ **Manifest Parsing**: Access all publication resources with media type detection  \n- 📖 **Reading Order**: Parse spine for linear reading progression\n- 🧭 **Navigation**: Extract table of contents and navigation structure\n- 🧪 **Thoroughly Tested**: Comprehensive test suite built with Swift Testing\n- 🎯 **Thread Safe**: Designed for concurrent parsing operations\n\n## Installation\n\n### Swift Package Manager\n\nAdd EPUBKit to your project via Xcode or by adding it to your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/witekbobrowski/EPUBKit.git\", from: \"1.0.0\")\n]\n```\n\n### CocoaPods\n\n```ruby\npod 'EPUBKit'\n```\n\n## Quick Start\n\n### Basic Usage\n\n```swift\nimport EPUBKit\n\n// Parse an EPUB file\nguard let epubURL = Bundle.main.url(forResource: \"book\", withExtension: \"epub\"),\n      let document = EPUBDocument(url: epubURL) else {\n    print(\"Failed to load EPUB\")\n    return\n}\n\n// Access document metadata\nprint(\"Title: \\(document.title)\")\nprint(\"Author: \\(document.author)\")\nprint(\"Publisher: \\(document.publisher)\")\nprint(\"Language: \\(document.language)\")\n\n// Access document structure\nprint(\"Chapters: \\(document.spine.items.count)\")\nprint(\"Resources: \\(document.manifest.items.count)\")\n```\n\n### Working with Document Components\n\n```swift\n// Access metadata details\nif let creator = document.metadata.creator {\n    print(\"Author: \\(creator.name)\")\n    print(\"Role: \\(creator.role)\")\n    print(\"File as: \\(creator.fileAs)\")\n}\n\n// Iterate through spine items (reading order)\nfor spineItem in document.spine.items {\n    if let manifestItem = document.manifest.items[spineItem.idref] {\n        print(\"Chapter: \\(manifestItem.path)\")\n        print(\"Media Type: \\(manifestItem.mediaType)\")\n    }\n}\n\n// Access table of contents\nfunc printTOC(_ toc: EPUBTableOfContents, level: Int = 0) {\n    let indent = String(repeating: \"  \", count: level)\n    print(\"\\(indent)- \\(toc.label)\")\n    \n    for child in toc.children {\n        printTOC(child, level: level + 1)\n    }\n}\n\nprintTOC(document.tableOfContents)\n```\n\n## EPUB Specification Support\n\nEPUBKit supports the EPUB specification standards:\n\n- ✅ **EPUB 3.3** - Full support for modern EPUB files\n- ✅ **EPUB 2.0** - Backward compatibility with older EPUB files\n- ✅ **Dublin Core Metadata** - Complete metadata extraction\n- ✅ **OCF (Open Container Format)** - Proper ZIP archive handling\n- ✅ **NCX Navigation** - Table of contents parsing\n- ✅ **Media Type Detection** - Automatic resource type identification\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nEPUBKit is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","funding_links":[],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwitekbobrowski%2FEPUBKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwitekbobrowski%2FEPUBKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwitekbobrowski%2FEPUBKit/lists"}