Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roam-garden/roam-export
A set of tools to Filter/transform/render RoamResearch JSON export. Used in Roam Garden
https://github.com/roam-garden/roam-export
json roam roam-export roam-garden roamresearch
Last synced: about 1 month ago
JSON representation
A set of tools to Filter/transform/render RoamResearch JSON export. Used in Roam Garden
- Host: GitHub
- URL: https://github.com/roam-garden/roam-export
- Owner: roam-garden
- License: apache-2.0
- Created: 2021-03-05T00:30:23.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-03T04:44:25.000Z (over 3 years ago)
- Last Synced: 2024-11-06T06:49:02.258Z (about 2 months ago)
- Topics: json, roam, roam-export, roam-garden, roamresearch
- Language: TypeScript
- Homepage: https://roam.garden/
- Size: 195 KB
- Stars: 18
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-list - roam-export - garden | 13 | (TypeScript)
README
# roam-export
Export filtering and processing library for https://roam.garden/
### Installation
```
npm i roam-export
```### Usage
A basic usage is as follows:
```typescript
import { RoamBlock, RoamJsonQuery, RoamPage } from "roam-export"
import { readFileSync } from "fs"const data = readFileSync("path to json export", "utf8")
const allPages = JSON.parse(data) as Array
const { pages, blockUids } = new RoamJsonQuery(allPages,
{makePagesWithTheseTagsPublic: ["make-public"], makeBlocksWithTheseTagsPrivate: []}).getPagesToRender()
// do something with pages
```There are more tools for operating on Roam JSON available internally (see https://github.com/roam-garden/roam-export/blob/master/src/roam-utils.ts and https://github.com/roam-garden/roam-export/blob/master/src/filtering.ts)