Simple dotnet library for converting HTML into Markdown.
To use dotnet-markdownify in your project, you can:
- simply clone this repo and add reference to
Dotnet.Markdownify.csprojor - Install via nuget
dotnet add package DotMarkdownify
using Dotnet.Markdownify;
var html = await File.ReadAllTextAsync("input.html");
var converter = new MarkdownConverter();
var markdown = converter.Convert(html);
await File.WriteAllTextAsync("output.md", markdown);This repository comes with dotnet tool for conversion of HTML into Markdown via CLI.
There are 2 ways to consume the dotnet tool:
- Clone the repository
- Build Dotnet.Markdownify.Tool
- Locate *.nupkg file in repo directory
dotnet tool install -g dotnet.markdownify.tool --add-source .markdownify <Path to existing html> <Path to output markdown file>markdownify input.html output.htmlThis repository was inspired by python-markdownify and initially the C# code was meant to be a port from python-markdownify feature subset.