Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add epub file reader support #236

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

m1911star
Copy link

since I have too many epub files, I tried to add epub reader

deps

Copy link

vercel bot commented Nov 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
llama-index-ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 1:30am

Copy link
Contributor

sweep-ai bot commented Nov 25, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

@yisding
Copy link
Contributor

yisding commented Nov 28, 2023

Thanks for doing this! Is this ready to merge?

@m1911star
Copy link
Author

Thanks for doing this! Is this ready to merge?

nope. I need more tests.

@m1911star
Copy link
Author

I'm not sure is there any ci for nextjs app? Or should I test it in playground?

README.md Outdated Show resolved Hide resolved
@EmanuelCampos
Copy link
Collaborator

looks cool!

bump @m1911star any update here?

@m1911star
Copy link
Author

looks cool!

bump @m1911star any update here?

hi there, sorry for the late reply. I just got back from vacation. Currently, I am still looking for a suitable parser to adapt.
Will move forward in the next two weeks.

Copy link

changeset-bot bot commented Mar 11, 2024

⚠️ No Changeset found

Latest commit: 43d36b8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Collaborator

@marcusschiesser marcusschiesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @m1911star looking good. Please have a look at the comments and also run pnpx changeset in root to generate a changeset file

packages/core/package.json Outdated Show resolved Hide resolved
@m1911star
Copy link
Author

let's have a try

@m1911star m1911star marked this pull request as ready for review April 17, 2024 13:38
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this example taken from? what license?

packages/core/src/readers/EpubReader.ts Outdated Show resolved Hide resolved
packages/core/src/readers/EpubReader.ts Outdated Show resolved Hide resolved
@@ -1,6 +1,7 @@
export * from "./AssemblyAIReader.js";
export * from "./CSVReader.js";
export * from "./DocxReader.js";
export * from "./EpubReader.js";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer not to export this to root. And be careful with edge runtime

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we download from somewhere instead of leave it here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep. will remove it

async function main() {
// Load PDF
const reader = new EpubReader();
const documents = await reader.loadData("data/wells.epub");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m1911star you can load the ebub from an URL here instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants