{"id":19252067,"url":"https://github.com/toeverything/affine-reader","last_synced_at":"2025-04-21T13:30:41.618Z","repository":{"id":68103302,"uuid":"603767432","full_name":"toeverything/affine-reader","owner":"toeverything","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-14T02:34:21.000Z","size":576,"stargazers_count":18,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T03:34:14.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://affine-reader-playground.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toeverything.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-02-19T14:19:16.000Z","updated_at":"2025-04-14T02:34:24.000Z","dependencies_parsed_at":"2024-03-06T19:03:05.356Z","dependency_job_id":"fa593456-e04a-40cf-a846-786148a7ddf6","html_url":"https://github.com/toeverything/affine-reader","commit_stats":null,"previous_names":["toeverything/affine-reader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toeverything%2Faffine-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toeverything%2Faffine-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toeverything%2Faffine-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toeverything%2Faffine-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toeverything","download_url":"https://codeload.github.com/toeverything/affine-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250064513,"owners_count":21368918,"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-09T18:25:15.377Z","updated_at":"2025-04-21T13:30:41.042Z","avatar_url":"https://github.com/toeverything.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# affine-reader\n\nThis is a simple reader for the blocksuite YJS doc format.\nThe main goal right now is to convert a random YJS doc into a markdown file.\n\n## Install\n\n`pnpm install affine-reader`\n\n## Usage\n\nThe following will create a reader for a workspace and then get all the pages in that workspace.\nPage markdown is available in `.md` property.\n\n```js\nconst { getBlocksuiteReader } = require(\"affine-reader\");\n\nconst reader = await getBlocksuiteReader({ workspaceId: \"workspace-id\" });\nconst pages = await reader.getWorkspacePages(true);\n```\n\nFor a real world use case, see the [demo here](https://affine-reader.vercel.app//) and the code in [playground](./playground) directory, which integrates `affine-reader` with Next.js.\n\n## Export a affine to markdown locally\n\n```\nUsage: affine-exporter -w [workspace_id] -t [token]\n\nOptions:\n      --help          Show help                                        [boolean]\n      --version       Show version number                              [boolean]\n  -t, --token         refresh token                                     [string]\n  -w, --workspace_id  workspace id                                      [string]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoeverything%2Faffine-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoeverything%2Faffine-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoeverything%2Faffine-reader/lists"}