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

Add support to parse files on local file system. #778

Open
jeremyje opened this issue Mar 3, 2023 · 1 comment
Open

Add support to parse files on local file system. #778

jeremyje opened this issue Mar 3, 2023 · 1 comment

Comments

@jeremyje
Copy link

jeremyje commented Mar 3, 2023

Is your feature request related to a problem? Please describe.
It'd be nice if Ferret could parse HTML files that are on the file system.

Describe the solution you'd like
Enhance the HTTP driver to accept file:// URLs. Most of the mechanics of the HTTP work well for a local file. The cookies can be stubbed to nil since there's no HTTP context.

Describe alternatives you've considered
It's possible to run an HTTP server within process but for large scale data processing this becomes inefficient.
I've written #777 and it appears to work within my code (not public yet).

Additional context
Add any other context or screenshots about the feature request here.

@ziflex
Copy link
Member

ziflex commented Mar 6, 2023

Hey,

Have you tried to use the following query?

LET bin = IO::FS::READ(@filepath)
LET doc = PARSE(TO_STRING(bin))

RETURN doc.innerHtml

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

No branches or pull requests

2 participants