A CLI tool and also a Python library can print the url of a local file in a git repo so you can one-click to open it in web browser.
Project description
Welcome to git_web_url Documentation
git_web_url is a CLI tool and also a Python library can print the url of a local file in a git repo so you can one-click to open it in web browser.
Currently it supports:
GitHub
GitHub Enterprise
GitLab
GitLab Enterprise
BitBucket
BitBucket Enterprise
AWS CodeCommit
Usage Example
Auto-discover the git repo:
cd into your git repo directory, or any folder inside, then run gwu, it prints the url for the current branch and the current directory:
$ gwu # or gitweburl
https://github.com/your_account/your_repo/tree/your_branch/path/to/current_directory
Explicitly specify the file or folder:
copy the absolute path of the file or folder in your local git repo, then run gwu ${absolute_path_here}:
$ gwu /Users/myusername/GitHub/your_repo/path/to/your_file
https://github.com/your_account/your_repo/tree/your_branch/path/to/current_directory
Install
git_web_url is released on PyPI, so all you need is to:
$ pip install git-web-url
To upgrade to latest version:
$ pip install --upgrade git-web-url
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_web_url-0.1.3.tar.gz.
File metadata
- Download URL: git_web_url-0.1.3.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d31d4eb022d511445058e4630122a5ed40ec74237e5d4ffe995858038cf533b4
|
|
| MD5 |
cfb2ee584ae607a6fdb895b1dc6dbb10
|
|
| BLAKE2b-256 |
5e277e945069f5c6f79e67b658e79275e7d5cee3a0d7c6c0f54919a0b71d97ad
|
File details
Details for the file git_web_url-0.1.3-py3-none-any.whl.
File metadata
- Download URL: git_web_url-0.1.3-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb9f9070ba8a9efd0caf04ba2e09a0e9f9640feed724529295e74234899b85cb
|
|
| MD5 |
0ae5327b4a674e8b62b8d04a2ff8d3e7
|
|
| BLAKE2b-256 |
08237403a9b49291a2f0e1468df0c17a8bcd0cc8dadce07b2feae125336595bb
|