githyperlink
Get a link to the hosted html version of a git-tracked file or directory.
This is relevant only for git remotes that serve html, like github and gitlab.
Usage
$ gethyperlink [PATH]
(Note the spelling here: get hyperlink).
If PATH is not specified, a link for the current directory is given.
Example
$ cd my-pretty-repo/subdir
$ gethyperlink somefile.jl
https://github.com/yourname/my-pretty-repo/blob/main/subdir/somefile.jl
You might want to define an alias, for example, in ~/.bashrc:
alias gl="gethyperlink" # Or maybe 'gurl' (get url) 💅
Direct usage in Python
from githyperlink import get_hyperlink
print(get_hyperlink(__file__))
# → https://gitlab.com/you/my_scripts/blob/main/this_script.py
The argument to get_hyperlink can be a string, as above, or a pathlib.Path.
Installation
pip install githyperlink
This will get you the
and makes the command-line tool gethyperlink globally available.
To upgrade an existing installation to the version above, use pip install -U githyperlink.
Requires Python ≥ 3.9.
Features
-
gitis called directly, in a subprocess: this is faster than the default usage ofGitPython, and spares a dependency. (Currently, we only depend onclick). -
Not many features.
This makes the source code easier to grok, and easier to modify for your own purposes.
Metadata
Release files for githyperlink 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| githyperlink-0.1.tar.gz | 4.6 kB | Without provenance | Details for githyperlink-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| githyperlink-0.1-py3-none-any.whl | Python 3 | none | any | Details for githyperlink-0.1-py3-none-any.whl |
Total release size: 9.6 kB
Release files / githyperlink-0.1.tar.gz
| Download URL | githyperlink-0.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f412cec542ddfff9bef003d31ed5b4b62b8c08324ee2da14bf8555fc79a95954
|
|
BLAKE2b-256 checksum How to use checksums |
72d6c7e2e56fb0e9cbf8e79b9d6104e4110e119c4e44b3fa4d9f2ea7b608f051
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / githyperlink-0.1-py3-none-any.whl
| Download URL | githyperlink-0.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bf22a5ebc62c1586151361c57eb1b3ae85255fdce5096e35c0ae73642d506f1
|
|
BLAKE2b-256 checksum How to use checksums |
85789c1c52c8ea0c1c6467fd9de7f16d45a0e527d9d1258f2a53d13077901016
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for githyperlink 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.