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

Get gist from url #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

hipstersmoothie
Copy link

Currently idk of a way to get the file from the url. URLs do not respect capitalization, and the gist url needs the correct capitalization to get the file. So the user still has to supply the file as a separate property.

closes #3

Copy link
Owner

@tleunen tleunen left a comment

Choose a reason for hiding this comment

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

Thank you @hipstersmoothie, and really sorry for the delay.

@@ -32,13 +32,32 @@ React.render(
);
```

Gist from URL:

***NOTE: File cannot be parse from the URL. Supply as separate property.***
Copy link
Owner

@tleunen tleunen Jun 22, 2018

Choose a reason for hiding this comment

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

Any reason to this?
I'd say it would be best to get the filename from the url as well.

From a use case perspective, would a user know the url without the file, or everything at once? Like the following url: https://gist.github.com/ringods/5995ea726914f280afb3#file-chef-dockerfile

Copy link

Choose a reason for hiding this comment

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

Hi @tleunen,

I think it's because you can’t extract the filename from the URL as he said.

As example, by parsing the filename from the url https://gist.github.com/ringods/5995ea726914f280afb3#file-chef-dockerfile, we would get file-chef-dockerfile or maybe chef-dockerfile instead of the real filename which is Chef-Dockerfile.

So, if someone needs to get the real filename on the iframe#id, I think this developer would have to use the Gist#file property.

What do you think?

Copy link

Choose a reason for hiding this comment

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

Hi @tleunen, any news? :/

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.

Feature Request: Parse id, username, filename from the Gist
3 participants