SteGriff.Paprika.Net 1.2.1

dotnet add package SteGriff.Paprika.Net --version 1.2.1
NuGet\Install-Package SteGriff.Paprika.Net -Version 1.2.1
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="SteGriff.Paprika.Net" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SteGriff.Paprika.Net --version 1.2.1
#r "nuget: SteGriff.Paprika.Net, 1.2.1"
#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 SteGriff.Paprika.Net as a Cake Addin
#addin nuget:?package=SteGriff.Paprika.Net&version=1.2.1

// Install SteGriff.Paprika.Net as a Cake Tool
#tool nuget:?package=SteGriff.Paprika.Net&version=1.2.1

Paprika.Net

What is Paprika?

Paprika is a language, and software, for generating semi-random arrangements of words - like computer-driven mad-libs. This can be useful for generating game dialogue, tweet bots, and flavour text which have spice and variety! Paprika (the software) takes a "request" and uses it to execute some "grammar" (grammars are the files which make up your random options). Better to show than to tell:

# Here's a grammar file. Hashes denote comments (lines the software should not read)
# Below is a "category", denoted with an asterisk:
* animal
cow
horse
mouse

* nice
lovely
delightful
amazing

If this grammar was loaded, the user could enter the following input to get the following example output:

Check out this [animal]
-> "Check out this cow"

My [animal] is [nice]
-> "My mouse is delightful"

If you run each command again, the output can be different, because the bits in [square brackets] are randomised.

The language has many more features than this, which you can explore at http://paprika.me.uk

In this repository

Paprika.Net is the core functionality of the Paprika engine. It can load, parse, execute, and validate grammars and queries. It is well unit-tested in Paprika.NetTests. This project is available as a NuGet package as SteGriff.Paprika.Net.

Paprika.Net.Console is basically a desktop client for Paprika. It's a command line app which calls upon Paprika.Net, letting you play with and iterate your grammar files rapidly.

Using the Paprika.Net package (API)

WIP

Install the NuGet package using Install-Package SteGriff.Paprika.Net

  • Instantiate a Core object using var engine = new SteGriff.Paprika.Net.Core();
  • Load a grammar with engine...
  • Parse a request with engine.Parse("My query is [cool/nice]")
  • You can select specific values you want to use (instead of random ones) using an overload of engine.Parse...

Config for Paprika.Net.Console app

By default, the grammars are chosen from the paprika-grammar submodule (../../paprika-grammar/) but you can override this in App.config like so:

<appSettings>
	<add key="GrammarRoot" value="C:/path/to/my/paprika-grammar/" />
</appSettings>

The specified directory must contain an index.grammar file.

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 netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net46 was computed.  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 tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.1 971 3/12/2018
1.2.0 895 11/15/2017