FlafyDev / epub_reader

An open source book reader developed in Flutter
GNU General Public License v3.0
103 stars 15 forks source link

assets/index.html file is missing #17

Open kartik-techtonic opened 1 year ago

kartik-techtonic commented 1 year ago

After downloading a file from the browser, loading it in the app using the file picker and then trying to open that file results in this error.

Unhandled Exception: Unable to load asset: "assets/index.html".

Below given is the screenshot of the error.

https://prnt.sc/R9RTNwvDFL97

Can somebody help me out with the error.

Thanks.

FlafyDev commented 1 year ago

Have you compiled the app yourself? If so, then look at the instructions in the README, "Running from source". You probably didn't compile index.html.

kartik-techtonic commented 1 year ago

After adding index.html from web folder to assets folder. I am no longer facing the index.html missing issue but I am unable to open any of the .epub files in the app on the android emulator.

Some shows "Incorrect EPUB manifest" error with some of the .xhtml file missing. While other gets added to the app but does not open.

Does your epub reader supports all of the 3 available formats (OCF, OPF, OPS) of epub files? Which version of the epub files (2, 3, 3.2) your epub reader supports?

It is throwing error of some .xhtml file missing for epub3 file.

How can I use your product as a stand alone project? If you have any documentation or video tutorial about the same please let me know.

Hoping to hear from you soon. Thanks.

On Thu, 22 Jun 2023 at 13:43, Flafy @.***> wrote:

Have you compiled the app yourself? If so, then look at the instructions in the README, "Running from source". You probably didn't compile index.html.

— Reply to this email directly, view it on GitHub https://github.com/FlafyDev/epub_reader/issues/17#issuecomment-1602208819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYQGMJAHOXUMJXLWQZ4M3VTXMP5D7ANCNFSM6AAAAAAZPWFCEA . You are receiving this because you authored the thread.Message ID: @.***>

FlafyDev commented 1 year ago

The project is supposed to work with both ePub 2 and 3. But some ePub files may not work due to parsing errors. ePub files may fail either because the ePub file doesn't follow the specification correctly or the project doesn't handle the ePub file correctly.

Try several ePub files and see if one of them works.

How can I use your product as a stand alone project? If you have any documentation or video tutorial about the same please let me know.

Are you asking where the ePub parser's code is located? It's https://github.com/FlafyDev/dart-epubz

kartik-techtonic commented 1 year ago

The project is supposed to work with both ePub 2 and 3. But some ePub files may not work due to parsing errors. ePub files may fail either because the ePub file doesn't follow the specification correctly or the project doesn't handle the ePub file correctly.

Try several ePub files and see if one of them works.

How can I use your product as a stand alone project? If you have any documentation or video tutorial about the same please let me know.

Are you asking where the ePub parser's code is located? It's https://github.com/FlafyDev/dart-epubz

Thanks for the reply.

Can you help me with few more things

Thanks again.

FlafyDev commented 1 year ago

How can I integrate this ePub parser code into my project. By using epubz as a pkg in pubspec.yaml file?

To add the ePub parser as a dependency for a dart/flutter project, add the following to the pubspec.yaml file:

dependencies:
  epubz:
    git:
      url: https://github.com/FlafyDev/dart-epubz.git
      ref: dev

An example of how to parse an ePub file: https://github.com/flafydev/dart-epubz#example

Do I have to set-up the configuration of the epub reader before opening a file or does it have a predefined configuration by default?

The ePub reader has book specific configurations and global configurations. Styling of each book is not global.

Does it support TTS, Day/Night mode?

Yeah, this ePub reader supports both dark and light modes

kartik-techtonic commented 1 year ago

Thanks, I'll check it out.

On Thu, 22 Jun 2023 at 16:30, Flafy @.***> wrote:

How can I integrate this ePub parser code into my project. By using epubz as a pkg in pubspec.yaml file? To add the ePub parser as a dependency for a dart/flutter project, add the following to the pubspec.yaml file:

dependencies: epubz: git: url: https://github.com/FlafyDev/dart-epubz.git ref: dev

An example of how to parse an ePub file: https://github.com/flafydev/dart-epubz#example

Do I have to set-up the configuration of the epub reader before opening a file or does it have a predefined configuration by default? The ePub reader has book specific configurations and global configurations. Styling of each book is not global.

Does it support TTS, Day/Night mode? Yeah, this ePub reader supports both dark and light modes

— Reply to this email directly, view it on GitHub https://github.com/FlafyDev/epub_reader/issues/17#issuecomment-1602439393, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYQGMJBFKAWCVCXFHC52RRTXMQQVHANCNFSM6AAAAAAZPWFCEA . You are receiving this because you authored the thread.Message ID: @.***>

kartik-techtonic commented 1 year ago

How can I integrate this ePub parser code into my project. By using epubz as a pkg in pubspec.yaml file?

To add the ePub parser as a dependency for a dart/flutter project, add the following to the pubspec.yaml file:

dependencies:
  epubz:
    git:
      url: https://github.com/FlafyDev/dart-epubz.git
      ref: dev

An example of how to parse an ePub file: https://github.com/flafydev/dart-epubz#example

Do I have to set-up the configuration of the epub reader before opening a file or does it have a predefined configuration by default?

The ePub reader has book specific configurations and global configurations. Styling of each book is not global.

Does it support TTS, Day/Night mode?

Yeah, this ePub reader supports both dark and light modes

I just downloaded some epub files from https://idpf.github.io/epub3-samples/30/samples.html

none of these files are opening in the app, although few of them gets loaded into the app but none of them is opening.

FlafyDev commented 1 year ago

I just tried a random book (The Voyage of Life) from the list you provided and it loaded up just fine.. Maybe try the apk in the releases? could be that your index.html or something is bad