Metadata-Version: 2.1
Name: git_web_url
Version: 0.1.2
Summary: 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.
Home-page: https://github.com/MacHu-GWU/git_web_url-project
Download-URL: https://pypi.python.org/pypi/git_web_url/0.1.2#downloads
Author: Sanhe Hu
Author-email: husanhe@gmail.com
Maintainer: Sanhe Hu
Maintainer-email: husanhe@gmail.com
License: MIT
Platform: Windows
Platform: MacOS
Platform: Unix
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
License-File: LICENSE.txt
License-File: AUTHORS.rst
Requires-Dist: fire<1.0.0,>=0.1.3
Provides-Extra: tests
Requires-Dist: pytest; extra == "tests"
Requires-Dist: pytest-cov; extra == "tests"
Provides-Extra: docs
Requires-Dist: Sphinx==5.3.0; extra == "docs"
Requires-Dist: sphinx-jinja==2.0.2; extra == "docs"
Requires-Dist: sphinx-copybutton==0.5.1; extra == "docs"
Requires-Dist: sphinx-design==0.5.0; extra == "docs"
Requires-Dist: furo==2023.03.27; extra == "docs"
Requires-Dist: nbsphinx==0.8.12; extra == "docs"
Requires-Dist: rstobj==1.2.1; extra == "docs"
Requires-Dist: pygments==2.15.1; extra == "docs"
Requires-Dist: ipython==8.10.0; extra == "docs"
Requires-Dist: docfly==2.0.1; extra == "docs"


.. .. image:: https://readthedocs.org/projects/git-web-url/badge/?version=latest
    :target: https://git-web-url.readthedocs.io/en/latest/
    :alt: Documentation Status

.. image:: https://github.com/MacHu-GWU/git_web_url-project/workflows/CI/badge.svg
    :target: https://github.com/MacHu-GWU/git_web_url-project/actions?query=workflow:CI

.. image:: https://codecov.io/gh/MacHu-GWU/git_web_url-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/git_web_url-project

.. image:: https://img.shields.io/pypi/v/git-web-url.svg
    :target: https://pypi.python.org/pypi/git-web-url

.. image:: https://img.shields.io/pypi/l/git-web-url.svg
    :target: https://pypi.python.org/pypi/git-web-url

.. image:: https://img.shields.io/pypi/pyversions/git-web-url.svg
    :target: https://pypi.python.org/pypi/git-web-url

.. image:: https://img.shields.io/badge/Release_History!--None.svg?style=social
    :target: https://github.com/MacHu-GWU/git_web_url-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
    :target: https://github.com/MacHu-GWU/git_web_url-project

------

.. .. image:: https://img.shields.io/badge/Link-Document-blue.svg
    :target: https://git-web-url.readthedocs.io/en/latest/

.. .. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://git-web-url.readthedocs.io/en/latest/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/git_web_url-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/git_web_url-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/git_web_url-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/git-web-url#files


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:

.. code-block:: bash

    $ gwu # or gitweburl
    https://github.com/your_account/your_repo/tree/your_branch/path/to/current_directory


2. **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}``:

.. code-block:: bash

    $ 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:

Install
------------------------------------------------------------------------------

``git_web_url`` is released on PyPI, so all you need is to:

.. code-block:: console

    $ pip install git-web-url

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade git-web-url
