HRJDev.Jenny
0.9.2
dotnet add package HRJDev.Jenny --version 0.9.2
NuGet\Install-Package HRJDev.Jenny -Version 0.9.2
<PackageReference Include="HRJDev.Jenny" Version="0.9.2" />
<PackageVersion Include="HRJDev.Jenny" Version="0.9.2" />
<PackageReference Include="HRJDev.Jenny" />
paket add HRJDev.Jenny --version 0.9.2
#r "nuget: HRJDev.Jenny, 0.9.2"
#:package HRJDev.Jenny@0.9.2
#addin nuget:?package=HRJDev.Jenny&version=0.9.2
#tool nuget:?package=HRJDev.Jenny&version=0.9.2
Jenny F# - WIP
My personal small F# lib to help with generating Markdown/HTML reports.
I'm getting familiar with F# and so The project is a WIP and the direction for the project hasn't been finalised yet. The goal of the lib at the moment is to provide a typed way to format text into Markdown/HTML elements, which can then be used to generate reports.
Installation
Usage
"Elements" can be created and then "encoded" into HTML or Markdown formatted strings. When encoding to either HTML or Markdown, special chars will be escaped.
E.g, to convert "My Heading 3" to markdown "### My Heading 3", you would run the following:
"My Heading 3"
|> Jenny.Element.heading3
|> Jenny.Markdown.encode
List of element constructors + type signatures
Jenny.Element.heading1 // string -> Element
Jenny.Element.heading2 // string -> Element
Jenny.Element.heading3 // string -> Element
Jenny.Element.heading4 // string -> Element
Jenny.Element.heading5 // string -> Element
Jenny.Element.heading6 // string -> Element
Jenny.Element.paragraph // string -> Element
Jenny.Element.codeBlock // string -> Element
Jenny.Element.table // list<string> -> list<list<string>> -> Result<Element, Err>
Jenny.Element.orderedList // list<string> -> Result<Element, Err>
Jenny.Element.unorderedList // list<string> -> Result<Element, Err>
Err Type:
type Err =
| RowsNotSameLengths
| EmptyList
No list that is passed to either table, ordered list, unordered list constructors is allowed to be empty, otherwise Jenny.Err.EmptyList will be returned inside the Result. Number of columns in each row (length of the lists) all must be the same as well.
Example of encoding a created element:
let heading2 = Jenny.Element.heading2 "Some Title"
// Encode to Markdown
Jenny.Markdown.encode heading2 // will return "## Some Title"
// Encode to HTML (not implemented yet)
Jenny.HTML.encode heading2
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net7.0
- FSharp.Core (>= 7.0.300)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.