Skip to content
Dmytro Halichenko edited this page Feb 14, 2025 · 1 revision

The main features are:

  • Normalize: Standardizes the graph data and ensures consistency.
  • Paths: Retrieves and displays all possible paths within the graph.
  • Squash: Creates a document by simplifying the structure and embedding referenced documents.

Usage

You can run iwe using the following syntax:

iwe <COMMAND> [OPTIONS]

Global Options

  • -V, --version: Prints version.
  • -v, --verbose: Sets the level of verbosity. Default is 0.

Commands

  • iwe init: Initializes the directory as documents root by adding .iwe marker directory and creating default config.json in it.
  • iwe normalize: Standardizes the graph data to ensure a uniform structure.
  • iwe paths: Lists all the paths present in the graph.
  • iwe squash: Traverses the graph to the specified depth combining nodes into a single markdown document.
    • -d, --depth <depth>: Depth to squash to. Default is 2.

Make sure that you have a copy of your files before you perform bulk actions such as iwe normalize.

Normalize command

This command performs batch normalization of the entire library, including:

  • Updating link titles to the header of the linked document.
  • Adjusting header levels to ensure tree structure.
  • Updating the numbering of ordered lists.
  • Fixing newlines and indentations in lists.
  • etc.

Squash command

IWE can "project" the graph into a single document by changing block-references into subsections (headers) and directly incorporating the block-references into the parent document.