Skip to main content

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

https://github.com/MacHu-GWU/git_web_url-project/workflows/CI/badge.svg https://codecov.io/gh/MacHu-GWU/git_web_url-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/git-web-url.svg https://img.shields.io/pypi/l/git-web-url.svg https://img.shields.io/pypi/pyversions/git-web-url.svg https://img.shields.io/badge/Release_History!--None.svg?style=social https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

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

  1. 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
  1. 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

git_web_url-0.1.2.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_web_url-0.1.2-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file git_web_url-0.1.2.tar.gz.

File metadata

  • Download URL: git_web_url-0.1.2.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.11

File hashes

Hashes for git_web_url-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0231078c3ca46de80dcc299a009b37ee73929adcc260e0550fb4a1fbe9e4c7cf
MD5 04349d85f8f400bef4908fbec8404dac
BLAKE2b-256 874131072bf5dcee9dfa4fb7912e9b756fa788fc07580a9b028b61e1d13bcdd3

See more details on using hashes here.

File details

Details for the file git_web_url-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: git_web_url-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.11

File hashes

Hashes for git_web_url-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 358a2a67118600cf2d65934485840c1aff4e313f5da60e32593fc62d506828dc
MD5 e3a1702f693f3fb38a3283cf8a58adf6
BLAKE2b-256 00b8d29153fe78d53446544a5e22c80cdbe8ca559faa62f347c4d3eddcae5ece

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page