NovelEpubMaker 1.0.1

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

// Install NovelEpubMaker as a Cake Tool
#tool nuget:?package=NovelEpubMaker&version=1.0.1

NovelEpubMaker

NuGet version (NovelEpubMaker)

Novel epub production tool library.

小说 epub 电子书制作工具类库

Instructions 介绍

Novel Epub Maker is a .NET library for creating novel epub e-books. It does not depend on any third-party libraries, is lightweight and easy to use, and can be quickly adapted to scenarios such as novel production ebup and txt to epub.

Novel Epub Maker 是一个用于制作小说 epub 电子书的 .NET 类库。它不依赖任何第三方库,轻巧使用方便,可以快速适用于小说制作 ebup 和 txt 转 epub 等场景。

Usage 使用方法

Add this package.

Install-Package NovelEpubMaker

First, create a List<NovelContent> object to store the content of the novel's chapters:

首先创建一个 List<NovelContent> 对象,用于存放小说的章节内容:

private List<NovelContent> novellist = new List<NovelContent>{
    new NovelContent{
        Title = "第一章 测试",
        Content = "\r\n    开天辟地   \r\n  ABSCCCC \n  RRRRRR \n"
    },
    new NovelContent{
        Title = "第二章 测试二",
        Content = "\r\n    霹雳玄晶   \r\n  ABSCCCC \n  FFFFFF \n"
    }
};

Then create a NovelEpub object and set the related metadata, cover image, and novel content:

然后创建一个 NovelEpub 对象,并设置相关的元数据、封面图片和小说内容:

private string coverImage = "/9j/4QAYRX..........";
var epub = new NovelEpub(){
    Metadata = new EpubMetadata{
        Title = "测试小说",
        Author = "测试作者",
        Language = "zh-CN",
        Publisher = "测试出版社",
        Description = "测试描述",
        Subject = "测试主题,测试,主题",
        PublishDate = DateTime.Now.ToString("yyyy-MM-dd")
    },
    CoverBase64 = coverImage,
    NovelList = novellist
};

Finally, call the SaveBytesAsync method to save the generated epub e-book to a file:

最后调用 SaveBytesAsync 方法将生成的 epub 电子书保存到文件:

var btyes = await epub.SaveBytesAsync();
await File.WriteAllBytesAsync("test.epub", btyes);
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

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.0.1 170 7/5/2023