public async void TestBookParsingAsync(string filePath) { // Create the book and start testing it EpubBook book = await EpubReader.ReadBookAsync(filePath); TestBook(book); }
private static async Task Main() { const string filename = "1.epub"; var bytes = await File.ReadAllBytesAsync(filename); var stream = new MemoryStream(bytes); var book = await EpubReader.ReadBookAsync(stream); var bookFromFile = await EpubReader.ReadBookAsync(filename); var contentAsPlainText = book.ContentAsPlainText; var chaptersAsPlainText = book.ChaptersAsPlainTexts; var totalCharactersCount = book.TotalCharactersCount; var totalWordsCount = book.TotalWordsCount; var wordsCountInChapters = book.WordsCountInChapters; var charactersCountInChapters = book.CharactersCountInChapters; }
public async Task <EpubBook> OpenBookAsync(int bookId) { EpubBook epubBook = await EpubReader.ReadBookAsync(settings.Books.First(book => book.Id == bookId).FilePath); return(epubBook); }
public async Task <EpubBook> OpenBookAsync(int bookId) { EpubBook epubBook = await EpubReader.ReadBookAsync("C:\\Users\\edoua\\OneDrive\\Documents\\Livres\\Private Prince\\Private Prince 1.epub"); return(epubBook); }