Didot-cli 0.8.0

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

Didot

Logo

Transform your structured YAML, JSON or XML data into beautiful, fully-customized HTML pages or plain text in seconds with Didot. This command-line tool allows you to seamlessly generate renders from data files using your preferred templates. Whether you're building static sites, documentation, or reporting tools, Didot makes it easy to turn raw data into polished, web-ready content.

About | Installing | Quickstart

About

Social media: website twitter badge

Releases: nuget licence badge

Dev. activity: GitHub last commit Still maintained GitHub commit activity

Continuous integration builds: Build status Tests CodeFactor codecov

Status: stars badge Bugs badge Top language

Installing

dotnet tool install -g Didot-cli

QuickStart

Didot is a command-line tool designed for generating files based on templating. It supports YAML, JSON, and XML as source data formats and provides flexibility in templating through both Scriban, Liquid, Handlebars and SmartFormat templates languages. With Didot, you can easily automate file generation by combining structured data from YAML, JSON, or XML files with customizable templates using Scriban or DotLiquid.

Supported Data Formats:

  • YAML: Files with the .yaml or .yml extension are parsed using a YAML source parser.
  • JSON: Files with the .json extension are parsed using a JSON source parser.
  • XML: Files with the .xml extension are parsed using an XML source parser.

Supported Templating Engines:

Didot utilizes some templating engines, which allow for powerful and flexible templating.

  • Scriban: Templates with the .scriban extension are parsed using a Scriban template engine. Scriban is a lightweight and fast template engine with rich support for multiple output formats.
    • Highly performant, designed to handle large-scale template processing.
    • Supports customizable scripting with rich expressions and filters.
    • Can work with JSON and YAML data sources.
    • Typical Use Case: Config file generation, reports, email templates, or any templating scenario not tied to a specific web framework.
  • Liquid: Templates with the .liquid extension are parsed using a dotLiquid template engine. DotLiquid is a .NET port of the Liquid templating engine used by platforms like Shopify.
    • Secure (no access to system objects), making it ideal for user-generated templates.
    • Allows both dynamic and static templating.
    • Supports filters, tags, and various control flow structures.
    • Typical Use Case: SaaS applications, dynamic content rendering, email templates.
  • Handlebars: Templates with the .hbs extension are parsed using a Handlebars template engine. Handlebars C# port of the popular JavaScript Handlebars templating engine.
    • Simple syntax for generating HTML or text files from templates.
    • Support for helpers, partial templates, and block helpers.
    • Good separation of logic from presentation.
    • Typical Use Case: Email templates, reports, and content generation.
  • SmartFormat: Templates with the .smart extension are parsed using a SmartFormat template engine. SmartFormat.Net is a A lightweight templating engine primarily used for string formatting.
    • Provides more advanced formatting capabilities than standard string formatting in C#.
    • Supports nested templates, conditional formatting, and more.
    • Typical Use Case: Log messages, report generation, and dynamic text formatting.

Command Usage:

The command to run Didot is simply didot. When executing it, you need to provide three required arguments:

  • -t, --Template: Specifies the path to the Scriban template file.
  • -s, --Source: Specifies the path to the source data file, which can be in YAML or JSON format.
  • -o, --Output: Specifies the path to the output file where the generated content will be saved.
Example:
didot -t template.scriban -s data.yaml -o page.html

In this example:

  • template.scriban is the Scriban template file.
  • data.yaml is the source file containing the structured data in YAML format.
  • page.html is the output file that will contain the generated content.

Make sure that the template file and source file are correctly formatted and aligned with your data model to produce the desired result.

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 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
0.21.0 72 11/17/2024
0.20.0 66 10/29/2024
0.19.0 69 10/29/2024
0.18.0 88 10/27/2024
0.17.0 75 10/27/2024
0.16.0 78 10/26/2024
0.15.0 75 10/24/2024
0.14.0 74 10/24/2024
0.13.1 57 10/22/2024
0.13.0 72 10/21/2024
0.12.2 76 10/21/2024
0.12.1 70 10/21/2024
0.12.0 70 10/21/2024
0.11.0 129 10/20/2024
0.10.0 100 10/20/2024
0.9.0 99 10/20/2024
0.8.0 113 10/19/2024
0.7.0 104 10/19/2024
0.6.0 107 10/19/2024
0.5.1 114 10/19/2024
0.5.0 111 10/19/2024
0.4.0 109 10/19/2024
0.3.0 120 10/19/2024
0.2.0 115 10/19/2024
0.1.0 89 10/13/2024