Link Search Menu Expand Document

Builtin Pods

Builtin pods are managed by Dendron and are available when you install Dendron. They can be used with either the dendron-cli or from within the Dendron extension to import/export/publish your notes from/to anywhere

Table of Contents

JSON Pod

  • id: dendron.json
  • coverage
    • βœ… import
    • βœ… export
    • βœ… publish

Import

Imports a JSON file as Dendron notes

  • format:
    • fname: name of note (without extension)
    • body: contents of note
  • eg:
[
  {
    "fname": "one",
    "body": "one body"
  }
]

Export

Below is sample output from an export of a vault with the following files

.
└── vault
    β”œβ”€β”€ root.md
    β”œβ”€β”€ sample.child.md
    └── sample.md

Exported JSON

[
  {
    "id": "root",
    "title": "root",
    "desc": "",
    "type": "note",
    "updated": 1599430958377,
    "created": 1599430958377,
    "fname": "root",
    "data": {},
    "stub": false,
    "custom": {},
    "parent": null,
    "children": [
      "01d712a3-3676-403c-87d7-f3e7057ca43e",
      "01d712a3-3676-403c-87d7-f3e7057ca43e"
    ]
  },
  {
    "id": "01d712a3-3676-403c-87d7-f3e7057ca43e",
    "title": "Sample",
    "desc": "",
    "type": "note",
    "updated": 1599430965554,
    "created": 1599430965554,
    "fname": "sample",
    "data": {},
    "stub": false,
    "custom": {
      "tags": [
        "one",
        "two",
        "three"
      ]
    },
    "parent": "root",
    "children": [
      "1d947d6e-39c4-4d31-9bec-749a467fc514"
    ]
  },
  {
    "id": "1d947d6e-39c4-4d31-9bec-749a467fc514",
    "title": "Child",
    "desc": "",
    "type": "note",
    "updated": 1599430969355,
    "created": 1599430969355,
    "fname": "sample.child",
    "data": {},
    "stub": false,
    "custom": {
      "customProp": "yellow",
      "customStat": 5
    },
    "parent": "01d712a3-3676-403c-87d7-f3e7057ca43e",
    "children": []
  }
]

Video example of exporting to JSON

Publish Pod

Publish notre to JSON and copy into clipboard

Sample output

{
    "id": "814f9a2c-f011-4852-a077-c887dd985656",
    "title": "Two",
    "type": "note",
    "desc": "",
    "links": [
        {
            "type": "wiki",
            "from": {
                "fname": "bar.two",
                "id": "814f9a2c-f011-4852-a077-c887dd985656"
            },
            "original": "bar.two.child",
            "value": "bar.two.child",
            "alias": "bar.two.child",
            "pos": {
                "start": 23,
                "end": 40
            },
            "to": {
                "fname": "bar.two.child"
            }
        },
        {
            "type": "wiki",
            "from": {
                "fname": "bar.two",
                "id": "814f9a2c-f011-4852-a077-c887dd985656"
            },
            "original": "bar.two.child",
            "value": "bar.two.child",
            "alias": "bar.two.child",
            "pos": {
                "start": 50,
                "end": 67
            },
            "to": {
                "fname": "bar.two.child"
            }
        }
    ],
    "fname": "bar.two",
    "updated": 1603305706789,
    "created": 1602872932440,
    "parent": "93f6a3ad-2b0f-4843-9b65-961c65de9237",
    "children": [
        "8e19c23d-4335-4684-846e-ca7fed893b51"
    ],
    "body": "\n\n# Inner Note\n\n((ref: [[bar.two.child]]))\n((ref: [[bar.two.child]]))",
    "data": {},
    "custom": {},
    "schema": {
        "schemaId": "bar",
        "moduleId": "bar"
    }
}

Markdown Pod

  • id: dendron.markdown
  • coverage
    • export
    • βœ… import
    • βœ… publish

Import

Import markdown files stored locally.

The pod finds all files from the root, and copies over the files into your vault, cleaning the file names to fit dendron’s naming hierarchy. You can see an example below.

  • Original
.
└── projects
    β”œβ”€β”€ p1
    β”‚   β”œβ”€β”€ one.md
    β”‚   β”œβ”€β”€ two.md
    β”‚   └── one.pdf
    └── p2
        β”œβ”€β”€ three.md
        β”œβ”€β”€ four.md
        └── three.gif
  • After Import
.
└── vault
    β”œβ”€β”€ assets
    β”‚   β”œβ”€β”€ one-{uuid}.pdf
    β”‚   └── three-{uuid}.gif
    β”œβ”€β”€ projects.p1.md
    β”œβ”€β”€ projects.p1.one.md
    β”œβ”€β”€ projects.p1.two.md
    β”œβ”€β”€ projects.p2.md
    β”œβ”€β”€ projects.p2.three.md
    └── projects.p2.four.md

Non-markdown files within a directory will be moved into the assets folder of your vault. A uuid will be added to non-markdown file names to ensure it does not overwrite any existing files. A link of the original filenames will be made in the note that corresponds to the imported directory

...
# Imported Assets
- [one.pdf](assets/one-c91d4cb3-1db8-4703-884f-c4f5f9a00734.pdf)

Note that all files starting with a . will be ignored during the import.

If you are importing from tools like Obsidian that support wiki-links, Dendron will convert those wiki-links to Dendron’s dot based format (eg. [[project/p1]] -> [[project.p1]])

Publish

Publish Dendron Markdown to regular markdown. Convert note references and dendron specific syntax to regular markdown.


Table of contents