# graph-md-files

> Takes a folder containing markdown files and produces a graph object containing relationships between the files based on markdown links or wikilinks

Latest version **0.2.1** (published 2022-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install graph-md-files
pnpm add graph-md-files
yarn add graph-md-files
bun add graph-md-files
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2022-05-13 |
| First published | 2022-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=6.0.0 |
| Dependencies | 6 |
| Unpacked size | 38.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Price Baldwin |
| Maintainers | ipalindromi |
| Keywords | markdown, graph, files, pkm |

## Links

- npm: https://www.npmjs.com/package/graph-md-files
- npm.io page: https://npm.io/package/graph-md-files

## Dependencies (6)

- [glob](https://npm.io/package/glob.md) ^7.2.0
- [unified](https://npm.io/package/unified.md) ^9.0.0
- [gray-matter](https://npm.io/package/gray-matter.md) ^4.0.3
- [@swc/helpers](https://npm.io/package/@swc/helpers.md) ^0.3.2
- [remark-parse](https://npm.io/package/remark-parse.md) ^9.0.0
- [remark-wiki-link](https://npm.io/package/remark-wiki-link.md) ^1.0.4

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2022-05-13
- 0.2.0 — 2022-05-13
- 0.1.0 — 2022-05-13

## README

This library takes a directory of markdown files and converts them into a graph of nodes. From there, you could use the graph to create:

- Additional tooling for your markdown files.
- A static website.
- Graph visualizations.

## Usage

**This project is in early development, and should not be used for any serious purposes yet!**

This project includes a functional Obsidian vault in `/test vault/`. All tests are run against this directory, and you can look at that for examples of what the graph can do.

### To test out the library:

- Clone this repository.
- Run `yarn install` (you only need to do this once).
- Run `yarn test`

### To test against your own files:

- Change [graph-md-files.test.ts line 11](https://github.com/pricebaldwin/graph-md-files/blob/da6775afc8fb2326efbb21ca6c2d83df95e5b180/src/__tests__/graph-md-files.test.ts#L11) to point to your own directory.
  - (e.g. `const rootDir = /Users/your_name/Documents/your_test_vault_name`)
- Run `yarn test`

## History

I developed this library to help me work with vaults created by [obsidian.md](https://obsidian.md). However, it should work for any folder of markdown files.

## Todo

- [ ] Make support markdown style links.
- [ ] Add links to graph which do not exists as files.
- [ ] Make handling of Obsidian features optional.

---
_Source: https://npm.io/package/graph-md-files · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
