ConsoleZ 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ConsoleZ --version 0.1.0
NuGet\Install-Package ConsoleZ -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ConsoleZ" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ConsoleZ --version 0.1.0
#r "nuget: ConsoleZ, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ConsoleZ as a Cake Addin
#addin nuget:?package=ConsoleZ&version=0.1.0

// Install ConsoleZ as a Cake Tool
#tool nuget:?package=ConsoleZ&version=0.1.0

ConsoleZ

A modern console rendering library

Why use this library? What use cases?

  • Want a common interface/experiance across console and web apps?
  • Want a richer output (colours, progress graphs)?
  • Want to make a retro-console game like Tetris, Snake?
  • Want Markdown in the console?

What this library does NOT do:

  • Console Argument parsing
  • Midnight-Commander like console forms

Key Features (done vs. in-progress):

  • Zero-dependancy
  • Windows 10 Console: ANSI Escape Codes
  • Alternative human readble inline colour formatting "^red;Error:^; Message"
  • Fast full-screen updates. Allows Retro Console games. https://onelonecoder.com/olcconsolegameengine/
  • Unified IConsole working with HTML, WinForms, Console
  • UI Components : Percentage Complete Graph, etc
  • ASCII large fonts
  • Markdown formatting

Screenshots

ANSI Colour in Console HTML Console Tetris

Key C# interface

What will I be programming against?

public interface ITextWriter
{
    int WriteLine(string s);        // We don't use Write, rather update the whole line
    int WriteFormatted(FormattableString formatted);
}

public interface IConsole : ITextWriter
{
    string Handle { get; }
    int Version { get;  }

    int Width { get; }
    int Height { get; }
    int DisplayStart { get;  }
    int DisplayEnd { get; }

    void UpdateLine(int line, string txt);
    void UpdateFormatted(int line, FormattableString formatted);
}

The Idea?

In my current project we have lots of command logic that output calculation reports to the console. As the functionaliy matures, or reaches a larger audience, the it gets ported to the web.

Would it not be great if the console and html versions share the same interface and rendering abilities:

  • Console Renders Markdown with ASCII-art and Console standard colours (Find closest Color -< ConsoleColour)
  • Html Renders to a virtual console (thread-safe) and renders HTML Markdown

Features:

  • Markdown is the common format (Rendering to Console or HTML)
  • ANSI escaping (+ HTML mapping)
  • Threadsafe for the web (many IVirtualConsoles at once)
  • Easy inline colours "Hello ^red;World^;" <-> string.Format("Hello {0}World{1}", Color.Red, Color.Default)
  • Updating progress bars [###... 50%]
  • Standard ASP.NET core console terminal
  • Very Fast console update/FPS see: https://github.com/OneLoneCoder/videos/blob/master/olcConsoleGameEngine.h

Stretch:

  • Wolfram-style cell input/output consoles
  • SignalR polling to update console (vs polling ever sec)

Search Terms:

  • "color console C#"
  • "enhanced c# console"
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ConsoleZ:

Package Downloads
ConsoleZ.AspNetCore

ASP.NET Core Controller for web-console and rendering

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.4.6 560 5/19/2020
0.4.5 683 5/4/2020
0.4.3 430 4/29/2020
0.4.2 557 4/19/2020
0.4.1 538 4/18/2020
0.4.0 733 4/2/2020
0.3.4 617 3/31/2020
0.3.3 591 10/21/2019
0.3.0 602 10/21/2019
0.2.25 577 9/27/2019
0.2.14 695 5/31/2019
0.2.0 696 4/6/2019
0.1.14 786 2/20/2019
0.1.8 768 2/19/2019
0.1.4 819 2/19/2019
0.1.3 768 2/19/2019
0.1.2 743 2/16/2019
0.1.1 890 2/15/2019
0.1.0 623 2/11/2019

Still-In-Development / Experimental.

Not suitable for production at this time.