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

support local rss file #20

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Cyrix126
Copy link

Just a proof of concept.

At the moment of fetching the url, it checks if it contains "http" in the url. If it doesn't, it tries to load it as a file.

It's very simple but too rudimentary, a lot of things could go wrong (for example if a file name contain the word http), but it works for me with this small change.

@Cyrix126 Cyrix126 mentioned this pull request Apr 14, 2023
1 task
@ckampfe
Copy link
Owner

ckampfe commented Apr 15, 2023

@Cyrix126 thank you very much for the proof of concept, this should absolutely be doable. I just need to figure out the best way to integrate it. Thanks.

@slundi
Copy link

slundi commented Apr 4, 2024

@Cyrix126 thank you very much for the proof of concept, this should absolutely be doable. I just need to figure out the best way to integrate it. Thanks.

Hi,
Maybe by trying an Url.parse and if it you got an Err as a result, read the file locally?

Copy link

@slundi slundi left a comment

Choose a reason for hiding this comment

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

Line 250: use starts_with instead of contains

There is this little discution about it: https://users.rust-lang.org/t/detect-url-or-path/25300

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.

3 participants