USFMToolsSharp.Renderers.USX 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package USFMToolsSharp.Renderers.USX --version 0.2.0                
NuGet\Install-Package USFMToolsSharp.Renderers.USX -Version 0.2.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="USFMToolsSharp.Renderers.USX" Version="0.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add USFMToolsSharp.Renderers.USX --version 0.2.0                
#r "nuget: USFMToolsSharp.Renderers.USX, 0.2.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 USFMToolsSharp.Renderers.USX as a Cake Addin
#addin nuget:?package=USFMToolsSharp.Renderers.USX&version=0.2.0

// Install USFMToolsSharp.Renderers.USX as a Cake Tool
#tool nuget:?package=USFMToolsSharp.Renderers.USX&version=0.2.0                

GitHub Travis (.com) branch Nuget Nuget

USFMToolsSharp

A .net parser and rendering toolkit for USFM.

Description

USFMToolsSharp is a parser and a collection of renderers for .net

Installation

You can install this package from nuget https://www.nuget.org/packages/USFMToolsSharp/

Requirements

We targeted .net standard 1.0 so .net core 1.0, .net framework 4.5, and mono 4.6 and higher are the bare minimum.

Building

With Visual Studio just build the solution. With the .net core tooling use dotnet build

Contributing

Yes please! A couple things would be very helpful

  • Testing: Because I can't test every single possible USFM document in existance. If you find something that doesn't look right in the parsing or rendering please submit an issue.
  • Adding support for other markers to the parser. There are still plenty of things in the USFM spec that aren't implemented.
  • Adding support for other markers to the HTML renderer
  • Adding other renderers (LaTeX, PDF, EPUB, JSON, etc.). Some of those renderers might not be possible in .net standard and if that is the case we'll just need to create another repo to contain the renderer

Usage

There a couple useful classes that you'll want to use

USFMDocument

This class is a tree of objects that represent a USFM document There are a couple of methods and properties that you'll find useful

USFMDocument output = new USFMDocument();
// The contents of the document
output.Contents;
// To find all the child markers of a certain type (in this case chapters)
output.GetChildMarkers<CMarker>();
// To merge the contents of one USFMDocument with another
USFMDocument otherDocument = new USFMDocument();
output.Insert(otherDocument);

USFMParser

This class creates an abstract syntax tree from a USFM string. It can also be passed a list of specific markers as strings into its constructor to ignore them if needed.

Example:

USFMParser parser = new USFMParser();
var contents = File.ReadAllText("01-GEN.usfm");
USFMDocument output = parser.ParseFromString(contents);

Renderers

HTMLRenderer

For more information, please look into the repository.

HTML Renderer for USFM

DocxRenderer

For more information, please look into the repository.

Docx Renderer for USFM

JSONRenderer

For more information, please look into the repository.

JSON Renderer for USFM

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.

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
0.5.0 84 11/7/2024
0.4.0 385 9/13/2023
0.3.0 141 9/13/2023
0.2.0 153 9/13/2023
0.1.0 591 3/9/2022
0.0.1 392 11/8/2021