-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Parsing EPUB 3 navigation document * Parsing linear reading order * Changes to WpfDemo to use the new version of the library * General refactoring * Documentation update
- Loading branch information
Showing
96 changed files
with
2,449 additions
and
890 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
|
||
namespace VersOne.Epub.NetCoreDemo | ||
{ | ||
internal static class PrintNavigation | ||
{ | ||
public static void Run(string filePath) | ||
{ | ||
using (EpubBookRef bookRef = EpubReader.OpenBook(filePath)) | ||
{ | ||
Console.WriteLine("Navigation:"); | ||
foreach (EpubNavigationItemRef navigationItemRef in bookRef.GetNavigation()) | ||
{ | ||
PrintNavigationItem(navigationItemRef, 0); | ||
} | ||
} | ||
Console.WriteLine(); | ||
} | ||
|
||
private static void PrintNavigationItem(EpubNavigationItemRef navigationItemRef, int identLevel) | ||
{ | ||
Console.Write(new string(' ', identLevel * 2)); | ||
Console.WriteLine(navigationItemRef.Title); | ||
foreach (EpubNavigationItemRef nestedNavigationItemRef in navigationItemRef.NestedItems) | ||
{ | ||
PrintNavigationItem(nestedNavigationItemRef, identLevel + 1); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.