aldrichtr / PSDendron

A PowerShell module for working with Dendron workspaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PSDendron

Project Info  
Name PSDendron
Version Pre-release
Status Active

Synopsis

A PowerShell module for working with dendron workspaces

Description

Dendron is a vscode extension for managing information using a hierarchical model.

PSDendron provides cmdlets to work with these notes and the associated configuration files, folder structure, naming standard and metadata.

Notes

As this is a very early pre-release, this information is subject to change.

Currently, PSDendron supports the following objects:

Workspace Although not exposed as an object at this time, PSDendron has two private functions for working with a Workspace

  • Test-DendronWorkspace : Test if the given path is a Dendron workspace root
  • Resolve-DendronWorkspace : Recurse up the filesystem to the root of the workspace and return it

Additionally, one public function

  • Get-DendronConfiguration : Return an object from the dendron.yml file (the workspace configuration)

Vault

  • Get-DendronVault : List the Vaults in the given Workspace

Content

In this context, Content refers to all of the markdown files in the given vault.

  • Get-DendronContent : Return an object representing each file provided

Get-DendronContent has several supporting functions

  • Get-DendronContentInfo : Converts an individual markdown file into a Dendron.Content object
  • Get-DendronFrontMatter : Parse the yaml frontmatter of a given file and return the fields for inclusion in the Dendron.Content object
  • ConvertTo-DendronTimestamp : Convert a timestamp from a [DateTime] to "milliseconds since the Unix Epoch"
  • ConvertFrom-DendronTimestamp : Convert a timestamp from a "milliseconds since the Unix Epoch" to a [DateTime]

Also, there are two functions for parsing specific items from the Markdown content

  • Get-DendronLink : Parse Markdown provided as input for "wiki style" dendron links. This function can parse the target, alternate name, header, and "content span" from a link
  • Get-DendronTask : Parse Markdown provided as input for GFM style tasks

Finally, a rudimentary content creation function

  • New-DendronNote : Create a new markdown file in the given vault.

It has one supporting function to create the nanoid in keeping with the dendron standard

  • New-DendronContentId : Uses the nanoid.net assembly to create a compatible id for markdown files.

Example

cd \
git clone https://github.com/dendronhq/dendron-docs
cd dendron-docs

Get-DendronVault

get-dendronvault

Example

Get-DendronContent

get-dendroncontent

Example

Get-DendronLink

get-dendronlink

Example

Get-DendronTask

get-dendrontask

About

A PowerShell module for working with Dendron workspaces

License:MIT License


Languages

Language:PowerShell 100.0%