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

Importing score data from URL #383

Open
manoskary opened this issue Oct 3, 2024 · 0 comments
Open

Importing score data from URL #383

manoskary opened this issue Oct 3, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@manoskary
Copy link
Member

I propose to integrate the possibility to load scores from URLs such as github raw URLs, drive or others. This can make demos with Partitura easier as well as easier working with remote resources.
To do this I propose adding a small check on all import functions to check if the directory provided is a URL or local.
Then the following part of code should be integrated:

if is_url(path):
    data = load_data_from_url(path)
    lines = data.split("\n")
else:
    if not osp.exists(path):
        raise FileNotFoundError(f"File not found: {path}")
    with open(path, "r") as f:
        lines = f.readlines()
        assert validate_format(lines)
@manoskary manoskary added the enhancement New feature or request label Oct 3, 2024
@manoskary manoskary self-assigned this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant