Skip to content

Commit

Permalink
Add readme and small icon
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Nov 29, 2023
1 parent ab08c80 commit 1f892b1
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Epub.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
src\Directory.props = src\Directory.props
src\Directory.targets = src\Directory.targets
readme.md = readme.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "src\Tests\Tests.csproj", "{73C16DA3-85DF-414E-9FC2-67451B260FAD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "src\Tests\Tests.csproj", "{73C16DA3-85DF-414E-9FC2-67451B260FAD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Binary file added assets/img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
![Icon](https://raw.githubusercontent.com/devlooped/epub/main/assets/img/icon.png) EPUB
============

Lightweight read-only API for processing EPUB documents.

[![Version](https://img.shields.io/nuget/v/Devlooped.Epub.svg?color=royalblue)](https://www.nuget.org/packages/Devlooped.Epub)
[![Downloads](https://img.shields.io/nuget/dt/Devlooped.Epub.svg?color=green)](https://www.nuget.org/packages/Devlooped.Epub)
[![License](https://img.shields.io/github/license/devlooped/epub.svg?color=blue)](https://github.com/devlooped/epub/blob/main/license.txt)
[![Build](https://github.com/devlooped/epub/workflows/build/badge.svg?branch=main)](https://github.com/devlooped/epub/actions)

<!-- #content -->
## Usage

```csharp
using var pub = Publication.Open(@"Samples/how-to-think-about-the-economy.epub");

Assert.Equal("How to Think about the Economy", pub.Package.Title);
Assert.Equal("en-US", pub.Package.Language);

foreach (var content in pub.Package.Navigation)
{
XDocument doc = content.Open();

// Useful in conjunction with Devlooped.Web for CSS-selectors
string? title = doc.CssSelectElement("head title")?.Value;
// ...
}
```

<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
4 changes: 4 additions & 0 deletions src/Epub/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- include ../../readme.md#content -->

<!-- Exclude from auto-expansion by devlooped/actions-include GH action -->
<!-- exclude -->

0 comments on commit 1f892b1

Please sign in to comment.