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

normalize_service #83

Open
kpcyrd opened this issue Mar 5, 2019 · 0 comments
Open

normalize_service #83

kpcyrd opened this issue Mar 5, 2019 · 0 comments

Comments

@kpcyrd
Copy link
Owner

kpcyrd commented Mar 5, 2019

Writing the first few modules that operate on scripts it seems that services are very commonly referred to as github instead of github.com.

Basically every module would have to setup a mapping, instead we could have a function that normalizes them. I have somewhat mixed feelings about that since it's sort of an unusual function to add compared to the others, but probably currently the easiest way forward.

normalize_service('Github') -> 'github.com'
normalize_service('instagram') -> 'instagram.com'
normalize_service('hackernews') -> 'news.ycombinator.com'

If this function turns out to be a bad idea we can still deprecate and eventually remove it again.

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

1 participant