{"id":21253976,"url":"https://github.com/binpar/read.garden-viewer","last_synced_at":"2025-03-15T05:43:54.155Z","repository":{"id":49202115,"uuid":"362725063","full_name":"BinPar/read.garden-viewer","owner":"BinPar","description":"Universal EBook Reader for EPUB2, EPUB3 (fixed and flow layout), HTML5 and PDF contents","archived":false,"fork":false,"pushed_at":"2025-01-09T16:44:25.000Z","size":1976,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-01-21T21:15:49.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BinPar.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":"2021-04-29T07:16:44.000Z","updated_at":"2024-08-08T01:05:28.000Z","dependencies_parsed_at":"2024-05-09T09:26:15.186Z","dependency_job_id":"c0b8c609-a915-43e1-bb47-b472a7e01c26","html_url":"https://github.com/BinPar/read.garden-viewer","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinPar%2Fread.garden-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinPar%2Fread.garden-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinPar%2Fread.garden-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinPar%2Fread.garden-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinPar","download_url":"https://codeload.github.com/BinPar/read.garden-viewer/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243690150,"owners_count":20331729,"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":[],"created_at":"2024-11-21T03:53:42.528Z","updated_at":"2025-03-15T05:43:54.136Z","avatar_url":"https://github.com/BinPar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Read.Garden Viewer\n\nUniversal EBook Reader for EPUB2, EPUB3, HTML5 and PDF contents.\n\nThis viewer will be part of the Read.Garden ecosystem, but also can be used by any other software.\n\n## One Viewer To Rule Them All\n\nThis DOM based viewer will be designed to be:\n\n- **Application Agnostic**: will work for our online viewer, mobile APP, desktop viewer, etc...\n- **Browser Agnostic**: working for all mayor modern browsers (sorry IE11)\n- **Content Agnostic**: sharing as much logic as possible between the distinct content formats\n- **API Agnostic**: providing a universal event based interface (that will get `actions` and emit `events`) to be used by any viewer.\n- **Body Scroll Based**: the library will automatically append it's own DOM nodes in te body and use the page's body scroll navigate through the content.\n\n## How to integrate this viewer into any project\n\nThe viewer consists of three different files:\n\n- `read.garden-viewer.css`: the styles to be imported in the page\n- `read.garden-viewer.js`: the minified JavaScript viewer bundle\n- `read.garden-viewer.d.ts`: the type definitions in case you need to use in in a TypeScript project\n\n## How to start the project\n\n1. Clone the repository\n2. Execute `npm i`\n3. Ask an admin user for the `.env` file to work locally\n4. Execute `npm run generate-contents` to generate the local static contents\n5. Execute `npm run dev` (to run the server in development mode)\n6. Execute `npm run test` to check that everything works\n7. Navigate to `http://localhost:3000` or the dynamic ngrok provided URL\n\n## Testing with Puppeteer\n\nAs the project requires end to end testing we do use Puppeteer to ejecute our testings.\n\nYou can check the [jest-puppeteer documentation](https://github.com/smooth-code/jest-puppeteer/tree/master#readme).\n\n## Main Viewer Features\n\nWe divide the features in three different groups:\n\n- General features\n- Flow content features\n- Fixed content features\n\n### General Features\n\n- Style Reset\n- Pagination\n- Scroll management\n- Page change notification events\n- Jump to page\n- Universal user content selection\n- Content highlighting\n- Search results highlighting\n- Dark / Light theme selection\n- Dynamic content load / purge\n- Safe area zoom (to allow any interface to be expanded)\n- Page separators\n- Resize management\n\n### Flow Content Features\n\n- Mouse and Touch based vertical or horizontal scrolling\n- Default font selection\n- Font size\n- Line height\n- Text body align\n\n### Fixed Content Features\n\n- Mouse and Touch based Zooming and Panning (avoiding iScroll)\n- Fit to width and height\n\n### CI/CD\n\n- It is required to generate a new GitFlow release to automate a deployment to beta instances\n- It will automatically:\n  - Lint\n  - Audit\n  - Build\n  - Download and extract contentes\n  - Run tests\n  - Generate static website\n  - Generate a docker image with a minimalistic web server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinpar%2Fread.garden-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinpar%2Fread.garden-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinpar%2Fread.garden-viewer/lists"}