NTypewriter
Textrude
Our great sponsors
NTypewriter | Textrude | |
---|---|---|
8 | 4 | |
109 | 117 | |
- | - | |
8.3 | 7.8 | |
13 days ago | 6 days ago | |
C# | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
NTypewriter
-
This week I released v2.1 of my text-templating library Weave that now uses Source Generators by default.
I am currently using NTypewriter for code generation.
-
Embedded source generation?
With NTypewriter you can generate anything. It connects Scriban templates with data exposed from Roslyn API. You can run templates from VS (design time) or embed them (run time) into your application with the help of Buildalayzer.
-
Typescript models to C# POCOs
With NTypewriter you can generate clients for any language (TS, Java), because you have full control over generated code, but similar to other tools, it uses C# as an input language.
- A useful project I found a couple months ago
-
Code generator like plop.js for dotnet
You can use NTypewriter for that, it is mainly for generating typed TS clients, but in general, you can generate whatever you want.
- Library for generating C# code strings programmatically(Or "Object Oriented-ly")?
-
Tools you use to help you with rapid application development.
You can try to use NTypewriter for code generation, but its main purpose is generation of java script clients for APIs or documentation.
-
Best, most useful extensions for Visual Studio 2022?
NTypewriter is better and alive, but I am definitely biased.
Textrude
-
Is there a source generator that generates poco classes from a JSON schema?
Fair point - source generators can run arbitrary code so yes, they can read a json file and then spit out something else in response. If you want to translate the json schema into the equivalent C# you'll need to write a small amount of code to deserialize the json into a JObject tree, walk it, and emit c# code. I do something similar in my Textrude code-generation/templating project except I'm translating the tree into an equivalent Scriban object tree. The relevant source code is here. All that said, this is a fairly specialised and common task - I can't believe there's not a command line tool to do this already.
-
List of JSON tools for command line
Plug for something I wrote: [github link]*https://github.com/NeilMacMullen/Textrude). The CLI version can pipe json (or yaml,csv or text lines) from stdin or fetch it from a URL then turn it into model and apply a Scriban template to it to emit text to stdout. Runs on Linux or Windows and also comes with an interactive UI prototyping tool.
- Textrude - a template-based code/text-generation tool. Easy transformation of JSON/YAML/CSV models into code/text using Scriban templates.
- General-purpose code-generation tool, with support for data sources like yaml/csv/etc and a template language
What are some alternatives?
Typewriter - Automatic TypeScript template generation from C# source files
pxi - 🧚 pxi (pixie) is a small, fast, and magical command-line data processor similar to jq, mlr, and awk.
TemplateStudio - Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.
yamlpath - YAML/JSON/EYAML/Compatible get/set/merge/validate/scan/convert/diff processors using powerful, intuitive, command-line friendly syntax.
easygen - Easy to use universal code/text generator
fx - Terminal JSON viewer & processor
scriban - A fast, powerful, safe and lightweight scripting language and engine for .NET
jj - JSON Stream Editor (command line utility)
jntemplate - jntemplate is an fast and lightweight html templating engine for C# .NET.
dasel - Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.
Report-From-DocX-HTML-To-PDF-Converter - .NET Core library to create custom reports based on Word docx or HTML documents and convert to PDF
jiq - jid on jq - interactive JSON query tool using jq expressions