From 743b5d8f84491cd91d14499c5e5e93919582cade Mon Sep 17 00:00:00 2001 From: Bendeguy Date: Thu, 9 Nov 2023 21:19:36 +0100 Subject: [PATCH] Added Wikilink syntax support. Refined tests, cleaned code. --- manifest.json | 2 +- src/export/collect-assets.ts | 2 +- src/export/exporter.ts | 6 +- src/export/get-links-and-attachments.ts | 14 +- src/export/get-markdown-attachments.ts | 8 +- src/export/replace-local-links.ts | 12 +- src/models/export-properties.ts | 1 + src/test/local-link-replace.test.ts | 4 +- src/test/test-vault.json | 8334 ++++++++++++++++- src/ui/stats-modal.ts | 38 +- src/utils/indexing/create-path-map.ts | 1 + test-vault/bulk-export-test/index.md | 4 +- .../posts1/external link test.md | 2 + .../posts1/header-image-test.md | 4 +- .../posts1/post2-link-test-to-subfolder.md | 11 +- 15 files changed, 8216 insertions(+), 227 deletions(-) diff --git a/manifest.json b/manifest.json index 484861b..c9684e0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "bulk-exporter", "name": "Bulk Exporter", - "version": "2.0.1", + "version": "2.0.2", "minAppVersion": "0.15.0", "description": "Use Dataview queries to export a set of notes with assets", "author": "symunona", diff --git a/src/export/collect-assets.ts b/src/export/collect-assets.ts index 16f389a..0d38c2f 100644 --- a/src/export/collect-assets.ts +++ b/src/export/collect-assets.ts @@ -26,7 +26,7 @@ export async function collectAssetsReplaceLinks( ) { const linksAndAttachments = getLinksAndAttachments(fileExportProperties.content) fileExportProperties.linksAndAttachments = linksAndAttachments - fileExportProperties.content = linksAndAttachments.markdownReplacedWikiStyleLinks + fileExportProperties.outputContent = linksAndAttachments.markdownReplacedWikiStyleLinks // console.warn(fileExportProperties.newFileName, linksAndAttachments) diff --git a/src/export/exporter.ts b/src/export/exporter.ts index a4759a3..772df06 100644 --- a/src/export/exporter.ts +++ b/src/export/exporter.ts @@ -161,6 +161,7 @@ export class Exporter { Object.keys(lastExport).forEach((absoluteFilePath)=>{ const exportProperties = lastExport[absoluteFilePath] exportProperties.content = ""; + exportProperties.outputContent = ""; exportProperties.file = undefined; }) @@ -273,15 +274,16 @@ export async function convertAndCopy( if (!fileDescriptor) { throw new Error('Null Error') } const fileContent = await plugin.app.vault.adapter.read(fileDescriptor.path); - fileExportProperties.content = fileContent; + fileExportProperties.outputContent = fileExportProperties.content = fileContent; fileExportProperties.md5 = Md5.hashStr(fileContent); + // This populates fileExportProperties.outputContent await collectAssetsReplaceLinks(fileExportProperties, allFileListMap, settings, plugin); writeFileSync( fileExportProperties.toAbsoluteFs, - fileExportProperties.content, + fileExportProperties.outputContent, "utf-8" ); diff --git a/src/export/get-links-and-attachments.ts b/src/export/get-links-and-attachments.ts index ba97840..d1049be 100644 --- a/src/export/get-links-and-attachments.ts +++ b/src/export/get-links-and-attachments.ts @@ -74,7 +74,7 @@ export function getLinksAndAttachments(markdown: string): LinkParseResults { } /** - * Instead of trying to hack double bracket into markdown.it parser library, I just pre-process + * Instead of trying to hack double bracket into markdown.it parser library, I juost pre-process * all the links to standard []() notation. * @param markdown * @returns @@ -83,9 +83,15 @@ export function replaceDoubleBracketLinks(markdown: string): string { const results = markdown.match(DOUBLE_BRACKET_LINK_MATCHER) if (results) { results.forEach((link) => { - const linkTarget = link.substring(2, link.length - 2) - const standardLinkStyle = `[${linkTarget}](${encodeURIComponent(linkTarget)})` - // console.warn(link, '->', standardLinkStyle) + let linkTarget = link.substring(2, link.length - 2) + let text = linkTarget + // Support for [[link|text]] styled wiki links. + const linkParts = linkTarget.split('|') + if (linkParts.length > 1 && linkParts[0].trim()){ + linkTarget = linkParts.shift() || '' + text = linkParts.join('|') + } + const standardLinkStyle = `[${text}](${encodeURIComponent(linkTarget)})` markdown = replaceAll(link, markdown, standardLinkStyle) }) } diff --git a/src/export/get-markdown-attachments.ts b/src/export/get-markdown-attachments.ts index 0cec69f..79f9bb4 100644 --- a/src/export/get-markdown-attachments.ts +++ b/src/export/get-markdown-attachments.ts @@ -59,13 +59,13 @@ export function collectAndReplaceHeaderAttachments( // Replace the links in the header. if (attachment.newPath) { // Poor man's yaml splitter. - const contentSplitByHrDashes = exportProperties.content.split('\n---\n') + const contentSplitByHrDashes = exportProperties.outputContent.split('\n---\n') // This is not pretty, but it works. let frontMatterPart = contentSplitByHrDashes.shift() || '' frontMatterPart = replaceAll(attachment.originalPath, frontMatterPart, attachment.newPath) contentSplitByHrDashes.unshift(frontMatterPart) - exportProperties.content = contentSplitByHrDashes.join('\n---\n') + exportProperties.outputContent = contentSplitByHrDashes.join('\n---\n') } }) } @@ -81,8 +81,8 @@ export function collectAndReplaceInlineAttachments( saveAttachmentToLocation(plugin, settings, attachment, exportProperties) // I have experimented with this a lot. // @see comments in getLinksAndAttachments. - // I normalized before exportProperties.content to only have []() style links. - exportProperties.content = replaceAll(`](${attachment.originalPath})`, exportProperties.content, `](${attachment.newPath})`) + // I normalized before exportProperties.outputContent to only have []() style links. + exportProperties.outputContent = replaceAll(`](${attachment.originalPath})`, exportProperties.outputContent, `](${attachment.newPath})`) }) } diff --git a/src/export/replace-local-links.ts b/src/export/replace-local-links.ts index cef3260..56d7d64 100644 --- a/src/export/replace-local-links.ts +++ b/src/export/replace-local-links.ts @@ -28,9 +28,9 @@ export function replaceLocalLinks( if (!linkedDocument) { link.error = "Internal Link Not Found at all!" - exportProperties.content = replaceAll( + exportProperties.outputContent = replaceAll( `[${title}](${original})`, - exportProperties.content, + exportProperties.outputContent, `${title}` ); warn('Internal link not found! Removing. ', title, original) @@ -55,18 +55,18 @@ export function replaceLocalLinks( } link.newPath = newLink const newLinkWithTitle = `[${title}](${newLink})`; - exportProperties.content = replaceAll( + exportProperties.outputContent = replaceAll( `[${title}](${original})`, - exportProperties.content, + exportProperties.outputContent, newLinkWithTitle); } else { // Removed as it's pointing to a file that's not being exported. warn("Internal link not found in output, removing!", original, title, path); link.error = "Internal Link FOUND but not public, removed!" - exportProperties.content = replaceAll( + exportProperties.outputContent = replaceAll( `[${title}](${original})`, - exportProperties.content, + exportProperties.outputContent, `${title}` ); } diff --git a/src/models/export-properties.ts b/src/models/export-properties.ts index a3dcb9d..8c651b6 100644 --- a/src/models/export-properties.ts +++ b/src/models/export-properties.ts @@ -5,6 +5,7 @@ import { AttachmentLink, LinkParseResults } from "src/export/get-links-and-attac export type ExportProperties = { toRelativeToExportDirRoot: string; content: string; + outputContent: string; md5: string; frontMatter: Record; file?: SMarkdownPage, diff --git a/src/test/local-link-replace.test.ts b/src/test/local-link-replace.test.ts index becfda5..bc3cc2a 100644 --- a/src/test/local-link-replace.test.ts +++ b/src/test/local-link-replace.test.ts @@ -22,8 +22,8 @@ test('JEST test', () => { describe('getLinksAndAttachments', () => { test('gets all the links from index file', () => { - const { links } = getLinksAndAttachments(indexMd.content) - expect(links.length).toBe(parseInt(indexMd.frontMatter['internalLinks'])) + const { internalLinks } = getLinksAndAttachments(indexMd.content) + expect(internalLinks.length).toBe(parseInt(indexMd.frontMatter['internalLinks'])) }) diff --git a/src/test/test-vault.json b/src/test/test-vault.json index 14f7c12..8c2077a 100644 --- a/src/test/test-vault.json +++ b/src/test/test-vault.json @@ -23,9 +23,15 @@ "embed": false }, { - "path": "posts1/post1.md", + "path": "posts1/header-imaget-test", + "type": "file", + "display": "posts1/header image test", + "embed": false + }, + { + "path": "posts1/does-not-exist-yet", "type": "file", - "display": "posts1/post1", + "display": "not yet exists", "embed": false }, { @@ -35,7 +41,7 @@ "embed": false }, { - "path": "posts1/subfolder/sub-note1.md", + "path": "posts1/header-image-test.md", "type": "file", "display": "find it by name", "embed": false @@ -53,34 +59,1534 @@ "aliases": [], "lists": [], "tasks": [], - "ctime": "2023-10-24T08:46:34.180+02:00", - "cday": "2023-10-24T00:00:00.000+02:00", - "mtime": "2023-10-24T21:02:53.555+02:00", - "mday": "2023-10-24T00:00:00.000+02:00", - "size": 470, + "ctime": "2023-11-05T23:38:28.429+01:00", + "cday": "2023-11-05T00:00:00.000+01:00", + "mtime": "2023-11-09T20:31:23.915+01:00", + "mday": "2023-11-09T00:00:00.000+01:00", + "size": 726, "starred": false, "frontmatter": { "blog": "test", "index": "true", - "internalLinks": "6", - "links": "6" + "internalLinks": "7", + "links": "7" }, "ext": "md" }, "frontMatter": { "blog": "test", "index": "true", - "internalLinks": "6", - "links": "6" + "internalLinks": "7", + "links": "7" }, "from": "index.md", "newFileName": "index", - "to": "/home/symunona/tmp/bulk-exporter-unit-test/test/index..md", - "toRelative": "test/index..md", - "md5": "df46f5d12d1650d6809141b850cba8d6", - "content": "---\nblog: test\nindex: \"true\"\ninternalLinks: \"6\"\nlinks: \"6\"\n---\n# h1\nI want to link [[post1]] and [anywhere subfolder find by title](post1), then [posts1/post1](posts1/post1)\n\nThe first link is NOT supported currently by the client!\n\n## h2\nFinally, I want to link \nObsidian URL:\n[obsidian url to subfolder](obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fsub-note1)\n[simple absolute subfolder](posts1/subfolder/sub-note1)\n[find it by name](sub-note1)\n\n\n\n", - "toRelativeDir": "test", - "lastExportDate": 1698174173555, + "toAbsoluteFs": "tmp/test-export/index.md", + "toRelative": "index.md", + "md5": "97db90572b8937d196ded6f65bbbe615", + "content": "---\nblog: test\nindex: \"true\"\ninternalLinks: \"7\"\nlinks: \"7\"\n---\n# h1\nI want to link [[post1]] and [anywhere subfolder find by title](post1), then [posts1/header image test](posts1/header-imaget-test)\n\nThe first link is NOT supported currently by the client!\n\nI also want to link something that does [not yet exists](posts1/does-not-exist-yet). <<--- This should be NOT A LINK in the export.\n## h2\nFinally, I want to link stuff.\nObsidian URL:\n[obsidian url to subfolder](obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fembedded%20asset%20tests) <- exported\n[simple absolute subfolder](posts1/subfolder/sub-note1) <<--- This should be NOT A LINK in the export\n[find it by name](header-image-test) <- exported\n\n\n\n", + "toRelativeToExportDirRoot": "", + "lastExportDate": 1699558283915, + "outputContent": "---\nblog: test\nindex: \"true\"\ninternalLinks: \"7\"\nlinks: \"7\"\n---\n# h1\nI want to link [post1](post1) and [anywhere subfolder find by title](post1), then posts1/header image test\n\nThe first link is NOT supported currently by the client!\n\nI also want to link something that does not yet exists. <<--- This should be NOT A LINK in the export.\n## h2\nFinally, I want to link stuff.\nObsidian URL:\n[obsidian url to subfolder](embedded-asset-tests) <- exported\n[simple absolute subfolder](sub-note1) <<--- This should be NOT A LINK in the export\n[find it by name](header-image-test) <- exported\n\n\n\n", + "linksAndAttachments": { + "markdownReplacedWikiStyleLinks": "---\nblog: test\nindex: \"true\"\ninternalLinks: \"7\"\nlinks: \"7\"\n---\n# h1\nI want to link [post1](post1) and [anywhere subfolder find by title](post1), then [posts1/header image test](posts1/header-imaget-test)\n\nThe first link is NOT supported currently by the client!\n\nI also want to link something that does [not yet exists](posts1/does-not-exist-yet). <<--- This should be NOT A LINK in the export.\n## h2\nFinally, I want to link stuff.\nObsidian URL:\n[obsidian url to subfolder](obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fembedded%20asset%20tests) <- exported\n[simple absolute subfolder](posts1/subfolder/sub-note1) <<--- This should be NOT A LINK in the export\n[find it by name](header-image-test) <- exported\n\n\n\n", + "parsedMarkdown": [ + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": null, + "map": [ + 1, + 6 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 1, + 5 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "blog: test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "index: \"true\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "internalLinks: \"7\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "links: \"7\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "blog: test\nindex: \"true\"\ninternalLinks: \"7\"\nlinks: \"7\"", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h1", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "h1", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "h1", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h1", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 7, + 8 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 7, + 8 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "I want to link ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "post1", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": " and ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "anywhere subfolder find by title", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": ", then ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/header-imaget-test" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "posts1/header image test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "I want to link [post1](post1) and [anywhere subfolder find by title](post1), then [posts1/header image test](posts1/header-imaget-test)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 9, + 10 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 9, + 10 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "The first link is NOT supported currently by the client!", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "The first link is NOT supported currently by the client!", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 11, + 12 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 11, + 12 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "I also want to link something that does ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/does-not-exist-yet" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "not yet exists", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": ". <<--- This should be NOT A LINK in the export.", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "I also want to link something that does [not yet exists](posts1/does-not-exist-yet). <<--- This should be NOT A LINK in the export.", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": null, + "map": [ + 12, + 13 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "##", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 12, + 13 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "h2", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "h2", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "##", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 13, + 18 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 13, + 18 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Finally, I want to link stuff.", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Obsidian URL:", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fembedded%20asset%20tests" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "obsidian url to subfolder", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": " <- exported", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/subfolder/sub-note1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "simple absolute subfolder", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": " <<--- This should be NOT A LINK in the export", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "header-image-test" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "find it by name", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": " <- exported", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Finally, I want to link stuff.\nObsidian URL:\n[obsidian url to subfolder](obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fembedded%20asset%20tests) <- exported\n[simple absolute subfolder](posts1/subfolder/sub-note1) <<--- This should be NOT A LINK in the export\n[find it by name](header-image-test) <- exported", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } + ], + "links": [ + { + "text": "post1", + "originalPath": "post1", + "normalizedOriginalPath": "post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + }, + { + "text": "anywhere subfolder find by title", + "originalPath": "post1", + "normalizedOriginalPath": "post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + }, + { + "text": "posts1/header image test", + "originalPath": "posts1/header-imaget-test", + "normalizedOriginalPath": "posts1/header-imaget-test", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/header-imaget-test" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "error": "Internal Link Not Found at all!" + }, + { + "text": "not yet exists", + "originalPath": "posts1/does-not-exist-yet", + "normalizedOriginalPath": "posts1/does-not-exist-yet", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/does-not-exist-yet" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "error": "Internal Link Not Found at all!" + }, + { + "text": "obsidian url to subfolder", + "originalPath": "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fembedded%20asset%20tests", + "normalizedOriginalPath": "posts1/subfolder/embedded asset tests", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fembedded%20asset%20tests" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "embedded-asset-tests" + }, + { + "text": "simple absolute subfolder", + "originalPath": "posts1/subfolder/sub-note1", + "normalizedOriginalPath": "posts1/subfolder/sub-note1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/subfolder/sub-note1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "sub-note1" + }, + { + "text": "find it by name", + "originalPath": "header-image-test", + "normalizedOriginalPath": "header-image-test", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "header-image-test" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "header-image-test" + } + ], + "attachments": [], + "externalLinks": [], + "internalLinks": [ + { + "text": "post1", + "originalPath": "post1", + "normalizedOriginalPath": "post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + }, + { + "text": "anywhere subfolder find by title", + "originalPath": "post1", + "normalizedOriginalPath": "post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + }, + { + "text": "posts1/header image test", + "originalPath": "posts1/header-imaget-test", + "normalizedOriginalPath": "posts1/header-imaget-test", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/header-imaget-test" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "error": "Internal Link Not Found at all!" + }, + { + "text": "not yet exists", + "originalPath": "posts1/does-not-exist-yet", + "normalizedOriginalPath": "posts1/does-not-exist-yet", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/does-not-exist-yet" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "error": "Internal Link Not Found at all!" + }, + { + "text": "obsidian url to subfolder", + "originalPath": "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fembedded%20asset%20tests", + "normalizedOriginalPath": "posts1/subfolder/embedded asset tests", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fembedded%20asset%20tests" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "embedded-asset-tests" + }, + { + "text": "simple absolute subfolder", + "originalPath": "posts1/subfolder/sub-note1", + "normalizedOriginalPath": "posts1/subfolder/sub-note1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/subfolder/sub-note1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "sub-note1" + }, + { + "text": "find it by name", + "originalPath": "header-image-test", + "normalizedOriginalPath": "header-image-test", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "header-image-test" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "header-image-test" + } + ], + "externalAttachments": [], + "internalAttachments": [], + "internalHeaderAttachments": [], + "externalHeaderAttachments": [] + }, "copyGlob": {} }, "posts1/external link test.md": { @@ -100,32 +1606,1705 @@ "aliases": [], "lists": [], "tasks": [], - "ctime": "2023-10-24T08:52:25.146+02:00", - "cday": "2023-10-24T00:00:00.000+02:00", - "mtime": "2023-10-24T21:02:30.863+02:00", - "mday": "2023-10-24T00:00:00.000+02:00", - "size": 295, + "ctime": "2023-11-05T23:38:28.429+01:00", + "cday": "2023-11-05T00:00:00.000+01:00", + "mtime": "2023-11-09T18:58:39.400+01:00", + "mday": "2023-11-09T00:00:00.000+01:00", + "size": 306, "starred": false, "frontmatter": { "blog": "test", "links": "3", - "externalLinks": "3" + "externalLinks": "3", + "lvl": "one" }, "ext": "md" }, "frontMatter": { "blog": "test", "links": "3", - "externalLinks": "3" + "externalLinks": "3", + "lvl": "one" }, "from": "posts1/external link test.md", - "newFileName": "2023-10-24-external-link-test", - "to": "/home/symunona/tmp/bulk-exporter-unit-test/test/posts/2023-10-24-external-link-test..md", - "toRelative": "test/posts/2023-10-24-external-link-test..md", - "md5": "f7e59f65222d63c7b9f88e8ca2cf93da", - "content": "---\nblog: test\nlinks: \"3\"\nexternalLinks: \"3\"\n---\nI want to test external links:\n\nThis is a link to a comic, where [Cueball is debugging](https://xkcd.com/1479/) something what should be obvious\n\n[same link](https://xkcd.com/1479/)\n\nA link to an [SVG](https://shapes.tmpx.space/vol_01/out/9.svg)\n", - "toRelativeDir": "test/posts", - "lastExportDate": 1698174150863, + "newFileName": "external-link-test", + "toAbsoluteFs": "tmp/test-export/external-link-test.md", + "toRelative": "external-link-test.md", + "md5": "a3a25c2559652688a29dfb10563481ec", + "content": "---\nblog: test\nlinks: \"3\"\nexternalLinks: \"3\"\nlvl: one\n---\nI want to test external links:\n\nThis is a link to a comic, where [Cueball is debugging](https://xkcd.com/1479/) something what should be obvious\n\n[same link](https://xkcd.com/1479/)\n\nA link to an [SVG](https://shapes.tmpx.space/vol_01/out/9.svg)\n\n\n", + "toRelativeToExportDirRoot": "", + "lastExportDate": 1699552719400, + "outputContent": "---\nblog: test\nlinks: \"3\"\nexternalLinks: \"3\"\nlvl: one\n---\nI want to test external links:\n\nThis is a link to a comic, where [Cueball is debugging](https://xkcd.com/1479/) something what should be obvious\n\n[same link](https://xkcd.com/1479/)\n\nA link to an [SVG](https://shapes.tmpx.space/vol_01/out/9.svg)\n\n\n", + "linksAndAttachments": { + "markdownReplacedWikiStyleLinks": "---\nblog: test\nlinks: \"3\"\nexternalLinks: \"3\"\nlvl: one\n---\nI want to test external links:\n\nThis is a link to a comic, where [Cueball is debugging](https://xkcd.com/1479/) something what should be obvious\n\n[same link](https://xkcd.com/1479/)\n\nA link to an [SVG](https://shapes.tmpx.space/vol_01/out/9.svg)\n\n\n", + "parsedMarkdown": [ + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": null, + "map": [ + 1, + 6 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 1, + 5 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "blog: test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "links: \"3\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "externalLinks: \"3\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "lvl: one", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "blog: test\nlinks: \"3\"\nexternalLinks: \"3\"\nlvl: one", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "I want to test external links:", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "I want to test external links:", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 8, + 9 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 8, + 9 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "This is a link to a comic, where ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://xkcd.com/1479/" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "Cueball is debugging", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": " something what should be obvious", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "This is a link to a comic, where [Cueball is debugging](https://xkcd.com/1479/) something what should be obvious", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 10, + 11 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 10, + 11 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://xkcd.com/1479/" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "same link", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "[same link](https://xkcd.com/1479/)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 12, + 13 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 12, + 13 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "A link to an ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://shapes.tmpx.space/vol_01/out/9.svg" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "SVG", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "A link to an [SVG](https://shapes.tmpx.space/vol_01/out/9.svg)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } + ], + "links": [ + { + "text": "Cueball is debugging", + "originalPath": "https://xkcd.com/1479/", + "normalizedOriginalPath": "https://xkcd.com/1479/", + "linkType": 1, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://xkcd.com/1479/" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + }, + { + "text": "same link", + "originalPath": "https://xkcd.com/1479/", + "normalizedOriginalPath": "https://xkcd.com/1479/", + "linkType": 1, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://xkcd.com/1479/" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + }, + { + "text": "SVG", + "originalPath": "https://shapes.tmpx.space/vol_01/out/9.svg", + "normalizedOriginalPath": "https://shapes.tmpx.space/vol_01/out/9.svg", + "linkType": 1, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://shapes.tmpx.space/vol_01/out/9.svg" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + } + ], + "attachments": [], + "externalLinks": [ + { + "text": "Cueball is debugging", + "originalPath": "https://xkcd.com/1479/", + "normalizedOriginalPath": "https://xkcd.com/1479/", + "linkType": 1, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://xkcd.com/1479/" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + }, + { + "text": "same link", + "originalPath": "https://xkcd.com/1479/", + "normalizedOriginalPath": "https://xkcd.com/1479/", + "linkType": 1, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://xkcd.com/1479/" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + }, + { + "text": "SVG", + "originalPath": "https://shapes.tmpx.space/vol_01/out/9.svg", + "normalizedOriginalPath": "https://shapes.tmpx.space/vol_01/out/9.svg", + "linkType": 1, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://shapes.tmpx.space/vol_01/out/9.svg" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + } + ], + "internalLinks": [], + "externalAttachments": [], + "internalAttachments": [], + "internalHeaderAttachments": [], + "externalHeaderAttachments": [] + }, + "copyGlob": {} + }, + "posts1/header-image-test.md": { + "file": { + "path": "posts1/header-image-test.md", + "folder": "posts1", + "name": "header-image-test", + "link": { + "path": "posts1/header-image-test.md", + "embed": false, + "type": "file" + }, + "outlinks": [ + { + "path": "assets/18.png", + "type": "file", + "display": "", + "embed": true + } + ], + "inlinks": [ + { + "path": "index.md", + "embed": false, + "type": "file" + }, + { + "path": "posts1/post2-link-test-to-subfolder.md", + "embed": false, + "type": "file" + } + ], + "etags": [], + "tags": [], + "aliases": [], + "lists": [], + "tasks": [], + "ctime": "2023-11-05T23:38:28.429+01:00", + "cday": "2023-11-05T00:00:00.000+01:00", + "mtime": "2023-11-09T20:36:30.453+01:00", + "mday": "2023-11-09T00:00:00.000+01:00", + "size": 287, + "starred": false, + "frontmatter": { + "blog": "test", + "image": "assets/18.png", + "secondImage": "does-not-exists.png", + "svg": "2018-activeet.svg", + "jpg": "2022-thermo.jpg", + "headerAttachments": "5", + "lvl": "two", + "dupe": "18.png", + "attachments": "1", + "internalAttachments": "1" + }, + "ext": "md" + }, + "frontMatter": { + "blog": "test", + "image": "assets/18.png", + "secondImage": "does-not-exists.png", + "svg": "2018-activeet.svg", + "jpg": "2022-thermo.jpg", + "headerAttachments": "5", + "lvl": "two", + "dupe": "18.png", + "attachments": "1", + "internalAttachments": "1" + }, + "from": "posts1/header-image-test.md", + "newFileName": "header-image-test", + "toAbsoluteFs": "tmp/test-export/header-image-test.md", + "toRelative": "header-image-test.md", + "md5": "ebfcf84c84cf30256ce4d961cb776ba9", + "content": "---\nblog: test\nimage: assets/18.png\nsecondImage: does-not-exists.png\nsvg: 2018-activeet.svg\njpg: 2022-thermo.jpg\nheaderAttachments: \"5\"\nlvl: two\ndupe: 18.png\nattachments: \"1\"\ninternalAttachments: \"1\"\n---\nI am having some images in the header\n\n---\n---\nyepp\n\n---\nStill here.\n\n![](18.png)19", + "toRelativeToExportDirRoot": "", + "lastExportDate": 1699558590453, + "outputContent": "---\nblog: test\nimage: assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png\nsecondImage: does-not-exists.png\nsvg: assets/2018-activeet-bbf89d7c568dfb095c4b8b58cea916be.svg\njpg: assets/2022-thermo-bbba60ec6e4b1edb884402913c893c92.jpg\nheaderAttachments: \"5\"\nlvl: two\ndupe: assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png\nattachments: \"1\"\ninternalAttachments: \"1\"\n---\nI am having some images in the header\n\n---\n---\nyepp\n\n---\nStill here.\n\n![](assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png)19", + "linksAndAttachments": { + "markdownReplacedWikiStyleLinks": "---\nblog: test\nimage: assets/18.png\nsecondImage: does-not-exists.png\nsvg: 2018-activeet.svg\njpg: 2022-thermo.jpg\nheaderAttachments: \"5\"\nlvl: two\ndupe: 18.png\nattachments: \"1\"\ninternalAttachments: \"1\"\n---\nI am having some images in the header\n\n---\n---\nyepp\n\n---\nStill here.\n\n![](18.png)19", + "parsedMarkdown": [ + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": null, + "map": [ + 1, + 12 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 1, + 11 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "blog: test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "image: assets/18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "secondImage: does-not-exists.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "svg: 2018-activeet.svg", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "jpg: 2022-thermo.jpg", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "headerAttachments: \"5\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "lvl: two", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "dupe: 18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "attachments: \"1\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "internalAttachments: \"1\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "blog: test\nimage: assets/18.png\nsecondImage: does-not-exists.png\nsvg: 2018-activeet.svg\njpg: 2022-thermo.jpg\nheaderAttachments: \"5\"\nlvl: two\ndupe: 18.png\nattachments: \"1\"\ninternalAttachments: \"1\"", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 12, + 13 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 12, + 13 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "I am having some images in the header", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "I am having some images in the header", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 14, + 15 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 15, + 16 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 16, + 17 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 16, + 17 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "yepp", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "yepp", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 18, + 19 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 19, + 20 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 19, + 20 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Still here.", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Still here.", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 21, + 22 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 21, + 22 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "19", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "![](18.png)19", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } + ], + "links": [], + "attachments": [ + { + "text": "", + "originalPath": "18.png", + "normalizedOriginalPath": "18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + } + ], + "externalLinks": [], + "internalLinks": [], + "externalAttachments": [], + "internalAttachments": [ + { + "text": "", + "originalPath": "18.png", + "normalizedOriginalPath": "18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + } + ], + "internalHeaderAttachments": [ + { + "originalPath": "assets/18.png", + "normalizedOriginalPath": "assets/18.png", + "linkType": 0, + "source": "frontMatter", + "text": "image", + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + }, + { + "originalPath": "does-not-exists.png", + "normalizedOriginalPath": "does-not-exists.png", + "linkType": 0, + "source": "frontMatter", + "text": "secondImage", + "error": "Asset not found!", + "status": "assetNotFound" + }, + { + "originalPath": "2018-activeet.svg", + "normalizedOriginalPath": "2018-activeet.svg", + "linkType": 0, + "source": "frontMatter", + "text": "svg", + "newPath": "assets/2018-activeet-bbf89d7c568dfb095c4b8b58cea916be.svg" + }, + { + "originalPath": "2022-thermo.jpg", + "normalizedOriginalPath": "2022-thermo.jpg", + "linkType": 0, + "source": "frontMatter", + "text": "jpg", + "newPath": "assets/2022-thermo-bbba60ec6e4b1edb884402913c893c92.jpg" + }, + { + "originalPath": "18.png", + "normalizedOriginalPath": "18.png", + "linkType": 0, + "source": "frontMatter", + "text": "dupe", + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + } + ], + "externalHeaderAttachments": [] + }, "copyGlob": {} }, "posts1/post1.md": { @@ -141,7 +3320,7 @@ "outlinks": [], "inlinks": [ { - "path": "posts1/post2-link-test-to-subfolder.md", + "path": "posts1/subfolder/sub-note1.md", "embed": false, "type": "file" }, @@ -149,11 +3328,6 @@ "path": "index.md", "embed": false, "type": "file" - }, - { - "path": "posts1/subfolder/sub-note1.md", - "embed": false, - "type": "file" } ], "etags": [], @@ -161,28 +3335,290 @@ "aliases": [], "lists": [], "tasks": [], - "ctime": "2023-10-24T08:46:52.308+02:00", - "cday": "2023-10-24T00:00:00.000+02:00", - "mtime": "2023-10-24T21:02:40.635+02:00", - "mday": "2023-10-24T00:00:00.000+02:00", - "size": 43, + "ctime": "2023-11-05T23:38:28.429+01:00", + "cday": "2023-11-05T00:00:00.000+01:00", + "mtime": "2023-11-05T23:38:28.433+01:00", + "mday": "2023-11-05T00:00:00.000+01:00", + "size": 85, "starred": false, "frontmatter": { - "blog": "test" + "blog": "test", + "lvl": "three", + "draft": "true", + "date": "2024.01.03" }, "ext": "md" }, "frontMatter": { - "blog": "test" + "blog": "test", + "lvl": "three", + "draft": "true", + "date": "2024.01.03" }, "from": "posts1/post1.md", - "newFileName": "2023-10-24-post1", - "to": "/home/symunona/tmp/bulk-exporter-unit-test/test/posts/2023-10-24-post1..md", - "toRelative": "test/posts/2023-10-24-post1..md", - "md5": "809614c911c46856e598dbe556701968", - "content": "---\nblog: test\n---\nThis is the first entry.", - "toRelativeDir": "test/posts", - "lastExportDate": 1698174160635, + "newFileName": "post1", + "toAbsoluteFs": "tmp/test-export/post1.md", + "toRelative": "post1.md", + "md5": "f8220ce36896da23dd9af1993bc594cd", + "content": "---\nblog: test\nlvl: three\ndraft: \"true\"\ndate: 2024.01.03\n---\nThis is the first entry.", + "toRelativeToExportDirRoot": "", + "lastExportDate": 1699223908433, + "outputContent": "---\nblog: test\nlvl: three\ndraft: \"true\"\ndate: 2024.01.03\n---\nThis is the first entry.", + "linksAndAttachments": { + "markdownReplacedWikiStyleLinks": "---\nblog: test\nlvl: three\ndraft: \"true\"\ndate: 2024.01.03\n---\nThis is the first entry.", + "parsedMarkdown": [ + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": null, + "map": [ + 1, + 6 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 1, + 5 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "blog: test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "lvl: three", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "draft: \"true\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "date: 2024.01.03", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "blog: test\nlvl: three\ndraft: \"true\"\ndate: 2024.01.03", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "This is the first entry.", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "This is the first entry.", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } + ], + "links": [], + "attachments": [], + "externalLinks": [], + "internalLinks": [], + "externalAttachments": [], + "internalAttachments": [], + "internalHeaderAttachments": [], + "externalHeaderAttachments": [] + }, "copyGlob": {} }, "posts1/post2-link-test-to-subfolder.md": { @@ -197,62 +3633,1386 @@ }, "outlinks": [ { - "path": "posts1/subfolder/sub-note1.md", + "path": "posts1/subfolder/embedded asset tests.md", "type": "file", "display": "Absolute Link To a folder down", "embed": false }, { - "path": "posts1/subfolder/sub-note1.md", + "path": "posts1/subfolder/embedded asset tests.md", "type": "file", "display": "Relative Link to a Folder down", "embed": false }, { - "path": "posts1/post1.md", - "type": "file", - "display": "post1", - "embed": false + "path": "posts1/header-image-test.md", + "type": "file", + "display": "header-image-test", + "embed": false + }, + { + "path": "posts1/subfolder/test file with spaces and embedded double quotes.md", + "type": "file", + "display": "test file with spaces and embedded double quotes", + "embed": false + }, + { + "path": "posts1/subfolder/sub-note1.md", + "type": "file", + "display": "wiki link", + "embed": false + } + ], + "inlinks": [], + "etags": [], + "tags": [], + "aliases": [], + "lists": [], + "tasks": [], + "ctime": "2023-11-05T23:38:28.433+01:00", + "cday": "2023-11-05T00:00:00.000+01:00", + "mtime": "2023-11-09T21:02:16.891+01:00", + "mday": "2023-11-09T00:00:00.000+01:00", + "size": 541, + "starred": false, + "frontmatter": { + "blog": "test", + "internalLinks": "6", + "links": "6" + }, + "ext": "md" + }, + "frontMatter": { + "blog": "test", + "internalLinks": "6", + "links": "6" + }, + "from": "posts1/post2-link-test-to-subfolder.md", + "newFileName": "post2-link-test-to-subfolder", + "toAbsoluteFs": "tmp/test-export/post2-link-test-to-subfolder.md", + "toRelative": "post2-link-test-to-subfolder.md", + "md5": "74d5bc5f3f51dbdf59de0ceed356403e", + "content": "---\nblog: test\ninternalLinks: \"6\"\nlinks: \"6\"\n---\ntest now [Absolute Link To a folder down](posts1/subfolder/embedded%20asset%20tests) inline?\n\nThis is the second entry.\n\n[Obsidian Link To a folder down](obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Ftest%20file%20with%20spaces%20and%20embedded%20double%20quotes)\n\n\n[Relative Link to a Folder down](embedded%20asset%20tests)\n\nDouble Square Bracket Links\n[[header-image-test]]\n\n[[test file with spaces and embedded double quotes]]\n\nhmm\n\n\n[[sub-note1|wiki link]] <- this is.\n", + "toRelativeToExportDirRoot": "", + "lastExportDate": 1699560136891, + "outputContent": "---\nblog: test\ninternalLinks: \"6\"\nlinks: \"6\"\n---\ntest now [Absolute Link To a folder down](embedded-asset-tests) inline?\n\nThis is the second entry.\n\n[Obsidian Link To a folder down](test-file-with-spaces-and-embedded-double-quotes)\n\n\n[Relative Link to a Folder down](embedded-asset-tests)\n\nDouble Square Bracket Links\n[header-image-test](header-image-test)\n\n[test file with spaces and embedded double quotes](test-file-with-spaces-and-embedded-double-quotes)\n\nhmm\n\n\n[wiki link](sub-note1) <- this is.\n", + "linksAndAttachments": { + "markdownReplacedWikiStyleLinks": "---\nblog: test\ninternalLinks: \"6\"\nlinks: \"6\"\n---\ntest now [Absolute Link To a folder down](posts1/subfolder/embedded%20asset%20tests) inline?\n\nThis is the second entry.\n\n[Obsidian Link To a folder down](obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Ftest%20file%20with%20spaces%20and%20embedded%20double%20quotes)\n\n\n[Relative Link to a Folder down](embedded%20asset%20tests)\n\nDouble Square Bracket Links\n[header-image-test](header-image-test)\n\n[test file with spaces and embedded double quotes](test%20file%20with%20spaces%20and%20embedded%20double%20quotes)\n\nhmm\n\n\n[wiki link](sub-note1) <- this is.\n", + "parsedMarkdown": [ + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": null, + "map": [ + 1, + 5 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 1, + 4 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "blog: test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "internalLinks: \"6\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "links: \"6\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "blog: test\ninternalLinks: \"6\"\nlinks: \"6\"", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 5, + 6 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 5, + 6 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "test now ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/subfolder/embedded%20asset%20tests" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "Absolute Link To a folder down", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": " inline?", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "test now [Absolute Link To a folder down](posts1/subfolder/embedded%20asset%20tests) inline?", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 7, + 8 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 7, + 8 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "This is the second entry.", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "This is the second entry.", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 9, + 10 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 9, + 10 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Ftest%20file%20with%20spaces%20and%20embedded%20double%20quotes" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "Obsidian Link To a folder down", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "[Obsidian Link To a folder down](obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Ftest%20file%20with%20spaces%20and%20embedded%20double%20quotes)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 12, + 13 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 12, + 13 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "embedded%20asset%20tests" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "Relative Link to a Folder down", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "[Relative Link to a Folder down](embedded%20asset%20tests)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 14, + 16 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 14, + 16 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Double Square Bracket Links", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "header-image-test" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "header-image-test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Double Square Bracket Links\n[header-image-test](header-image-test)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 17, + 18 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 17, + 18 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "test%20file%20with%20spaces%20and%20embedded%20double%20quotes" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "test file with spaces and embedded double quotes", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "[test file with spaces and embedded double quotes](test%20file%20with%20spaces%20and%20embedded%20double%20quotes)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 19, + 20 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 19, + 20 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "hmm", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "hmm", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 22, + 23 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 22, + 23 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "sub-note1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "wiki link", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": " <- this is.", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "[wiki link](sub-note1) <- this is.", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } + ], + "links": [ + { + "text": "Absolute Link To a folder down", + "originalPath": "posts1/subfolder/embedded%20asset%20tests", + "normalizedOriginalPath": "posts1/subfolder/embedded%20asset%20tests", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/subfolder/embedded%20asset%20tests" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "embedded-asset-tests" + }, + { + "text": "Obsidian Link To a folder down", + "originalPath": "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Ftest%20file%20with%20spaces%20and%20embedded%20double%20quotes", + "normalizedOriginalPath": "posts1/subfolder/test file with spaces and embedded double quotes", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Ftest%20file%20with%20spaces%20and%20embedded%20double%20quotes" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "test-file-with-spaces-and-embedded-double-quotes" + }, + { + "text": "Relative Link to a Folder down", + "originalPath": "embedded%20asset%20tests", + "normalizedOriginalPath": "embedded%20asset%20tests", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "embedded%20asset%20tests" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "embedded-asset-tests" + }, + { + "text": "header-image-test", + "originalPath": "header-image-test", + "normalizedOriginalPath": "header-image-test", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "header-image-test" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "header-image-test" + }, + { + "text": "test file with spaces and embedded double quotes", + "originalPath": "test%20file%20with%20spaces%20and%20embedded%20double%20quotes", + "normalizedOriginalPath": "test%20file%20with%20spaces%20and%20embedded%20double%20quotes", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "test%20file%20with%20spaces%20and%20embedded%20double%20quotes" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "test-file-with-spaces-and-embedded-double-quotes" + }, + { + "text": "wiki link", + "originalPath": "sub-note1", + "normalizedOriginalPath": "sub-note1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "sub-note1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "sub-note1" + } + ], + "attachments": [], + "externalLinks": [], + "internalLinks": [ + { + "text": "Absolute Link To a folder down", + "originalPath": "posts1/subfolder/embedded%20asset%20tests", + "normalizedOriginalPath": "posts1/subfolder/embedded%20asset%20tests", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/subfolder/embedded%20asset%20tests" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "embedded-asset-tests" + }, + { + "text": "Obsidian Link To a folder down", + "originalPath": "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Ftest%20file%20with%20spaces%20and%20embedded%20double%20quotes", + "normalizedOriginalPath": "posts1/subfolder/test file with spaces and embedded double quotes", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Ftest%20file%20with%20spaces%20and%20embedded%20double%20quotes" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "test-file-with-spaces-and-embedded-double-quotes" + }, + { + "text": "Relative Link to a Folder down", + "originalPath": "embedded%20asset%20tests", + "normalizedOriginalPath": "embedded%20asset%20tests", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "embedded%20asset%20tests" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "embedded-asset-tests" + }, + { + "text": "header-image-test", + "originalPath": "header-image-test", + "normalizedOriginalPath": "header-image-test", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "header-image-test" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "header-image-test" + }, + { + "text": "test file with spaces and embedded double quotes", + "originalPath": "test%20file%20with%20spaces%20and%20embedded%20double%20quotes", + "normalizedOriginalPath": "test%20file%20with%20spaces%20and%20embedded%20double%20quotes", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "test%20file%20with%20spaces%20and%20embedded%20double%20quotes" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "test-file-with-spaces-and-embedded-double-quotes" }, { - "path": "posts1/subfolder/test file with spaces and embedded double quotes.md", - "type": "file", - "display": "test file with spaces and embedded double quotes", - "embed": false + "text": "wiki link", + "originalPath": "sub-note1", + "normalizedOriginalPath": "sub-note1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "sub-note1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "sub-note1" } ], - "inlinks": [], - "etags": [], - "tags": [], - "aliases": [], - "lists": [], - "tasks": [], - "ctime": "2023-10-24T08:47:05.208+02:00", - "cday": "2023-10-24T00:00:00.000+02:00", - "mtime": "2023-10-24T21:02:46.639+02:00", - "mday": "2023-10-24T00:00:00.000+02:00", - "size": 397, - "starred": false, - "frontmatter": { - "blog": "test", - "internalLinks": "5", - "links": "5" - }, - "ext": "md" + "externalAttachments": [], + "internalAttachments": [], + "internalHeaderAttachments": [], + "externalHeaderAttachments": [] }, - "frontMatter": { - "blog": "test", - "internalLinks": "5", - "links": "5" - }, - "from": "posts1/post2-link-test-to-subfolder.md", - "newFileName": "2023-10-24-post2-link-test-to-subfolder", - "to": "/home/symunona/tmp/bulk-exporter-unit-test/test/posts/2023-10-24-post2-link-test-to-subfolder..md", - "toRelative": "test/posts/2023-10-24-post2-link-test-to-subfolder..md", - "md5": "9846e43ca1c5c45ee3b71d3845ae8142", - "content": "---\nblog: test\ninternalLinks: \"5\"\nlinks: \"5\"\n---\nThis is the second entry.\n\n[Obsidian Link To a folder down](obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Fsub-note1)\n\n[Absolute Link To a folder down](posts1/subfolder/sub-note1)\n\n[Relative Link to a Folder down](subfolder/sub-note1)\n\nDouble Square Bracket Links\n[[post1]]\n\n[[test file with spaces and embedded double quotes]]\n\n\n", - "toRelativeDir": "test/posts", - "lastExportDate": 1698174166639, "copyGlob": {} }, "posts1/subfolder/embedded asset tests.md": { @@ -297,17 +5057,23 @@ "embed": true } ], - "inlinks": [], + "inlinks": [ + { + "path": "posts1/post2-link-test-to-subfolder.md", + "embed": false, + "type": "file" + } + ], "etags": [], "tags": [], "aliases": [], "lists": [], "tasks": [], - "ctime": "2023-10-24T08:56:02.428+02:00", - "cday": "2023-10-24T00:00:00.000+02:00", - "mtime": "2023-10-25T11:08:13.080+02:00", - "mday": "2023-10-25T00:00:00.000+02:00", - "size": 534, + "ctime": "2023-11-05T23:38:28.433+01:00", + "cday": "2023-11-05T00:00:00.000+01:00", + "mtime": "2023-11-05T23:38:28.433+01:00", + "mday": "2023-11-05T00:00:00.000+01:00", + "size": 543, "starred": false, "frontmatter": { "blog": "test", @@ -316,7 +5082,8 @@ "externalLinks": "0", "attachments": "8", "internalAttachments": "5", - "externalAttachments": "3" + "externalAttachments": "3", + "lvl": "one" }, "ext": "md" }, @@ -327,16 +5094,1690 @@ "externalLinks": "0", "attachments": "8", "internalAttachments": "5", - "externalAttachments": "3" + "externalAttachments": "3", + "lvl": "one" }, "from": "posts1/subfolder/embedded asset tests.md", - "newFileName": "2023-10-24-embedded-asset-tests", - "to": "/home/symunona/tmp/bulk-exporter-unit-test/test/posts/2023-10-24-embedded-asset-tests..md", - "toRelative": "test/posts/2023-10-24-embedded-asset-tests..md", - "md5": "8a4243cfafeb2edafc2a9f3b3bc4653a", - "content": "---\nblog: test\nlinks: \"0\"\ninternalLinks: \"0\"\nexternalLinks: \"0\"\nattachments: \"8\"\ninternalAttachments: \"5\"\nexternalAttachments: \"3\"\n---\n\nI am going to embed a picture from the internet:\n\n![](https://imgs.xkcd.com/comics/nihilism.png)\n\n![heist with a title](https://imgs.xkcd.com/comics/heist_2x.png)\n\nAsset missing:\n![](1991_and_2021_2x.png)\n\nFind it anywhere in the vault\n![](18.png)\n\n\n\n![Asset path relative](../../assets/18.png)\n![asset-path-absolute](assets/18.png)\n\t![[18.png]]\n\n\n\n![](https://www.youtube.com/watch?v=MBRqu0YOH14)\n", - "toRelativeDir": "test/posts", - "lastExportDate": 1698224893080, + "newFileName": "embedded-asset-tests", + "toAbsoluteFs": "tmp/test-export/embedded-asset-tests.md", + "toRelative": "embedded-asset-tests.md", + "md5": "cc207c266578fdceed951a682a37fbcd", + "content": "---\nblog: test\nlinks: \"0\"\ninternalLinks: \"0\"\nexternalLinks: \"0\"\nattachments: \"8\"\ninternalAttachments: \"5\"\nexternalAttachments: \"3\"\nlvl: one\n---\n\nI am going to embed a picture from the internet:\n\n![](https://imgs.xkcd.com/comics/nihilism.png)\n\n![heist with a title](https://imgs.xkcd.com/comics/heist_2x.png)\n\nAsset missing:\n![](1991_and_2021_2x.png)\n\nFind it anywhere in the vault\n![](18.png)\n\n\n\n![Asset path relative](../../assets/18.png)\n![asset-path-absolute](assets/18.png)\n\t![[18.png]]\n\n\n\n![](https://www.youtube.com/watch?v=MBRqu0YOH14)\n", + "toRelativeToExportDirRoot": "", + "lastExportDate": 1699223908433, + "outputContent": "---\nblog: test\nlinks: \"0\"\ninternalLinks: \"0\"\nexternalLinks: \"0\"\nattachments: \"8\"\ninternalAttachments: \"5\"\nexternalAttachments: \"3\"\nlvl: one\n---\n\nI am going to embed a picture from the internet:\n\n![](https://imgs.xkcd.com/comics/nihilism.png)\n\n![heist with a title](https://imgs.xkcd.com/comics/heist_2x.png)\n\nAsset missing:\n![](undefined)\n\nFind it anywhere in the vault\n![](assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png)\n\n\n\n![Asset path relative](assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png)\n![asset-path-absolute](assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png)\n\t![18.png](assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png)\n\n\n\n![](https://www.youtube.com/watch?v=MBRqu0YOH14)\n", + "linksAndAttachments": { + "markdownReplacedWikiStyleLinks": "---\nblog: test\nlinks: \"0\"\ninternalLinks: \"0\"\nexternalLinks: \"0\"\nattachments: \"8\"\ninternalAttachments: \"5\"\nexternalAttachments: \"3\"\nlvl: one\n---\n\nI am going to embed a picture from the internet:\n\n![](https://imgs.xkcd.com/comics/nihilism.png)\n\n![heist with a title](https://imgs.xkcd.com/comics/heist_2x.png)\n\nAsset missing:\n![](1991_and_2021_2x.png)\n\nFind it anywhere in the vault\n![](18.png)\n\n\n\n![Asset path relative](../../assets/18.png)\n![asset-path-absolute](assets/18.png)\n\t![18.png](18.png)\n\n\n\n![](https://www.youtube.com/watch?v=MBRqu0YOH14)\n", + "parsedMarkdown": [ + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": null, + "map": [ + 1, + 10 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 1, + 9 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "blog: test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "links: \"0\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "internalLinks: \"0\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "externalLinks: \"0\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "attachments: \"8\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "internalAttachments: \"5\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "externalAttachments: \"3\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "lvl: one", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "blog: test\nlinks: \"0\"\ninternalLinks: \"0\"\nexternalLinks: \"0\"\nattachments: \"8\"\ninternalAttachments: \"5\"\nexternalAttachments: \"3\"\nlvl: one", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 11, + 12 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 11, + 12 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "I am going to embed a picture from the internet:", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "I am going to embed a picture from the internet:", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 13, + 14 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 13, + 14 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "https://imgs.xkcd.com/comics/nihilism.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "![](https://imgs.xkcd.com/comics/nihilism.png)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 15, + 16 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 15, + 16 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "https://imgs.xkcd.com/comics/heist_2x.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "heist with a title", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "heist with a title", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "![heist with a title](https://imgs.xkcd.com/comics/heist_2x.png)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 17, + 19 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 17, + 19 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Asset missing:", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "1991_and_2021_2x.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Asset missing:\n![](1991_and_2021_2x.png)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 20, + 22 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 20, + 22 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Find it anywhere in the vault", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Find it anywhere in the vault\n![](18.png)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 25, + 28 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 25, + 28 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "../../assets/18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Asset path relative", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Asset path relative", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "assets/18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "asset-path-absolute", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "asset-path-absolute", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "![Asset path relative](../../assets/18.png)\n![asset-path-absolute](assets/18.png)\n\t![18.png](18.png)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 31, + 32 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 31, + 32 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "https://www.youtube.com/watch?v=MBRqu0YOH14" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "![](https://www.youtube.com/watch?v=MBRqu0YOH14)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } + ], + "links": [], + "attachments": [ + { + "text": "", + "originalPath": "https://imgs.xkcd.com/comics/nihilism.png", + "normalizedOriginalPath": "https://imgs.xkcd.com/comics/nihilism.png", + "linkType": 1, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "https://imgs.xkcd.com/comics/nihilism.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + }, + { + "text": "", + "originalPath": "https://imgs.xkcd.com/comics/heist_2x.png", + "normalizedOriginalPath": "https://imgs.xkcd.com/comics/heist_2x.png", + "linkType": 1, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "https://imgs.xkcd.com/comics/heist_2x.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "heist with a title", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "heist with a title", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + }, + { + "text": "", + "originalPath": "1991_and_2021_2x.png", + "normalizedOriginalPath": "1991_and_2021_2x.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "1991_and_2021_2x.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "error": "Asset not found!", + "status": "assetNotFound" + }, + { + "text": "", + "originalPath": "18.png", + "normalizedOriginalPath": "18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + }, + { + "text": "", + "originalPath": "../../assets/18.png", + "normalizedOriginalPath": "../../assets/18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "../../assets/18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Asset path relative", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Asset path relative", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + }, + { + "text": "", + "originalPath": "assets/18.png", + "normalizedOriginalPath": "assets/18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "assets/18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "asset-path-absolute", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "asset-path-absolute", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + }, + { + "text": "", + "originalPath": "18.png", + "normalizedOriginalPath": "18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + }, + { + "text": "", + "originalPath": "https://www.youtube.com/watch?v=MBRqu0YOH14", + "normalizedOriginalPath": "https://www.youtube.com/watch?v=MBRqu0YOH14", + "linkType": 1, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "https://www.youtube.com/watch?v=MBRqu0YOH14" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + } + ], + "externalLinks": [], + "internalLinks": [], + "externalAttachments": [ + { + "text": "", + "originalPath": "https://imgs.xkcd.com/comics/nihilism.png", + "normalizedOriginalPath": "https://imgs.xkcd.com/comics/nihilism.png", + "linkType": 1, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "https://imgs.xkcd.com/comics/nihilism.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + }, + { + "text": "", + "originalPath": "https://imgs.xkcd.com/comics/heist_2x.png", + "normalizedOriginalPath": "https://imgs.xkcd.com/comics/heist_2x.png", + "linkType": 1, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "https://imgs.xkcd.com/comics/heist_2x.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "heist with a title", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "heist with a title", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + }, + { + "text": "", + "originalPath": "https://www.youtube.com/watch?v=MBRqu0YOH14", + "normalizedOriginalPath": "https://www.youtube.com/watch?v=MBRqu0YOH14", + "linkType": 1, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "https://www.youtube.com/watch?v=MBRqu0YOH14" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + } + ], + "internalAttachments": [ + { + "text": "", + "originalPath": "1991_and_2021_2x.png", + "normalizedOriginalPath": "1991_and_2021_2x.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "1991_and_2021_2x.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "error": "Asset not found!", + "status": "assetNotFound" + }, + { + "text": "", + "originalPath": "18.png", + "normalizedOriginalPath": "18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [], + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + }, + { + "text": "", + "originalPath": "../../assets/18.png", + "normalizedOriginalPath": "../../assets/18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "../../assets/18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Asset path relative", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Asset path relative", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + }, + { + "text": "", + "originalPath": "assets/18.png", + "normalizedOriginalPath": "assets/18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "assets/18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "asset-path-absolute", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "asset-path-absolute", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + }, + { + "text": "", + "originalPath": "18.png", + "normalizedOriginalPath": "18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + } + ], + "internalHeaderAttachments": [], + "externalHeaderAttachments": [] + }, "copyGlob": {} }, "posts1/subfolder/sub-note1.md": { @@ -365,12 +6806,12 @@ ], "inlinks": [ { - "path": "posts1/post2-link-test-to-subfolder.md", + "path": "index.md", "embed": false, "type": "file" }, { - "path": "index.md", + "path": "posts1/post2-link-test-to-subfolder.md", "embed": false, "type": "file" } @@ -380,32 +6821,865 @@ "aliases": [], "lists": [], "tasks": [], - "ctime": "2023-10-24T08:48:31.837+02:00", - "cday": "2023-10-24T00:00:00.000+02:00", - "mtime": "2023-10-24T21:03:34.188+02:00", - "mday": "2023-10-24T00:00:00.000+02:00", - "size": 289, + "ctime": "2023-11-05T23:38:28.433+01:00", + "cday": "2023-11-05T00:00:00.000+01:00", + "mtime": "2023-11-05T23:38:28.433+01:00", + "mday": "2023-11-05T00:00:00.000+01:00", + "size": 312, "starred": false, "frontmatter": { "blog": "test", "internalLinks": "3", - "links": "3" + "links": "3", + "lvl": "one", + "draft": "true" }, "ext": "md" }, "frontMatter": { "blog": "test", "internalLinks": "3", - "links": "3" + "links": "3", + "lvl": "one", + "draft": "true" }, "from": "posts1/subfolder/sub-note1.md", - "newFileName": "2023-10-24-sub-note1", - "to": "/home/symunona/tmp/bulk-exporter-unit-test/test/posts/2023-10-24-sub-note1..md", - "toRelative": "test/posts/2023-10-24-sub-note1..md", - "md5": "e75cbc3fa5ec77e523ad762aa8e5bd5f", - "content": "---\nblog: test\ninternalLinks: \"3\"\nlinks: \"3\"\n---\nI want to be linked properly.\n\n[Obsidian Link To a folder up](obsidian://open?vault=bulk-export-test&file=posts1%2Fpost1)\n\n[Absolute Link To a folder up](posts1/post1)\n\n[Relative Link to a Folder up](../post1)\n\nAll of the above should work.", - "toRelativeDir": "test/posts", - "lastExportDate": 1698174214188, + "newFileName": "sub-note1", + "toAbsoluteFs": "tmp/test-export/sub-note1.md", + "toRelative": "sub-note1.md", + "md5": "088db5ecdcaa9770702f6fdee6837e79", + "content": "---\nblog: test\ninternalLinks: \"3\"\nlinks: \"3\"\nlvl: one\ndraft: \"true\"\n---\nI want to be linked properly.\n\n[Obsidian Link To a folder up](obsidian://open?vault=bulk-export-test&file=posts1%2Fpost1)\n\n[Absolute Link To a folder up](posts1/post1)\n\n[Relative Link to a Folder up](../post1)\n\nAll of the above should work.", + "toRelativeToExportDirRoot": "", + "lastExportDate": 1699223908433, + "outputContent": "---\nblog: test\ninternalLinks: \"3\"\nlinks: \"3\"\nlvl: one\ndraft: \"true\"\n---\nI want to be linked properly.\n\n[Obsidian Link To a folder up](post1)\n\n[Absolute Link To a folder up](post1)\n\n[Relative Link to a Folder up](post1)\n\nAll of the above should work.", + "linksAndAttachments": { + "markdownReplacedWikiStyleLinks": "---\nblog: test\ninternalLinks: \"3\"\nlinks: \"3\"\nlvl: one\ndraft: \"true\"\n---\nI want to be linked properly.\n\n[Obsidian Link To a folder up](obsidian://open?vault=bulk-export-test&file=posts1%2Fpost1)\n\n[Absolute Link To a folder up](posts1/post1)\n\n[Relative Link to a Folder up](../post1)\n\nAll of the above should work.", + "parsedMarkdown": [ + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": null, + "map": [ + 1, + 7 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 1, + 6 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "blog: test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "internalLinks: \"3\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "links: \"3\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "lvl: one", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "draft: \"true\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "blog: test\ninternalLinks: \"3\"\nlinks: \"3\"\nlvl: one\ndraft: \"true\"", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 7, + 8 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 7, + 8 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "I want to be linked properly.", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "I want to be linked properly.", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 9, + 10 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 9, + 10 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "obsidian://open?vault=bulk-export-test&file=posts1%2Fpost1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "Obsidian Link To a folder up", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "[Obsidian Link To a folder up](obsidian://open?vault=bulk-export-test&file=posts1%2Fpost1)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 11, + 12 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 11, + 12 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "Absolute Link To a folder up", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "[Absolute Link To a folder up](posts1/post1)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 13, + 14 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 13, + 14 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "../post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "Relative Link to a Folder up", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "[Relative Link to a Folder up](../post1)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 15, + 16 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 15, + 16 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "All of the above should work.", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "All of the above should work.", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } + ], + "links": [ + { + "text": "Obsidian Link To a folder up", + "originalPath": "obsidian://open?vault=bulk-export-test&file=posts1%2Fpost1", + "normalizedOriginalPath": "posts1/post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "obsidian://open?vault=bulk-export-test&file=posts1%2Fpost1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + }, + { + "text": "Absolute Link To a folder up", + "originalPath": "posts1/post1", + "normalizedOriginalPath": "posts1/post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + }, + { + "text": "Relative Link to a Folder up", + "originalPath": "../post1", + "normalizedOriginalPath": "../post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "../post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + } + ], + "attachments": [], + "externalLinks": [], + "internalLinks": [ + { + "text": "Obsidian Link To a folder up", + "originalPath": "obsidian://open?vault=bulk-export-test&file=posts1%2Fpost1", + "normalizedOriginalPath": "posts1/post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "obsidian://open?vault=bulk-export-test&file=posts1%2Fpost1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + }, + { + "text": "Absolute Link To a folder up", + "originalPath": "posts1/post1", + "normalizedOriginalPath": "posts1/post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "posts1/post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + }, + { + "text": "Relative Link to a Folder up", + "originalPath": "../post1", + "normalizedOriginalPath": "../post1", + "linkType": 0, + "source": "body", + "token": { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "../post1" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "post1" + } + ], + "externalAttachments": [], + "internalAttachments": [], + "internalHeaderAttachments": [], + "externalHeaderAttachments": [] + }, "copyGlob": {} }, "posts1/subfolder/test file with spaces and embedded double quotes.md": { @@ -445,83 +7719,767 @@ "aliases": [], "lists": [], "tasks": [], - "ctime": "2023-10-24T15:28:45.915+02:00", - "cday": "2023-10-24T00:00:00.000+02:00", - "mtime": "2023-10-25T11:09:18.876+02:00", - "mday": "2023-10-25T00:00:00.000+02:00", - "size": 148, + "ctime": "2023-11-05T23:38:28.433+01:00", + "cday": "2023-11-05T00:00:00.000+01:00", + "mtime": "2023-11-05T23:38:28.433+01:00", + "mday": "2023-11-05T00:00:00.000+01:00", + "size": 157, "starred": false, "frontmatter": { "blog": "test", "attachments": "2", - "internalAttachments": "2" + "internalAttachments": "2", + "lvl": "two" }, "ext": "md" }, "frontMatter": { "blog": "test", "attachments": "2", - "internalAttachments": "2" + "internalAttachments": "2", + "lvl": "two" }, "from": "posts1/subfolder/test file with spaces and embedded double quotes.md", - "newFileName": "2023-10-24-test-file-with-spaces-and-embedded-double-quotes", - "to": "/home/symunona/tmp/bulk-exporter-unit-test/test/posts/2023-10-24-test-file-with-spaces-and-embedded-double-quotes..md", - "toRelative": "test/posts/2023-10-24-test-file-with-spaces-and-embedded-double-quotes..md", - "md5": "2c34ea2bf95728c0b982320a5472e998", - "content": "---\nblog: test\nattachments: \"2\"\ninternalAttachments: \"2\"\n---\nWhat do you do with this?\n\nEmbedded link: \n\n![[index#h2]]\n\nEmbedded image:\n![[18.png]]\n", - "toRelativeDir": "test/posts", - "lastExportDate": 1698224958876, - "copyGlob": {} - }, - "posts1/header-image-test.md": { - "file": { - "path": "posts1/header-image-test.md", - "folder": "posts1", - "name": "header-image-test", - "link": { - "path": "posts1/header-image-test.md", - "embed": false, - "type": "file" - }, - "outlinks": [], - "inlinks": [], - "etags": [], - "tags": [], - "aliases": [], - "lists": [], - "tasks": [], - "ctime": "2023-10-25T11:26:50.735+02:00", - "cday": "2023-10-25T00:00:00.000+02:00", - "mtime": "2023-10-25T11:38:38.541+02:00", - "mday": "2023-10-25T00:00:00.000+02:00", - "size": 164, - "starred": false, - "frontmatter": { - "blog": "test", - "image": "assets/18.png", - "secondImage": "19.png", - "svg": "2018-activeet.svg", - "jpg": "2022-thermo.jpg", - "headerAttachments": "4" - }, - "ext": "md" - }, - "frontMatter": { - "blog": "test", - "image": "assets/18.png", - "secondImage": "19.png", - "svg": "2018-activeet.svg", - "jpg": "2022-thermo.jpg", - "headerAttachments": "4" + "newFileName": "test-file-with-spaces-and-embedded-double-quotes", + "toAbsoluteFs": "tmp/test-export/test-file-with-spaces-and-embedded-double-quotes.md", + "toRelative": "test-file-with-spaces-and-embedded-double-quotes.md", + "md5": "69dd3955e13c56019b790dd6c4285e98", + "content": "---\nblog: test\nattachments: \"2\"\ninternalAttachments: \"2\"\nlvl: two\n---\nWhat do you do with this?\n\nEmbedded link: \n\n![[index#h2]]\n\nEmbedded image:\n![[18.png]]\n", + "toRelativeToExportDirRoot": "", + "lastExportDate": 1699223908433, + "outputContent": "---\nblog: test\nattachments: \"2\"\ninternalAttachments: \"2\"\nlvl: two\n---\nWhat do you do with this?\n\nEmbedded link: \n\n![index#h2](undefined)\n\nEmbedded image:\n![18.png](assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png)\n", + "linksAndAttachments": { + "markdownReplacedWikiStyleLinks": "---\nblog: test\nattachments: \"2\"\ninternalAttachments: \"2\"\nlvl: two\n---\nWhat do you do with this?\n\nEmbedded link: \n\n![index#h2](index%23h2)\n\nEmbedded image:\n![18.png](18.png)\n", + "parsedMarkdown": [ + { + "type": "hr", + "tag": "hr", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "---", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": null, + "map": [ + 1, + 6 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 1, + 5 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "blog: test", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "attachments: \"2\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "internalAttachments: \"2\"", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "lvl: two", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "blog: test\nattachments: \"2\"\ninternalAttachments: \"2\"\nlvl: two", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "-", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "What do you do with this?", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "What do you do with this?", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 8, + 9 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 8, + 9 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Embedded link:", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Embedded link:", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 10, + 11 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 10, + 11 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "index%23h2" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "index#h2", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "index#h2", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "![index#h2](index%23h2)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 12, + 14 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 12, + 14 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Embedded image:", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "Embedded image:\n![18.png](18.png)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } + ], + "links": [], + "attachments": [ + { + "text": "", + "originalPath": "index%23h2", + "normalizedOriginalPath": "index%23h2", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "index%23h2" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "index#h2", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "index#h2", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "error": "Asset not found!", + "status": "assetNotFound" + }, + { + "text": "", + "originalPath": "18.png", + "normalizedOriginalPath": "18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + } + ], + "externalLinks": [], + "internalLinks": [], + "externalAttachments": [], + "internalAttachments": [ + { + "text": "", + "originalPath": "index%23h2", + "normalizedOriginalPath": "index%23h2", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "index%23h2" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "index#h2", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "index#h2", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "error": "Asset not found!", + "status": "assetNotFound" + }, + { + "text": "", + "originalPath": "18.png", + "normalizedOriginalPath": "18.png", + "linkType": 0, + "source": "body", + "token": { + "type": "image", + "tag": "img", + "attrs": [ + [ + "src", + "18.png" + ], + [ + "alt", + "" + ] + ], + "map": null, + "nesting": 0, + "level": 0, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + } + ], + "content": "18.png", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false + }, + "newPath": "assets/18-b1abe1618c6c3ff9e8ff8b2bff484ba4.png" + } + ], + "internalHeaderAttachments": [], + "externalHeaderAttachments": [] }, - "from": "posts1/header-image-test.md", - "newFileName": "2023-10-25-header-image-test", - "to": "/home/symunona/tmp/bulk-exporter-unit-test/test/posts/2023-10-25-header-image-test..md", - "toRelative": "test/posts/2023-10-25-header-image-test..md", - "md5": "5f896a634dbdeb081e6c05eacdf742dc", - "content": "---\nblog: test\nimage: assets/18.png\nsecondImage: 19.png\nsvg: 2018-activeet.svg\njpg: 2022-thermo.jpg\nheaderAttachments: \"4\"\n---\nI am having some images in the header", - "toRelativeDir": "test/posts", - "lastExportDate": 1698226718541, "copyGlob": {} } } \ No newline at end of file diff --git a/src/ui/stats-modal.ts b/src/ui/stats-modal.ts index feaf748..640ba50 100644 --- a/src/ui/stats-modal.ts +++ b/src/ui/stats-modal.ts @@ -8,7 +8,7 @@ const LINK_LISTS = [ 'internalLinks', 'externalLinks', 'internalAttachments', - 'internalAttachments', + 'internalHeaderAttachments', 'externalAttachments', 'headerAttachments' ] @@ -33,27 +33,30 @@ export class StatsModal extends Modal { } - globStats(content: HTMLElement){ - if (this.item.copyGlob){ - content.createEl('h2', 'bopy raw files') - Object.keys(this.item.copyGlob).forEach((selector)=>{ + globStats(content: HTMLElement) { + if (this.item.copyGlob) { + content.createEl('h2', 'body raw files') + Object.keys(this.item.copyGlob).forEach((selector) => { const groupDiv = content.createDiv() groupDiv.createEl('h3', { text: selector }) // @ts-ignore - if (this.item.copyGlob[selector] && this.item.copyGlob[selector].length){ + if (this.item.copyGlob[selector] && this.item.copyGlob[selector].length) { // @ts-ignore this.item.copyGlob[selector].forEach((link: AttachmentLink) => { this.renderLink(link, groupDiv) }) } else { - groupDiv.createSpan({text: 'no files found'}) + groupDiv.createSpan({ text: 'no files found' }) } - }) + }) } } linkStats(content: HTMLElement) { + if (this.noLinksOrAttachments()) { + content.createEl('p', { text: 'No attachments or links in file.' }) + } LINK_LISTS.forEach((linkOrAttachmentGroupKey) => { // @ts-ignore if (this.item.linksAndAttachments && this.item.linksAndAttachments[linkOrAttachmentGroupKey]) { @@ -71,9 +74,22 @@ export class StatsModal extends Modal { }) } - renderLink(link: AttachmentLink, groupDiv: HTMLElement){ + noLinksOrAttachments() { + return !LINK_LISTS.find((linkOrAttachmentGroupKey) => { + // @ts-ignore + if (this.item.linksAndAttachments && + // @ts-ignore + this.item.linksAndAttachments[linkOrAttachmentGroupKey] && + // @ts-ignore + this.item.linksAndAttachments[linkOrAttachmentGroupKey].length) { + return true; + } + }) + } + + renderLink(link: AttachmentLink, groupDiv: HTMLElement) { const linkDisplay = groupDiv.createDiv({ - cls: link.error ? 'error link' : (link.newPath? 'success link' : 'link') + cls: link.error ? 'error link' : (link.newPath ? 'success link' : 'link') }) linkDisplay.createEl('a', { text: link.text, @@ -81,7 +97,7 @@ export class StatsModal extends Modal { cls: 'title', href: link.originalPath }) - linkDisplay.createSpan({ text: link.normalizedOriginalPath, cls: 'url'}) + linkDisplay.createSpan({ text: link.normalizedOriginalPath, cls: 'url' }) if (link.newPath) { linkDisplay.createSpan({ text: `=> ${link.newPath}`, cls: 'replaced' }) } diff --git a/src/utils/indexing/create-path-map.ts b/src/utils/indexing/create-path-map.ts index 37981d5..f9b7d14 100644 --- a/src/utils/indexing/create-path-map.ts +++ b/src/utils/indexing/create-path-map.ts @@ -33,6 +33,7 @@ export function createPathMap( toRelative: targetPath + extension, md5: "", content: "", + outputContent: "", toRelativeToExportDirRoot: path.parse(targetPath).dir, lastExportDate: 0, }; diff --git a/test-vault/bulk-export-test/index.md b/test-vault/bulk-export-test/index.md index 4d027ff..172b89e 100644 --- a/test-vault/bulk-export-test/index.md +++ b/test-vault/bulk-export-test/index.md @@ -1,8 +1,8 @@ --- blog: test index: "true" -internalLinks: "6" -links: "6" +internalLinks: "7" +links: "7" --- # h1 I want to link [[post1]] and [anywhere subfolder find by title](post1), then [posts1/header image test](posts1/header-imaget-test) diff --git a/test-vault/bulk-export-test/posts1/external link test.md b/test-vault/bulk-export-test/posts1/external link test.md index 4957cb7..2fe040c 100644 --- a/test-vault/bulk-export-test/posts1/external link test.md +++ b/test-vault/bulk-export-test/posts1/external link test.md @@ -11,3 +11,5 @@ This is a link to a comic, where [Cueball is debugging](https://xkcd.com/1479/) [same link](https://xkcd.com/1479/) A link to an [SVG](https://shapes.tmpx.space/vol_01/out/9.svg) + + diff --git a/test-vault/bulk-export-test/posts1/header-image-test.md b/test-vault/bulk-export-test/posts1/header-image-test.md index 42520f9..70bb889 100644 --- a/test-vault/bulk-export-test/posts1/header-image-test.md +++ b/test-vault/bulk-export-test/posts1/header-image-test.md @@ -4,9 +4,11 @@ image: assets/18.png secondImage: does-not-exists.png svg: 2018-activeet.svg jpg: 2022-thermo.jpg -headerAttachments: "4" +headerAttachments: "5" lvl: two dupe: 18.png +attachments: "1" +internalAttachments: "1" --- I am having some images in the header diff --git a/test-vault/bulk-export-test/posts1/post2-link-test-to-subfolder.md b/test-vault/bulk-export-test/posts1/post2-link-test-to-subfolder.md index 42638e9..8c86894 100644 --- a/test-vault/bulk-export-test/posts1/post2-link-test-to-subfolder.md +++ b/test-vault/bulk-export-test/posts1/post2-link-test-to-subfolder.md @@ -1,15 +1,16 @@ --- blog: test -internalLinks: "5" -links: "5" +internalLinks: "6" +links: "6" --- +test now [Absolute Link To a folder down](posts1/subfolder/embedded%20asset%20tests) inline? + This is the second entry. [Obsidian Link To a folder down](obsidian://open?vault=bulk-export-test&file=posts1%2Fsubfolder%2Ftest%20file%20with%20spaces%20and%20embedded%20double%20quotes) -[Absolute Link To a folder down](posts1/subfolder/embedded asset tests) -[Relative Link to a Folder down](embedded asset tests) +[Relative Link to a Folder down](embedded%20asset%20tests) Double Square Bracket Links [[header-image-test]] @@ -19,4 +20,4 @@ Double Square Bracket Links hmm - +[[sub-note1|wiki link]] <- this is.