Skip to content

reallukee/confole

Repository files navigation

confole.png

Confole

GitHub License GitHub Release GitHub Build Workflow

🎨 Abbellisci la tua app console F# in modo funzionale

IniziamoDownloadCompilazioneAutoreLicenza

Sì tutto ok, ma la documentazione?

Iniziamo

F#

Usando i template

  1. Installa Confole.Templates tramite NuGet:

    dotnet new install Reallukee.Confole.Templates
    
  2. Crea un nuovo progetto da template:

    dotnet new confole-app --language F# --name MyApp
    

    È possibile anche usare le API in stile imperativo:

    dotnet new confole-app --language F# --name MyApp --mode imperative
    
  3. Esegui il template!

    dotnet run MyApp
    

Usando le mani

  1. Installa Confole tramite NuGet:

    dotnet add package Reallukee.Confole
    
  2. Incolla l'esempio minimale dell'uso dell'API di Confole:

    open System
    
    open Reallukee.Confole
    
    let formats =
        Format.init ()
        |> Format.italic          true
        |> Format.foregroundColor (Color.RGB (255, 0, 0))
        |> Format.backgroundColor (Color.RGB (0, 0, 255))
    
    Format.applyAllNewLine "Hello, World!" formats
    
    do Console.ReadKey(true)
    |> ignore
    
    Format.reset ""

    È possibile anche usare le API in stile imperativo:

    open System
    
    open Reallukee.Confole
    
    Format.doForegroundColor "" (Color.RGB (255, 0, 0))
    Format.doBackgroundColor "" (Color.RGB (0, 0, 255))
    Format.doBold "Hello, World!" true
    
    printfn ""
    
    do Console.ReadKey(true)
    |> ignore
    
    Format.reset ""
  3. Esegui il progetto!

    dotnet run
    

C#

Important

Confole.Sharp è wrapper OOP di Confole!

Note

Confole.Sharp INCLUDE tutte le funzionalità di Confole!

Usando i template

  1. Installa Confole.Templates tramite NuGet:

    dotnet new install Reallukee.Confole.Templates
    
  2. Crea un nuovo progetto da template:

    dotnet new confole-app --language C# --name MyApp
    

    È possibile anche usare le API in modo statico:

    dotnet new confole-app --language C# --name MyApp --mode static
    
  3. Esegui il template!

    dotnet run MyApp
    

Usando le mani

  1. Installa Confole.Sharp tramite NuGet:

    dotnet add package Reallukee.Confole.Sharp
    
  2. Incolla l'esempio minimale dell'uso dell'API di Confole.Sharp:

    using System;
    
    using Reallukee.Confole.Sharp;
    
    Formats formats = new Formats();
    
    formats.AddItalic(true)
           .AddForegroundColor(new RGBColor(255, 0, 0))
           .AddBackgroundColor(new RGBColor(0, 0, 255));
    
    formats.ApplyAll("Hello, World!", true);
    
    Console.ReadKey(true);
    
    formats.Reset("");

    È possibile anche usare le API in modo statico:

    using System;
    
    using Reallukee.Confole.Sharp;
    
    Formats.DoForegroundColor("", new RGBColor(255, 0, 0));
    Formats.DoBackgroundColor("", new RGBColor(0, 0, 255));
    Formats.DoItalic("Hello, World!", true);
    
    Console.WriteLine();
    
    Console.ReadKey(true);
    
    Formats.DoReset("");
  3. Esegui il progetto!

    dotnet run
    

Download

Da GitHub

Download da GitHub

Da NuGet

Pacchetto Versione Downloads
Confole NuGet Version NuGet Downloads
Confole# NuGet Version NuGet Downloads
Confole Templates NuGet Version NuGet Downloads

Compilazione

0. Requisiti

Compilazione

Tip

.NET 8.0+ SDK consigliata!

  • .NET Core 2.0+ SDK o .NET 5.0+ SDK
  • PowerShell 7+ (Per gli script)

Compatibilità

Confole ha come target .NET Standard 2.0!

Sono quindi supportati i seguenti runtime:

  • .NET Framework 4.6.1+
  • .NET Core 2.0+ o .NET 5.0+
  • Mono 5.4 o Mono 6.4

Note

Per maggiori informazioni qui!

1. Sorgente

Usando git

git clone https://github.com/reallukee/confole.git

Usando GitHub

Download da GitHub

2. Compilazione

Usando PowerShell

Tip

PowerShell è la scelta ideale in ambienti .NET oriented!

cd .\confole\scripts\

Solo compilazione:

.\build.ps1

Compilazione + Pacchettizzazione:

.\pack.ps1

Usando le mani

cd confole

Solo compilazione:

dotnet build confole.slnx --configuration Release

dotnet build ./confole --configuration Release
dotnet build ./confole.sharp --configuration Release
dotnet build ./confole.templates --configuration Release

Compilazione + Pacchettizzazione:

dotnet pack confole.slnx --configuration Release

dotnet pack ./confole --configuration Release
dotnet pack ./confole.sharp --configuration Release
dotnet pack ./confole.templates --configuration Release

Autore

Licenza

Licenza MIT

About

🎨 Abbellisci la tua app console F# in modo funzionale

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Languages