Nodsoft.MoltenObsidian.Tool 0.6.3

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Nodsoft.MoltenObsidian.Tool --version 0.6.3                
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 0.6.3                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Nodsoft.MoltenObsidian.Tool&version=0.6.3                
nuke :add-package Nodsoft.MoltenObsidian.Tool --version 0.6.3                

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 net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.23 130 8/25/2024
1.0.21 106 7/6/2024
1.0.16 120 6/22/2024
1.0.15 104 6/22/2024
1.0.14 109 5/12/2024
1.0.12 105 5/11/2024
1.0.11 111 5/11/2024
1.0.10 104 5/11/2024
1.0.5-beta 159 4/12/2024
0.6.10 243 3/25/2024
0.6.3 297 3/23/2024
0.5.73 418 2/17/2024
0.5.67 508 2/16/2024
0.5.18 1,226 8/11/2023
0.5.13 1,177 6/17/2023
0.5.10 1,038 6/17/2023
0.5.3 997 6/14/2023
0.4.23 1,151 6/1/2023
0.4.22 1,194 5/26/2023
0.4.21 1,123 5/14/2023
0.4.19 912 4/30/2023
0.4.18 964 4/30/2023
0.4.16 1,209 4/30/2023
0.4.3 1,197 4/29/2023
0.4.1 1,110 4/22/2023
0.3.16 1,173 2/25/2023
0.3.14 1,223 2/10/2023
0.3.12 1,403 12/31/2022
0.3.9 1,383 12/30/2022
0.3.8 1,367 12/30/2022
0.3.6 1,117 12/27/2022
0.3.5 1,368 12/19/2022
0.2.4 1,392 12/11/2022
0.2.3 1,261 12/11/2022