All Projects → StubbleOrg → Stubble

StubbleOrg / Stubble

Licence: other
Trimmed down {{mustache}} templates in .NET

Projects that are alternatives of or similar to Stubble

regXwild
⏱ Superfast ^Advanced wildcards++? | Unique algorithms that was implemented on native unmanaged C++ but easily accessible in .NET via Conari (with caching of 0x29 opcodes +optimizations) etc.
Stars: ✭ 20 (-91.9%)
Mutual labels:  text, speed
laravel-mjml
Laravel MJML offers support for rendering MJML syntax into in-line HTML that can be sent within mails.
Stars: ✭ 26 (-89.47%)
Mutual labels:  mustache, templates
tools-generation-detection-synthetic-content
Compilation of the state of the art of tools, articles, forums and links of interest to generate and detect any type of synthetic content using deep learning.
Stars: ✭ 107 (-56.68%)
Mutual labels:  text, generation
GPT2-Telegram-Chatbot
GPT-2 Telegram Chat bot
Stars: ✭ 67 (-72.87%)
Mutual labels:  text, generation
Gpt2 Telegram Chatbot
GPT-2 Telegram Chat bot
Stars: ✭ 41 (-83.4%)
Mutual labels:  generation, text
Grips
Simple-logic templates
Stars: ✭ 289 (+17%)
Mutual labels:  text, templates
probabilistic nlg
Tensorflow Implementation of Stochastic Wasserstein Autoencoder for Probabilistic Sentence Generation (NAACL 2019).
Stars: ✭ 28 (-88.66%)
Mutual labels:  text, generation
Point Of View
Template rendering plugin for Fastify
Stars: ✭ 150 (-39.27%)
Mutual labels:  speed, templates
Lmdb Embeddings
Fast word vectors with little memory usage in Python
Stars: ✭ 404 (+63.56%)
Mutual labels:  speed, text
Mikado
Mikado is the webs fastest template library for building user interfaces.
Stars: ✭ 323 (+30.77%)
Mutual labels:  templates, mustache
Randomdatagenerator
This is a configurable generator to create random data like Lorum Ipsum Text, Words, Text Patterns, First/Last Names, MAC-Addresses, IP-Addresses, Guids and DateTime.
Stars: ✭ 45 (-81.78%)
Mutual labels:  generation, text
Ramhorns
Fast Mustache template engine implementation in pure Rust.
Stars: ✭ 172 (-30.36%)
Mutual labels:  templates, mustache
Pollinate
Template your base files and generate new projects from Git(Hub).
Stars: ✭ 213 (-13.77%)
Mutual labels:  templates
Github Issue Templates
🔣 A collection of GitHub issue and pull request templates
Stars: ✭ 3,074 (+1144.53%)
Mutual labels:  templates
Hydro Serving
MLOps Platform
Stars: ✭ 213 (-13.77%)
Mutual labels:  mustache
Starter Kit
Some useful R-Ladies files 💜 🌍
Stars: ✭ 211 (-14.57%)
Mutual labels:  templates
Libreoffice Impress Templates
Freely-licensed LibreOffice Impress templates
Stars: ✭ 238 (-3.64%)
Mutual labels:  templates
Go Html Boilerplate
Starter pack for doing web development in Go
Stars: ✭ 229 (-7.29%)
Mutual labels:  templates
React Native Text Ticker
React Native Text Ticker/Marquee Component
Stars: ✭ 212 (-14.17%)
Mutual labels:  text
Windrose
A Python Matplotlib, Numpy library to manage wind data, draw windrose (also known as a polar rose plot), draw probability density function and fit Weibull distribution
Stars: ✭ 208 (-15.79%)
Mutual labels:  speed

Stubble Build Status codecov Pre-release Build Nuget Stable Nuget

Trimmed down {{mustache}} templates in .NET

Stubble is an implementation of the Mustache template system in C# (but is usable from any .NET language).

For a language-agnostic overview of mustache's template syntax, see the mustache(5) manpage.

Stubble is tested against the mustache specification and is v.1.1.2, including lambdas compliant, this means that your templates in other languages will work with Stubble provided they match the spec!

It is licensed under the MIT License which can be found here.

Why should I use Stubble?

Stubble is designed to be a spec compliant mustache renderer with only the bare essentials, you could say the rest has been trimmed down!

Stubble provides no methods of finding your templates, no complicated logic for getting values from your objects or special types, no non-spec tags for rendering or logic and only the necessaries to make it a simple and fast parser and renderer.

Okay I'm convinced, how do I get it and use it?

Stubble is available on Nuget.org which can be acessed by clicking on the badge above! Another option for the more adventurous is to download the source and build it yourself.

For how to use Stubble I'd recommend reading the how to use guide here.

Performance

We use BenchmarkDotNet to optimize our performance to to allow us to compare our real performance against our closest comparable measure which is Nustache.

Our benchmarks can be found in the repo and we test using the Tweet benchmarks found in the Mustache.java repository that we have implemented in C#. We've tried to be as fair as possible giving each their optimal scenario so we can focus on raw numbers.

The test itself measures how long it takes to render a timeline of tweets with partials, inverted sections default values and missing data.

image

The numbers here represent the baseline values graphed from the timeline test with warm-ups and outliers removed, please feel free to checkout the repository and run the benchmarks to verify the results or if there's a better way to benchmark the library, we're always open to improvements.

Extensibility

Stubble exposes certain internal structures for parsing and rendering extensions to be added in a loosely coupled way. These extensions can be added on to the IRendererSettingsBuilder as extension methods to simplify it for users.

For more detail on the types of Extensibility and how to extend stubble please see the extensibility docs here..

Compilation

Stubble provides compilation of templates to functions that take strongly typed arguments based on how you configure the stubble template compiler. To use compilation, simple create a StubbleCompilationRenderer and call Compile or Compile async after configuring it.

For more detailed information and edgecases please see the compilation docs here..

Template Loading

Stubble comes in the box with very few template loaders but provides an interface and extension points which allow you to provide your own async and sync methods to get templates from a given name or use one that has already been created in a separate package.

The implementation of this feature is heavily inspired by bobthecow's implementation of loaders in mustache.php.

For more detail on template loading please see the template loading docs here..

Why not use Nustache instead?

If Stubble doesn't do what you need then you should use Nustache! It's a great tool and provides the same base functionality as Stubble provides for the default Mustache spec (I know because I'm a contributor and current maintainer of that project!).

However it does provide lots of extra features, such as a variety of input types, helpers and compilation which increases its complexity and some which are extensions to the Mustache spec (such as helpers). If you need any of those pieces of functionality I'd highly recommend you use Nustache... at least until there are Extensions for Stubble which provide the functionality your after!

Credits

Straight Razor by Vectors Market from the Noun Project

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].