vcslinks: Get URLs to commit/file/log/etc. pages in GitHub/GitLab/Bitbucket
vcslinks is a Python package for analyzing a local Git repository to
find a URL for web pages in the hosted services like GitHub, GitLab,
and Bitbucket. For example, a permalink to the file setup.py
with
lines 5 to 10 highlighted can be obtained by
>>> import vcslinks
>>> vcslinks.file("setup.py", lines=(5, 10))
'https://github.com/USER/PROJECT/blob/55150afe539493d650889224db136bc8d9b7ecb8/setup.py#L5-L10'
vcslinks also comes with command line program vcsbrowse for opening relevant pages of GitHub/GitLab/Bitbucket in web browser.