Nodsoft.MoltenObsidian.Tool 1.0.5-beta

This is a prerelease version of Nodsoft.MoltenObsidian.Tool.
dotnet tool install --global Nodsoft.MoltenObsidian.Tool --version 1.0.5-beta
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Nodsoft.MoltenObsidian.Tool --version 1.0.5-beta
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Nodsoft.MoltenObsidian.Tool&version=1.0.5-beta&prerelease
nuke :add-package Nodsoft.MoltenObsidian.Tool --version 1.0.5-beta

Molten Obsidian - CLI Tool

Package: Nodsoft.MoltenObsidian.Tool

Premise

Molten Obsidian vaults require some extra steps before using them in your projects, depending on the use case and data source. To remedy the menial tasks, we provided a CLI Tool to assist developers with rapidly building their solutions around Molten Obsidian.

Installation

Installing the tool is extremely straightforward, given the dotnet CLI tool framework. First be sure to have the .NET SDK installed.

Then, it's a one-line matter, to install globally :

dotnet tool install --global Nodsoft.MoltenObsidian.Tool

Or, if you prefer installing it locally within the scope of your project/solution :

dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Nodsoft.MoltenObsidian.Tool

Update

Updating the tool is just as easy, using one command (depending on your install path) :

dotnet tool update -g Nodsoft.MoltenObsidian.Tool # Tool was setup on Global
dotnet tool update -l Nodsoft.MoltenObsidian.Tool # Tool was setup on Local

Usage

Using this tool is very easy and intuitive.
The integrated help provides a syntax check, as such :

moltenobsidian -h

All subsequent commands follow the conventional POSIX structure :

moltenobsidian <command> [subcommand] [-a|--arguments [value]]  

Features

Vault Manifest management

Premise

Some remote vaults do not support directory listing. As such, one efficient way we've overcome this issue is by creating a conventional file called a Vault Manifest, tasked with listing all files in a vault, along with the path, size, SHA256 checksum, and any frontmatter associated within the file.

This is a process that is fully automated using the CLI Tool, and that we plan to also export to a GitHub Actions CI step in the near future.

Usage

Creating a manifest goes as follows:

moltenobsidian manifest generate "/path/to/vault/root/"

The given path will then be checked for the existence of the ./.obsidian/ folder, indicative of the presence of an Obsidian Vault. While the creation of a manifest is not contingent on the presence of this folder (as it will be ignored anyways), it is preferred, to ensure that an invalid path was not specified.
Nonetheless, if you're adamant on the location, you can bypass the checks by running the same command with the -f|--force argument, which will force the creation of a manifest, regardless of that validating folder's presence.

Similarly, there may be cases where you need to output the manifest to a separate folder. In these edge cases, specifying the -o|--output <output-folder> argument will allow you to output the manifest in a different folder (all while retaining the conventionally contingent moltenobsidian.manifest.json filename).

Finally, if the default list of excluded folders/files is not sufficient, you can overwrite the list using the --exclude-folder and --exclude-file arguments. These can be invoked multiple times in the same command, like so:

moltenobsidian manifest generate "/path/to/vault/root"--exclude-folder ".obsidian" --exclude-folder ".git" --exclude-folder ".github"
moltenobsidian manifest generate "/path/to/vault/root"--exclude-file "my/secret/document.md" --exclude-file "secrets.json"

For reference, these are the default exclusions:

Entity Type Exclusions
Folders .obsidian .git .vs .vscode node_modules
Files .DS_STORE

Vault export

Premise

Sometimes you would like to use your vault in non-ASP.NET applications.
This feature allows you to export a vault to static html files to be used where you like.

Usage

Exporting a local MoltenObsidian vault to a specified directory goes as follows :

moltenobsidian ssg generate --from-folder "/path/to/local/vault" -o "/destination/directory"

The ssg command also supports exporting remote vaults from HTTP or FTP :

moltenobsidian ssg generate --from-url "https://url/to/remote/vault/moltenobsidian.manifest.json" -o "/destination/directory"
moltenobsidian ssg generate --from-url "ftp://url/to/remote/vault/moltenobsidian.manifest.json" -o "/destination/directory"

[!NOTE] If the -o flag is not specified, the command will output to the current working directory.

Default ignored file and folders are the same as in moltenobsidian manifest generate

Supported Protocols

Below are the protocols currently supported for vault exports :

Protocol URI segment
HTTP http://, https://
FTP ftp://, ftps://
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.5-beta 120 4/12/2024
0.6.10 196 3/25/2024
0.6.3 256 3/23/2024
0.5.73 358 2/17/2024
0.5.67 467 2/16/2024
0.5.18 1,170 8/11/2023
0.5.13 1,151 6/17/2023
0.5.10 1,012 6/17/2023
0.5.3 975 6/14/2023
0.4.23 1,126 6/1/2023
0.4.22 1,171 5/26/2023
0.4.21 1,103 5/14/2023
0.4.19 885 4/30/2023
0.4.18 940 4/30/2023
0.4.16 1,183 4/30/2023
0.4.3 1,171 4/29/2023
0.4.1 1,081 4/22/2023
0.3.16 1,145 2/25/2023
0.3.14 1,199 2/10/2023
0.3.12 1,374 12/31/2022
0.3.9 1,359 12/30/2022
0.3.8 1,341 12/30/2022
0.3.6 1,091 12/27/2022
0.3.5 1,324 12/19/2022
0.2.4 1,361 12/11/2022
0.2.3 1,232 12/11/2022