{"_id":"@dubin/obsidian-vault-parser","_rev":"2-370ad972ff934121e1ff30bfe813147a","name":"@dubin/obsidian-vault-parser","dist-tags":{"latest":"0.4.5"},"versions":{"0.4.3":{"name":"@dubin/obsidian-vault-parser","author":{"name":"Jonathan Dubin"},"version":"0.4.3","license":"MIT","main":"dist/index.js","module":"dist/obsidian-vault-parser.esm.js","typings":"dist/index.d.ts","engines":{"node":">=12"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","test:script":"TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node test.ts"},"size-limit":[{"path":"dist/obsidian-vault-parser.cjs.production.min.js","limit":"10 KB"},{"path":"dist/obsidian-vault-parser.esm.js","limit":"10 KB"}],"homepage":"https://github.com/coffee-cup/obsidian-vault-parser","bugs":{"url":"https://github.com/coffee-cup/obsidian-vault-parser/issues"},"repository":{"type":"git","url":"git+https://github.com/coffee-cup/obsidian-vault-parser.git"},"dependencies":{"glob-promise":"^4.2.2","gray-matter":"^4.0.3"},"devDependencies":{"@size-limit/preset-small-lib":"^4.9.2","@types/node":"^16.10.3","husky":"^7.0.2","size-limit":"^4.9.2","ts-node":"^10.2.1","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.4.3"},"peerDependencies":{},"gitHead":"025fb21d92c546bdeadb42fc7ba74c60a6ed58e7","description":"![CI](https://github.com/coffee-cup/obsidian-vault-parser/workflows/CI/badge.svg) [![](https://img.shields.io/npm/v/obsidian-vault-parser?style=flat-square)](https://www.npmjs.com/package/obsidian-vault-parser) [![](https://img.shields.io/github/license/c","_id":"@dubin/obsidian-vault-parser@0.4.3","_nodeVersion":"18.8.0","_npmVersion":"8.18.0","dist":{"integrity":"sha512-UuCc+mMxtJttFd1f13NP7JL4tALxSUOSPltQ8yCasBeCdLWVtc4olcV8k4g9dHcrZ4dUxHC/P1h3z4rEkzOUFw==","shasum":"3cd7ca9a00c230dc927ced9c3fc18f693ca158eb","tarball":"https://registry.npmjs.org/@dubin/obsidian-vault-parser/-/obsidian-vault-parser-0.4.3.tgz","fileCount":16,"unpackedSize":236039,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHMtf5qap5Mziss7TEb4na2AerW7HG+3Hw9lysJtouH6AiBL/uwzcQkvEFiIQhYN5EbURfhqBkFNGB7HTkF2vTArIQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3UkWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmprzQ/+InTBq8XZl9Us2x1ekYlkEu50kOfrHuHz4IDO8KURKnhy1ft7\r\nHFv1ibJHd3CntiG97XPflXEerB8Qb15AV1V9WQT1/yzMBb878nzBdarsha0m\r\n5vHMtsAJv3UDywWRnVJy+Ey6q2NSzQjD5AnR5WJjwsVW/Tro5BMrZ3Lw0rPe\r\nc4kfS83Y0s0vF0RXZrl+AHAOu/UDx0zcsU/CfBvFSM4bWv+OgLHF3aTy1FlW\r\nzo4DVxsysPtuefoTqatY6Ys8KcAVw1Osprseh/Sy81JQGsl8mRvRWtqfrAoK\r\n6UzXEC0371doQhNTW1ZF5u2CUHM27TY7cJhxKKZtcKpzvk26QEhMcP7zHL4M\r\n6BhLNT7vm6YExI7WeGYSH6zGun8o/UKwaGZG9Sozt1keGmlxQmNH2O1A7pJR\r\nm4+W+NtIL/g3VKl2mAq3UXgvSfvyQzXQACFR0t2dw4rofna6K5o80V20SXY3\r\nZA41dtEfgBc7jD/Zl4T11KW69gBozZZKVtWxOyiaHGPIbPmWhHpNY9CwvDKc\r\nFTTNHRuTHDDccO7w3W0IJN6Yb3xsf4zQAo1Z95P/B7qb13PpmajOP6a1kPej\r\niitQQ08VNJgWgHiuajPjGehioKXwYBo7Cxt/AGbr4hBtyRgr8ygq7YPnFt6Q\r\nxGqIQgVb4p2+2QJWrQu98GtbVKs2c0FRjLw=\r\n=dJmi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dubin","email":"jonathan.dubin@gmail.com"},"directories":{},"maintainers":[{"name":"dubin","email":"jonathan.dubin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obsidian-vault-parser_0.4.3_1675446550448_0.1790468700361021"},"_hasShrinkwrap":false},"0.4.4":{"name":"@dubin/obsidian-vault-parser","author":{"name":"Jonathan Dubin"},"version":"0.4.4","license":"MIT","main":"dist/index.js","module":"dist/obsidian-vault-parser.esm.js","typings":"dist/index.d.ts","engines":{"node":">=12"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","test:script":"TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node test.ts"},"size-limit":[{"path":"dist/obsidian-vault-parser.cjs.production.min.js","limit":"10 KB"},{"path":"dist/obsidian-vault-parser.esm.js","limit":"10 KB"}],"homepage":"https://github.com/coffee-cup/obsidian-vault-parser","bugs":{"url":"https://github.com/coffee-cup/obsidian-vault-parser/issues"},"repository":{"type":"git","url":"git+https://github.com/coffee-cup/obsidian-vault-parser.git"},"dependencies":{"glob-promise":"^4.2.2","gray-matter":"^4.0.3"},"devDependencies":{"@size-limit/preset-small-lib":"^4.9.2","@types/node":"^16.10.3","husky":"^7.0.2","size-limit":"^4.9.2","ts-node":"^10.2.1","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.4.3"},"peerDependencies":{},"gitHead":"c112a1b3bf595660d6602c707704cc14916566dc","description":"![CI](https://github.com/coffee-cup/obsidian-vault-parser/workflows/CI/badge.svg) [![](https://img.shields.io/npm/v/obsidian-vault-parser?style=flat-square)](https://www.npmjs.com/package/obsidian-vault-parser) [![](https://img.shields.io/github/license/c","_id":"@dubin/obsidian-vault-parser@0.4.4","_nodeVersion":"18.8.0","_npmVersion":"8.18.0","dist":{"integrity":"sha512-28gkZYRkk/3+CgogSsdAV3J2YixeOh/wTdLrFXabkmP5RUIeVMQDt1ekvFQjt7sGCWItDkYqkPd5hU2DoQv2QQ==","shasum":"80c7837dc0b39949d825749789df733bdab465a4","tarball":"https://registry.npmjs.org/@dubin/obsidian-vault-parser/-/obsidian-vault-parser-0.4.4.tgz","fileCount":16,"unpackedSize":236039,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+EttvHsGpun9M+da9nKytmdCEdmxq1ANIgY/mPoaxzAiBjSkDfkhl98euoLY93yBJlHFjknrY01aKkxw+enlmjrA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3UpFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTgA//TiTuP1xbRSE9qN/RGFL3rkWgzvDXD8lmyNMH0ciuautDyqRq\r\n1sn+h8Hwf2lIJ26+OPprB2PxfNFVvq072C3eneHd1oNtx97lg+U95aOT4Ado\r\n9EPCySZ2vJyQsP8Q3KSae49YDbN/OycZplHGaVfxCYR4IteyfkQCCmC2X0mj\r\n5k78Wm4X4M5/GrQmnT0cZAdawv7NIZ/+Qw+18kYdXzYxSI64AUSp68Yx1+sg\r\nqdqPLwbU8VvP6TMbZ5L36nc8xB22Ir4FG1ym8ok6VfD3vbq12jQZ1husjtkP\r\nzVd+F+LowfzlejwDk6KBXBOyngBmGKNqcxMfwiZFgqRe6gOtuveJTbtsxqpO\r\nNMMe+M+wL5e7m0EQEDem++P1MY2qEfTTThvEztMyLAOWyRVzD6X0btaVVBL7\r\n3e4hp/00yVMQ22SG2Cl/CpO/tlzhTsupLxuZKXfT8stoFPP7qwUZoXI67Lcr\r\n22NQkIq4R5zldQXWj9t8hz07Yep0Sw5KS7Pqvsuvfz5LitM2driVjHHPXzin\r\n8PJttl0B/9Gx6gfXvKiMwTbqD+BmWmEWPjXk7v2I0MYNGJmzM2FYY7Q4vahO\r\n6G6wyQbnyDvvcLKWomIBWlsBRVm4u4Dtjk7s7lVxiMHAkzOONhAKc5BDG8Lm\r\nO7AXNtvQqbCJmRzRSCpylXN3VUf4d1S/Ad4=\r\n=lWCx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dubin","email":"jonathan.dubin@gmail.com"},"directories":{},"maintainers":[{"name":"dubin","email":"jonathan.dubin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obsidian-vault-parser_0.4.4_1675446853384_0.9450871928391231"},"_hasShrinkwrap":false},"0.4.5":{"name":"@dubin/obsidian-vault-parser","author":{"name":"Jonathan Dubin"},"version":"0.4.5","license":"MIT","main":"dist/index.js","module":"dist/obsidian-vault-parser.esm.js","typings":"dist/index.d.ts","engines":{"node":">=12"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","test:script":"TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node test.ts"},"size-limit":[{"path":"dist/obsidian-vault-parser.cjs.production.min.js","limit":"10 KB"},{"path":"dist/obsidian-vault-parser.esm.js","limit":"10 KB"}],"homepage":"https://github.com/jondubin/obsidian-vault-parser","bugs":{"url":"https://github.com/jondubin/obsidian-vault-parser/issues"},"repository":{"type":"git","url":"git+https://github.com/jondubin/obsidian-vault-parser.git"},"dependencies":{"glob-promise":"^4.2.2","gray-matter":"^4.0.3"},"devDependencies":{"@size-limit/preset-small-lib":"^4.9.2","@types/node":"^16.10.3","husky":"^7.0.2","size-limit":"^4.9.2","ts-node":"^10.2.1","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.4.3"},"peerDependencies":{},"gitHead":"bf10368cd5d2a0ec21ace172926775c7d0311d54","description":"![CI](https://github.com/coffee-cup/obsidian-vault-parser/workflows/CI/badge.svg) [![](https://img.shields.io/npm/v/obsidian-vault-parser?style=flat-square)](https://www.npmjs.com/package/obsidian-vault-parser) [![](https://img.shields.io/github/license/c","_id":"@dubin/obsidian-vault-parser@0.4.5","_nodeVersion":"18.8.0","_npmVersion":"8.18.0","dist":{"integrity":"sha512-8tHMGzClb9udcXCBc7ijXEH7SwuaSRn8L16+Tx7LIxROV2TR61fORfPK61K5wmgXZwk7s2PptlG+Md+rnNRYUA==","shasum":"f1b37f494f7a622312965db9b8d8bc635b757326","tarball":"https://registry.npmjs.org/@dubin/obsidian-vault-parser/-/obsidian-vault-parser-0.4.5.tgz","fileCount":16,"unpackedSize":236033,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwG2BZJsS4FrjdCP3D3QLGdDZSzNfcBPNA+XQBnpoTaQIgK2MKYgwx6mhkoC+BkZwWdnVv0nd8UlLrl0zOu4efu4g="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3VOkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFBQ/8CsOUKSMfNczi5Cd3DtwMU81nxEBwF3zVYmlEKHkpgbtG0DBV\r\nAta/60SEyqy7Mj0Y8yr7JrgejY078RzoWcETiFlSFclf+wJNOab787R15Vw0\r\nhkXvfWUWmFMd7DMtgK5hl357zQbzn67n14fTsA6oTxltFY75cj4SfN0O38bf\r\nlZhOOwX4dZYBnbVKXko2toSAl0WrZjbWu2KqM3oOPoqWLc2Sbu9BWQ/VL/I1\r\n/5m90ZGLLjsfnBMMHfOAo1mnbqbWUcsmB9GAysGy3hrfh0pukauWyu1PEQUV\r\nAQ1ARmPiWuAGaazx35Pax84Vnnpomww1q7OHvfyayh83PMfaQS2fXYPA0bqb\r\nt1UFiK/0FuiZLV31dfU2r8w6f3FD1AwFlNJdoby6rBFABG6obg8crvKVPqpe\r\ns8ZPMdUag/3MAmItNPTeqUOo5KtLChAdkXl33zV37Du63JiZBebdx3OOGGJn\r\nRncdWurnDIg5QrZnbQqzjzoJfS7BjPl5XeM7RF23BNph4xrNxBhnx4A5QfQ3\r\npkaIbBR+wrIFRs9Q0WQhiMz1DtQ8KlGEFdBqv/liOXUJ6SQDW47vAsIiDTUZ\r\ncb1owc4Cdn7n9hpu3eZ3wWXE1ToKvPpZe6roVsh92UXBMwwyRfxX2qWrnkv0\r\nCs83CW14hKpI4NeACLjM19tOGaqMPlmHOW0=\r\n=D3yk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dubin","email":"jonathan.dubin@gmail.com"},"directories":{},"maintainers":[{"name":"dubin","email":"jonathan.dubin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/obsidian-vault-parser_0.4.5_1675449252559_0.6741854033864125"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-03T17:49:10.402Z","0.4.3":"2023-02-03T17:49:10.629Z","modified":"2023-02-03T18:34:12.816Z","0.4.4":"2023-02-03T17:54:13.529Z","0.4.5":"2023-02-03T18:34:12.711Z"},"maintainers":[{"name":"dubin","email":"jonathan.dubin@gmail.com"}],"description":"![CI](https://github.com/coffee-cup/obsidian-vault-parser/workflows/CI/badge.svg) [![](https://img.shields.io/npm/v/obsidian-vault-parser?style=flat-square)](https://www.npmjs.com/package/obsidian-vault-parser) [![](https://img.shields.io/github/license/c","homepage":"https://github.com/jondubin/obsidian-vault-parser","repository":{"type":"git","url":"git+https://github.com/jondubin/obsidian-vault-parser.git"},"author":{"name":"Jonathan Dubin"},"bugs":{"url":"https://github.com/jondubin/obsidian-vault-parser/issues"},"license":"MIT","readme":"# obsidian-vault-parser\n\n![CI](https://github.com/coffee-cup/obsidian-vault-parser/workflows/CI/badge.svg)\n[![](https://img.shields.io/npm/v/obsidian-vault-parser?style=flat-square)](https://www.npmjs.com/package/obsidian-vault-parser)\n[![](https://img.shields.io/github/license/coffee-cup/obsidian-vault-parser?style=flat-square&color=brightgreen)](https://github.com/coffee-cup/obsidian-vault-parser/blob/main/LICENSE)\n\nVault parser for the [Obsidian](https://obsidian.md/) note taking app.\n\n## Usage\n\nRead an Obsidian vault from a path\n\n```ts\nimport { readVault } from \"obsidian-vault-parser\"\n\nconst vault = readVault(\"./path/to/vault\")\nconsole.log(vault)\n```\n\n`obsidian-vault-parser` also has the ability to only include files that are\n_published_. You can pass an `isPublished` predicate in as an option. Files that\ndo not pass this predicate will not be included in the vault.\n\n```ts\nimport { readVault } from \"obsidian-vault-parser\"\n\nconst vault = readVault(\"./path/to/vault\", {\n  isPublished: file => file.frontMatter.published != null\n})\n```\n\n## Documentation\n\n### `Vault`\n\nRepresents an entire Obsidian vault.\n\n```ts\nexport interface Vault {\n  path: string;\n  files: Record<string, VaultPage>;\n  config: VaultConfig;\n}\n```\n\n### `VaultConfig`\n\nParsed contents of `.obsidian/config`.\n\n```ts\nexport interface VaultConfig {\n  theme?: string;\n  vimMode?: boolean;\n  attachmentFolderPath?: string;\n  pluginEnabledStatus?: any;\n}\n```\n\n### `VaultFile`\n\nRepresents an individual file inside of a vault.\n\n```ts\nexport interface VaultPage {\n  path: string;\n  name: string;\n  tags: string[];\n  links: string[];\n  backLinks: string[];\n  frontMatter: Record<string, any>;\n  content: string;\n  createdAt: number;\n  updatedAt: number;\n}\n```\n\n**`path`**\n\nAbsolute path to the file.\n\n**`name`**\n\nName of the file that can be referenced by other files in the vault. This must\nbe unique across the vault.\n\ne.g. file with path `./foo/bar.md` is `bar`.\n\n**`tags`**\n\nA list of `#tags` found in the file\n\n**`links`**\n\nNames of other files that this file [[links]] to with.\n\n**`backLinks`**\n\nNames of other files that link to this file.\n\n**`frontMatter`**\n\n[Front matter](https://jekyllrb.com/docs/front-matter/) parsed from the top of the file.\n\n**`content`**\n\nString content of the document with front matter removed.\n\n**`createdAt`**\n\nBirthtime of file in milliseconds.\n\n**`updatedAt`**\n\nLast modified date of file in milliseconds.\n\n### `readVault(path: string) => Vault`\n\nRead an Obsidian Vault from a file path.\n\n## TypeScript\n\nTypeScript types are included with this library.\n\n## Test\n\nRun all tests\n\n```\nyarn test\n```\n\n---\n\nThis project was bootstrapped with [tsdx](https://github.com/formium/tsdx).\n","readmeFilename":"README.md"}