https://github.com/mtconnect/mtconnecttranspiler.codegenerators.scribantemplates
An abstract transpiler implementation that uses Scriban templates.
https://github.com/mtconnect/mtconnecttranspiler.codegenerators.scribantemplates
Last synced: 5 months ago
JSON representation
An abstract transpiler implementation that uses Scriban templates.
- Host: GitHub
- URL: https://github.com/mtconnect/mtconnecttranspiler.codegenerators.scribantemplates
- Owner: mtconnect
- License: apache-2.0
- Created: 2023-06-19T21:35:59.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2025-10-13T19:14:41.000Z (8 months ago)
- Last Synced: 2025-10-13T19:34:43.345Z (8 months ago)
- Language: C#
- Size: 35.2 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
[](https://github.com/mtconnect/MtconnectTranspiler.Sinks.ScribanTemplates/actions/workflows/nuget-packages.yml)
# MtconnectTranspiler.Sinks.ScribanTemplates
Welcome to the `MtconnectTranspiler.Sinks.ScribanTemplates` repository, an abstract sink implementation designed to facilitate file generation using the MtconnectTranspiler framework and the Scriban templating engine. This library serves as a foundation for developers looking to create custom `ITranspilerSink` implementations, leveraging the powerful Scriban syntax to generate files from the deserialized SysML model provided by the MtconnectTranspiler library.
## Overview
The MtconnectTranspiler framework enables the deserialization of SysML models into a structured, object-oriented format conducive for further processing. The `MtconnectTranspiler.Sinks.ScribanTemplates` library extends this capability by providing a template-based approach to generating output files, making it an ideal starting point for developers wishing to create custom outputs from the SysML model, such as code files, documentation, or configuration files.
Utilizing Scriban, a fast, powerful, and versatile templating engine (https://github.com/scriban/scriban), this library offers an "Abstract Sink" which developers can reference to complete the implementation of the `ITranspilerSink` interface defined in the MtconnectTranspiler project.
## Key Features
- **Scriban Templating**: Leverages Scriban's templating engine to transform the deserialized SysML model into various output formats.
- **Abstract Sink Implementation**: Provides a skeletal framework that developers can extend to implement the `ITranspilerSink` interface, tailored to their specific output requirements.
- **Example-Driven**: Illustrated through the `MtconnectTranspiler.Sinks.CSharp` repository, demonstrating a practical implementation of generating C# code.
## Getting Started
To utilize the `MtconnectTranspiler.Sinks.ScribanTemplates` in your project, follow these steps:
1. **Prerequisites**:
- Familiarity with the MtconnectTranspiler framework and its capabilities.
- Basic understanding of Scriban's templating syntax.
2. **Installation**:
- Clone this repository into your project.
- Ensure you have the MtconnectTranspiler library and Scriban installed and configured in your development environment.
3. **Creating Your Custom Sink**:
- Extend the abstract classes provided by this library to implement your own `ITranspilerSink`.
- Utilize Scriban templates to define the output structure for your specific use case.
4. **Integration**:
- Integrate your custom sink with the MtconnectTranspiler framework to start generating output from SysML models.
## Usage Example
This section would provide a simple example of extending the `MtconnectTranspiler.Sinks.ScribanTemplates` abstract sink to create a custom implementation. It will demonstrate how to define a Scriban template and use it to generate output files.
(Example code and instructions would go here)
## Contributing
Contributions to the `MtconnectTranspiler.Sinks.ScribanTemplates` library are welcome! Please read our contributing guidelines for more information on how to report issues, submit pull requests, and contribute to the library's development.
## License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
## Acknowledgments
- The MtconnectTranspiler project for providing the framework for deserializing SysML models.
- The Scriban project for offering a versatile templating engine.