A .net HTML rendering tool for USFM.
USFMToolsSharp.Renderers.HTML is a HTML renderer for USFM.
You can install this package from nuget https://www.nuget.org/packages/USFMToolsSharp.Renderers.HTML/
We targeted .net standard 2.0 so .net core 2.0, .net framework 4.6.1, and mono 5.4 and higher are the bare minimum.
With Visual Studio just build the solution. With the .net core tooling use dotnet build
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
There a couple useful classes that you'll want to use
This class transforms a USFMDocument into an html string
Example:
var contents = File.ReadAllText("01-GEN.usfm");
USFMDocument document = parser.ParseFromString(contents);
string html = renderer.Render(document);
File.WriteAllText("output.html", html);