Skip to content
sln edited this page May 21, 2024 · 6 revisions

Welcome to the obsidian-canvas2document documentation!

This documentation is a work in progress and will be updated regularly. If you have any questions or suggestions, please feel free to contact me.

Handling complex hierarchical canvas structures

Canvase can easily look like this, with a very deep hierarchy:

metaheader

When converting canvases into documents, you have to keep an eye on that the output is a document, i.e. something linear, while the canvas have a 2-dimensional structure.This means that the hierarchy in the Canvas cannot be adopted 1: 1 in the document.Even with the depth of the hierarchy, you have to keep in mind that a document cannot be nested infinitely deep.Markdown allows 6 levels in Obsidian, i.e. the marking with a maximum of 6 '#' characters.

Canvas2document tries to adopt the hierarchy as well as possible by reading the hierarchy in the canvas and transferring it into a TOC structure in the document.The hierarchy is converted into the 6 levels of the Markdown as well as possible.But in the document is the end of 6 levels.Thus, the outline looks like this for the corresponding document, with sub -chapters up to level 6, everything that is deeper is also placed on level 6.This means that the deeper elements are not lost, but only on a level and the parent-child relationship is preserved.

metaheader

Generated files from the conversion process

The conversion creates a Markdown file called <Canvas-Name_Itifier>fromCanvas.md.This is always next to the output canvas in the file system. Temporary files, such as the card nodes converted into files, are stored in a directory called <Canvas-Name_>canvas2doc-data.

In the second step, in addition to canvas and the file from the 1st step, another file is created that contains the actual document structure.This file has the name <Canvas-Name_Idetifier>fromCanvas__fromC2D.md.

dirstruct

How to convert only a subpart of the canvas

There is not yet an accessible canvas api, so we cannot read the selection of nodes and other elements in the canvas. In order to convert only one subset of elements, simply copy them to another canvas and use it to convert it.

copyparts

Efficient usage of the plugin

  • Use shortuts
  • Use Commandr