vcslinks

Get URLs to commit/file/log/etc. pages in GitHub/GitLab/Bitbucket


License
MIT
Install
pip install vcslinks==0.1.2

Documentation

vcslinks: Get URLs to commit/file/log/etc. pages in GitHub/GitLab/Bitbucket

Latest Documentation PyPI - Python Version Build Status Test Coverage mypy black GitHub commits since tagged version

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.