{"id":15229076,"url":"https://github.com/dragonman225/nast","last_synced_at":"2025-04-10T01:11:51.475Z","repository":{"id":57108927,"uuid":"234519976","full_name":"dragonman225/nast","owner":"dragonman225","description":"A block-based intermediate representation for document-like content.","archived":false,"fork":false,"pushed_at":"2023-09-20T19:58:27.000Z","size":1620,"stargazers_count":38,"open_issues_count":8,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T01:11:43.970Z","etag":null,"topics":["ast","html","nast","notion","org-mode","react","typescript"],"latest_commit_sha":null,"homepage":"","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/dragonman225.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-01-17T09:52:12.000Z","updated_at":"2023-10-16T16:10:56.000Z","dependencies_parsed_at":"2023-11-12T12:37:13.937Z","dependency_job_id":"281db092-1abe-4c7a-bc40-c0070b695e72","html_url":"https://github.com/dragonman225/nast","commit_stats":{"total_commits":370,"total_committers":5,"mean_commits":74.0,"dds":"0.024324324324324298","last_synced_commit":"b1ab22c9ba1d0bf5d38e3d5b791d60c83f6a6c46"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonman225%2Fnast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonman225%2Fnast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonman225%2Fnast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonman225%2Fnast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragonman225","download_url":"https://codeload.github.com/dragonman225/nast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137888,"owners_count":21053775,"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":["ast","html","nast","notion","org-mode","react","typescript"],"created_at":"2024-09-29T00:06:52.459Z","updated_at":"2025-04-10T01:11:51.417Z","avatar_url":"https://github.com/dragonman225.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# NAST\n\nA block-based intermediate representation for document-like content.\n\n![](assets/cover.png)\n\n## Packages\n\n| Name                                                         | Description                                                  | Status           |\n| :----------------------------------------------------------- | :----------------------------------------------------------- | :--------------- |\n| [nast-types](./packages/nast-types)                          | A TypeScript type definition module to specify data models for intermediate representation of data. | Experimental     |\n| [nast-util-from-notionapi](./packages/nast-util-from-notionapi) | Import data from a [Notion](https://www.notion.so/) page.    | Stable           |\n| [nast-util-from-orgzly](./packages/nast-util-from-orgzly)    | Import data from an org-mode file exported by [Orgzly](http://www.orgzly.com/). | Proof of Concept |\n| [nast-util-to-react](./packages/nast-util-to-react)          | Render data to `JSX.Element` or HTML. (Preferred)            | Stable           |\n| [npdl](./packages/npdl)                                      | Download Notion pages as self-contained / single-file HTML files. | Stable           |\n| nast-util-to-svelte                                          | Render data to HTML using Svelte.                            | -                |\n\n* Stability : **Stable** \u003e **Experimental** \u003e **Proof of Concept**\n\n## Development\n\n### Clone the repo and `cd` into it\n\n```bash\ngit clone https://github.com/dragonman225/nast.git \u0026\u0026 cd nast\n```\n\n### Install dependencies\n\n* `yarn` (required)\n\n  ```bash\n  npm i -g yarn\n  ```\n\n  We use `yarn` to manage package dependencies.\n\n* `lerna` (required)\n\n  ```bash\n  npm i -g lerna@6.0.3\n  ```\n\n  This project is a monorepo managed with [lerna](https://github.com/lerna/lerna). If you haven't heard of it before, [this tutorial](https://github.com/reggi/lerna-tutorial) is a good starting point.\n\n* `typedoc` (optional)\n\n  ```bash\n  npm i -g typedoc\n  ```\n\n  `typedoc` needs to be available in the command-line for reference document generation.\n\n* [Graphviz](https://www.graphviz.org/) (optional)\n\n  ```bash\n  # For Arch Linux\n  pacman -S graphviz\n  \n  # For macOS via Homebrew\n  brew install graphviz \n  ```\n\n  `dot` needs to available in the command-line for dependency graph generation.\n\n### Setup the project\n\n```bash\nyarn # Install and link dependencies\nnpx lerna run build # Build all packages\n```\n\n### Testing\n\n* Test the overall functionality with `npdl`.\n\n  Download a Notion page and render it to HTML. Use the CSS theme at `packages/nast-util-to-react/src/theme.css`.\n\n  ```bash\n  node packages/npdl/index.js -i=\u003cnotion_page_url\u003e output.html\n  ```\n\n  Use an external theme.\n\n  ```bash\n  node packages/npdl/index.js -i=\u003cnotion_page_url\u003e --theme=\u003cpath_to_css\u003e output.html\n  ```\n\n  Just download a Notion page without rendering to HTML.\n\n  ```bash\n  node packages/npdl/index.js -i=\u003cnotion_page_url\u003e --tree output.json\n  ```\n\n  `npdl` has more features, which can be listed with\n\n  ```bash\n  node packages/npdl/index.js\n  ```\n\n  You can also install `npdl` globally.\n\n  ```bash\n  cd packages/npdl \u0026\u0026 npm i -g .\n  ```\n\n* Each package may have its own test suite, which is not covered here.\n\n### Contributing to NAST\n\n* [Contributing to the project](CONTRIBUTING.md)\n\n### Troubleshooting\n\n* `npx nx graph` to check if the packages are correctly linked.\n  * If a package is published with a new version, don't forget to update other packages that are using it.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragonman225%2Fnast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragonman225%2Fnast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragonman225%2Fnast/lists"}