mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-16 13:22:40 +00:00
Included epub library in plugin project
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
namespace VersOne.Epub
|
||||
{
|
||||
public class EpubByteContentFile : EpubContentFile
|
||||
{
|
||||
public byte[] Content { get; set; }
|
||||
}
|
||||
}
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@@ -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; }
|
||||
}
|
||||
}
|
@@ -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; }
|
||||
}
|
||||
}
|
@@ -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
|
||||
}
|
||||
}
|
@@ -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; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
namespace VersOne.Epub
|
||||
{
|
||||
public class EpubTextContentFile : EpubContentFile
|
||||
{
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user