Included epub library in plugin project

This commit is contained in:
Marco Gavelli
2018-07-16 10:06:17 +02:00
parent a78428c698
commit a82cacd126
57 changed files with 57 additions and 61 deletions

View File

@@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace VersOne.Epub
{
public class EpubBook
{
public string FilePath { get; set; }
public string Title { get; set; }
public string Author { get; set; }
public List<string> AuthorList { get; set; }
public EpubSchema Schema { get; set; }
public EpubContent Content { get; set; }
public byte[] CoverImage { get; set; }
public List<EpubChapter> Chapters { get; set; }
}
}

View File

@@ -0,0 +1,7 @@
namespace VersOne.Epub
{
public class EpubByteContentFile : EpubContentFile
{
public byte[] Content { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace VersOne.Epub
{
public class EpubChapter
{
public string Title { get; set; }
public string ContentFileName { get; set; }
public string Anchor { get; set; }
public string HtmlContent { get; set; }
public List<EpubChapter> SubChapters { get; set; }
public override string ToString()
{
return String.Format("Title: {0}, Subchapter count: {1}", Title, SubChapters.Count);
}
}
}

View File

@@ -0,0 +1,13 @@
using System.Collections.Generic;
namespace VersOne.Epub
{
public class EpubContent
{
public Dictionary<string, EpubTextContentFile> Html { get; set; }
public Dictionary<string, EpubTextContentFile> Css { get; set; }
public Dictionary<string, EpubByteContentFile> Images { get; set; }
public Dictionary<string, EpubByteContentFile> Fonts { get; set; }
public Dictionary<string, EpubContentFile> AllFiles { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace VersOne.Epub
{
public abstract class EpubContentFile
{
public string FileName { get; set; }
public EpubContentType ContentType { get; set; }
public string ContentMimeType { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
namespace VersOne.Epub
{
public enum EpubContentType
{
XHTML_1_1 = 1,
DTBOOK,
DTBOOK_NCX,
OEB1_DOCUMENT,
XML,
CSS,
OEB1_CSS,
IMAGE_GIF,
IMAGE_JPEG,
IMAGE_PNG,
IMAGE_SVG,
FONT_TRUETYPE,
FONT_OPENTYPE,
OTHER
}
}

View File

@@ -0,0 +1,11 @@
using VersOne.Epub.Schema;
namespace VersOne.Epub
{
public class EpubSchema
{
public EpubPackage Package { get; set; }
public EpubNavigation Navigation { get; set; }
public string ContentDirectoryPath { get; set; }
}
}

View File

@@ -0,0 +1,7 @@
namespace VersOne.Epub
{
public class EpubTextContentFile : EpubContentFile
{
public string Content { get; set; }
}
}