Skip to content

Latest commit

 

History

History
67 lines (58 loc) · 1.9 KB

README.md

File metadata and controls

67 lines (58 loc) · 1.9 KB

Console application to generate html files

.Net console application that can generate html files populated with data from yaml file.

Example usage

Place Your data in templateData.yaml file in this format:

name: FileName

header: Header

descriptions:
  - title: Description
    text: This is sample description
  - title: File
    text: This is file generated by this application
    
specification:
  title: Specification
  text: |
    Easy: Easy to use
    Fast: Fast to generate

You can specify how output html file will look in TemplateHtmlBuilder.cs file.

File generated from this template will look like this:

<table align="center" border="0" cellpadding="1" cellspacing="15">
    <tbody>
        <tr>
            <td colspan="2">
                <h2>Header</h2>
            </td>
        </tr>
        <tr>
            <td colspan="1">
                <h2>Description</h2>
                <p>This is sample description</p>
            </td>
        </tr>
        <tr>
            <td colspan="1">
                <h2>File</h2>
                <p>This is file generated by this application</p>
            </td>
        </tr>
    </tbody>
</table>
<h2>Specification:</h2>
<ul>
    <li><strong>Easy:</strong> Easy to use</li>
    <li><strong>Fast:</strong> Fast to generate</li>
</ul>

After that You can run this app via these commands:

dotnet build
cd .\src\HtmlTemplateGenerator\
dotnet run

Generated files will be available in 'Templates' directory.

Tech stack

C# .Net