Skip to content

Commit

Permalink
Merge pull request orthros#55 from orthros/dev
Browse files Browse the repository at this point in the history
Version 2.0.6
  • Loading branch information
orthros authored May 22, 2019
2 parents 7dffcf8 + 02e1f08 commit 51aee96
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## Unreleased

## [2.0.6] - 2019-05-22
### Fixed
- Fixed Issue #35: File cannot be opened if its path is url-encoded in the manifest
- Updated `examples/dart_ex` to have a README as well as use a locally stored file.

## [2.0.5] - 2019-05-16
### Changed
- Exposed `EpubChapterRef` to consumers.
Expand Down
9 changes: 9 additions & 0 deletions example/dart_ex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# dart_ex

An example of using the `epub` library in a "standard" command line application.

## To Run

```shell
dart example.dart
```
Binary file added example/dart_ex/alicesAdventuresUnderGround.epub
Binary file not shown.
4 changes: 2 additions & 2 deletions example/dart_ex/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:epub/epub.dart';

main(List<String> args) async {
//Get the epub into memory somehow
String fileName = "hittelOnGoldMines.epub";
String fullPath = path.join(io.Directory.current.path, 'test', fileName);
String fileName = "alicesAdventuresUnderGround.epub";
String fullPath = path.join(io.Directory.current.path, fileName);
var targetFile = new io.File(fullPath);
List<int> bytes = await targetFile.readAsBytes();

Expand Down
8 changes: 6 additions & 2 deletions example/flutter_ex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ A sample application that fetches an epub from a given URL and displays the Titl

Place a URL in the text box (e.g. https://www.gutenberg.org/ebooks/11.epub.images), hit the "Inspect Book" button and watch the application download the book and extract some relevant information.

## Example
## Examples

![](example.png)
### With Cover Image
![](examplewithcover.png)

### Without Cover Image
![](example.png)
Binary file added example/flutter_ex/examplewithcover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions example/flutter_ex/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ dependencies:

image: ^2.0.0

dependency_overrides:
epub:
path: ../../

dev_dependencies:
flutter_test:
sdk: flutter
Expand Down
4 changes: 2 additions & 2 deletions lib/src/readers/content_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ContentReader {
EpubTextContentFileRef epubTextContentFile =
new EpubTextContentFileRef(bookRef);
{
epubTextContentFile.FileName = fileName;
epubTextContentFile.FileName = Uri.decodeFull(fileName);
epubTextContentFile.ContentMimeType = contentMimeType;
epubTextContentFile.ContentType = contentType;
}
Expand Down Expand Up @@ -64,7 +64,7 @@ class ContentReader {
EpubByteContentFileRef epubByteContentFile =
new EpubByteContentFileRef(bookRef);
{
epubByteContentFile.FileName = fileName;
epubByteContentFile.FileName = Uri.decodeFull(fileName);
epubByteContentFile.ContentMimeType = contentMimeType;
epubByteContentFile.ContentType = contentType;
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: epub
version: 2.0.5
author: Colin Nelson <[email protected]>
version: 2.0.6
author: Colin Nelson <[email protected]>
description: Epub Parser for Dart. Suitable for use on the Server, the Web, or in Flutter
homepage: https://github.com/orthros/dart-epub
environment:
Expand Down

0 comments on commit 51aee96

Please sign in to comment.