mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-05-31 12:14:44 -04:00
* Implemented methods to parse out the whole ComicInfo file and a mock ComicInfo from epub files. * Removed unused imports. ScanSeries needs to cleanup deleted chapters and call RefreshMetadata. Ensure after scan we cleanup tags without any series. * Random cleanup * Added some comments about data getting stale and not updating. * Removed old Summary methods in favor of the ComicInfo versions * Added a missing property * Fixed unit test
34 lines
1.5 KiB
C#
34 lines
1.5 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using API.Data.Metadata;
|
|
using API.Parser;
|
|
using VersOne.Epub;
|
|
|
|
namespace API.Interfaces.Services
|
|
{
|
|
public interface IBookService
|
|
{
|
|
int GetNumberOfPages(string filePath);
|
|
string GetCoverImage(string fileFilePath, string fileName);
|
|
Task<Dictionary<string, int>> CreateKeyToPageMappingAsync(EpubBookRef book);
|
|
|
|
/// <summary>
|
|
/// Scopes styles to .reading-section and replaces img src to the passed apiBase
|
|
/// </summary>
|
|
/// <param name="stylesheetHtml"></param>
|
|
/// <param name="apiBase"></param>
|
|
/// <param name="filename">If the stylesheetHtml contains Import statements, when scoping the filename, scope needs to be wrt filepath.</param>
|
|
/// <param name="book">Book Reference, needed for if you expect Import statements</param>
|
|
/// <returns></returns>
|
|
Task<string> ScopeStyles(string stylesheetHtml, string apiBase, string filename, EpubBookRef book);
|
|
ComicInfo GetComicInfo(string filePath);
|
|
ParserInfo ParseInfo(string filePath);
|
|
/// <summary>
|
|
/// Extracts a PDF file's pages as images to an target directory
|
|
/// </summary>
|
|
/// <param name="fileFilePath"></param>
|
|
/// <param name="targetDirectory">Where the files will be extracted to. If doesn't exist, will be created.</param>
|
|
void ExtractPdfImages(string fileFilePath, string targetDirectory);
|
|
}
|
|
}
|