============
pygments-git
============
.. image:: https://img.shields.io/github/actions/workflow/status/adamchainz/pygments-git/main.yml?branch=main&style=for-the-badge
:target: https://github.com/adamchainz/pygments-git/actions?workflow=CI
.. image:: https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge
:target: https://github.com/adamchainz/pygments-git/actions?workflow=CI
.. image:: https://img.shields.io/pypi/v/pygments-git.svg?style=for-the-badge
:target: https://pypi.org/project/pygments-git/
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge
:target: https://github.com/psf/black
.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge
:target: https://github.com/pre-commit/pre-commit
:alt: pre-commit
Pygments lexers for Git output and files.
Installation
============
Use **pip**:
.. code-block:: sh
python -m pip install pygments-git
Python 3.8 to 3.12 supported.
----
**Working on a Django project?**
Improve your skills with `one of my books <https://adamj.eu/books/>`__.
----
Usage
=====
With the package installed, Pygments will autodiscover the below lexers.
When using Pygments directly, you can refer to them by name.
Within Sphinx/docutils, you can refer to them in ``code-block`` directives:
.. code-block:: restructuredtext
.. code-block:: git-console
$ git log --oneline
82fbbd3 D'oh! Fix math proof
91e9879 Aye carumba! Grammar mistake
61c4c08 Cowabunga! Update bibliography
To preview the lexers, open the ``tests/index.html`` file within the repository.
``git-attributes``
-------------------------
A lexer for |.gitattributes files|__.
.. |.gitattributes files| replace:: ``.gitattributes`` files
__ https://git-scm.com/docs/gitattributes
``git-blame-ignore-revs``
-------------------------
A lexer for the file format used by |blame.ignoreRevsFile|__.
The de facto name for a repository-wide ignore file is ``.git-blame-ignore-revs``, as recognized `by GitHub <https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view>`__ and potentially other Git hosting services.
.. |blame.ignoreRevsFile| replace:: ``blame.ignoreRevsFile``
__ https://git-scm.com/docs/git-blame#Documentation/git-blame.txt-blameignoreRevsFile
``git-commit-edit-msg``
-----------------------
A lexer for the ``COMMIT_EDITMSG`` file that Git opens when you run ``git commit``.
It calls out to |DiffLexer|__ for highlighting any diff, as added by |git commit --verbose|__.
.. |DiffLexer| replace:: ``DiffLexer``
__ https://pygments.org/docs/lexers/#pygments.lexers.diff.DiffLexer
.. |git commit --verbose| replace:: ``git commit --verbose``
__ https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--v
``git-conflict-markers``
------------------------
A lexer for the conflict markers that Git adds to indicate conflicts during a merge.
All other text in the file is lexed as plain text.
``git-console``
---------------
A lexer for interactive shell sessions with Git.
It calls out to |BashLexer|__ for highlighting commands on lines starting with a ``$`` and |DiffLexer2|__ for highlighting inline diffs.
.. |BashLexer| replace:: ``BashLexer``
__ https://pygments.org/docs/lexers/#pygments.lexers.shell.BashLexer
.. |DiffLexer2| replace:: ``DiffLexer``
__ https://pygments.org/docs/lexers/#pygments.lexers.diff.DiffLexer
``git-rebase-todo``
-------------------
A lexer for the ``git-rebase-todo`` file that Git opens when you run |git rebase --interactive|__.
It calls out to |BashLexer2|__ for highlighting commands on lines starting with ``x`` or ``exerc`` a ``$`` and |DiffLexer3|__ for highlighting inline diffs.
.. |git rebase --interactive| replace:: ``git rebase --interactive``
__ https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt--i
.. |BashLexer2| replace:: ``BashLexer``
__ https://pygments.org/docs/lexers/#pygments.lexers.shell.BashLexer
.. |DiffLexer3| replace:: ``DiffLexer``
__ https://pygments.org/docs/lexers/#pygments.lexers.diff.DiffLexer
Raw data
{
"_id": null,
"home_page": "https://github.com/adamchainz/pygments-git",
"name": "pygments-git",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "Pygments,Git",
"author": "Adam Johnson",
"author_email": "me@adamj.eu",
"download_url": "https://files.pythonhosted.org/packages/84/54/d35805b61f1bc1515a7caacc4b677865a50b2cec5892cfd527eac8e10247/pygments_git-1.7.0.tar.gz",
"platform": null,
"description": "============\npygments-git\n============\n\n.. image:: https://img.shields.io/github/actions/workflow/status/adamchainz/pygments-git/main.yml?branch=main&style=for-the-badge\n :target: https://github.com/adamchainz/pygments-git/actions?workflow=CI\n\n.. image:: https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge\n :target: https://github.com/adamchainz/pygments-git/actions?workflow=CI\n\n.. image:: https://img.shields.io/pypi/v/pygments-git.svg?style=for-the-badge\n :target: https://pypi.org/project/pygments-git/\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge\n :target: https://github.com/psf/black\n\n.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge\n :target: https://github.com/pre-commit/pre-commit\n :alt: pre-commit\n\nPygments lexers for Git output and files.\n\nInstallation\n============\n\nUse **pip**:\n\n.. code-block:: sh\n\n python -m pip install pygments-git\n\nPython 3.8 to 3.12 supported.\n\n----\n\n**Working on a Django project?**\nImprove your skills with `one of my books <https://adamj.eu/books/>`__.\n\n----\n\nUsage\n=====\n\nWith the package installed, Pygments will autodiscover the below lexers.\n\nWhen using Pygments directly, you can refer to them by name.\nWithin Sphinx/docutils, you can refer to them in ``code-block`` directives:\n\n.. code-block:: restructuredtext\n\n .. code-block:: git-console\n\n $ git log --oneline\n 82fbbd3 D'oh! Fix math proof\n 91e9879 Aye carumba! Grammar mistake\n 61c4c08 Cowabunga! Update bibliography\n\nTo preview the lexers, open the ``tests/index.html`` file within the repository.\n\n``git-attributes``\n-------------------------\n\nA lexer for |.gitattributes files|__.\n\n.. |.gitattributes files| replace:: ``.gitattributes`` files\n__ https://git-scm.com/docs/gitattributes\n\n``git-blame-ignore-revs``\n-------------------------\n\nA lexer for the file format used by |blame.ignoreRevsFile|__.\nThe de facto name for a repository-wide ignore file is ``.git-blame-ignore-revs``, as recognized `by GitHub <https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view>`__ and potentially other Git hosting services.\n\n.. |blame.ignoreRevsFile| replace:: ``blame.ignoreRevsFile``\n__ https://git-scm.com/docs/git-blame#Documentation/git-blame.txt-blameignoreRevsFile\n\n``git-commit-edit-msg``\n-----------------------\n\nA lexer for the ``COMMIT_EDITMSG`` file that Git opens when you run ``git commit``.\nIt calls out to |DiffLexer|__ for highlighting any diff, as added by |git commit --verbose|__.\n\n.. |DiffLexer| replace:: ``DiffLexer``\n__ https://pygments.org/docs/lexers/#pygments.lexers.diff.DiffLexer\n\n.. |git commit --verbose| replace:: ``git commit --verbose``\n__ https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--v\n\n``git-conflict-markers``\n------------------------\n\nA lexer for the conflict markers that Git adds to indicate conflicts during a merge.\nAll other text in the file is lexed as plain text.\n\n``git-console``\n---------------\n\nA lexer for interactive shell sessions with Git.\nIt calls out to |BashLexer|__ for highlighting commands on lines starting with a ``$`` and |DiffLexer2|__ for highlighting inline diffs.\n\n.. |BashLexer| replace:: ``BashLexer``\n__ https://pygments.org/docs/lexers/#pygments.lexers.shell.BashLexer\n\n.. |DiffLexer2| replace:: ``DiffLexer``\n__ https://pygments.org/docs/lexers/#pygments.lexers.diff.DiffLexer\n\n``git-rebase-todo``\n-------------------\n\nA lexer for the ``git-rebase-todo`` file that Git opens when you run |git rebase --interactive|__.\nIt calls out to |BashLexer2|__ for highlighting commands on lines starting with ``x`` or ``exerc`` a ``$`` and |DiffLexer3|__ for highlighting inline diffs.\n\n.. |git rebase --interactive| replace:: ``git rebase --interactive``\n__ https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt--i\n\n.. |BashLexer2| replace:: ``BashLexer``\n__ https://pygments.org/docs/lexers/#pygments.lexers.shell.BashLexer\n\n.. |DiffLexer3| replace:: ``DiffLexer``\n__ https://pygments.org/docs/lexers/#pygments.lexers.diff.DiffLexer\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Pygments lexers for Git output and files.",
"version": "1.7.0",
"project_urls": {
"Changelog": "https://github.com/adamchainz/pygments-git/blob/main/CHANGELOG.rst",
"Homepage": "https://github.com/adamchainz/pygments-git",
"Mastodon": "https://fosstodon.org/@adamchainz",
"Twitter": "https://twitter.com/adamchainz"
},
"split_keywords": [
"pygments",
"git"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5754ca09f3c86d0f121ffddcae98dc5658997be2767ece546b2f9707c3b7a3b7",
"md5": "6fd2f690a3d44c0b8247a40b19aee925",
"sha256": "9b890c79c0c5b2a3f4ef8e4cd46961ea38ba9f12d879cf53948e982756ecfbc9"
},
"downloads": -1,
"filename": "pygments_git-1.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6fd2f690a3d44c0b8247a40b19aee925",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6087,
"upload_time": "2023-08-30T07:54:57",
"upload_time_iso_8601": "2023-08-30T07:54:57.523847Z",
"url": "https://files.pythonhosted.org/packages/57/54/ca09f3c86d0f121ffddcae98dc5658997be2767ece546b2f9707c3b7a3b7/pygments_git-1.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8454d35805b61f1bc1515a7caacc4b677865a50b2cec5892cfd527eac8e10247",
"md5": "a965d996a94b70d10418a782041ac1b4",
"sha256": "15aabd5d5a50d35e30a40499682b71f15b91ab13aa5969de965b2fd0741f8d11"
},
"downloads": -1,
"filename": "pygments_git-1.7.0.tar.gz",
"has_sig": false,
"md5_digest": "a965d996a94b70d10418a782041ac1b4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7974,
"upload_time": "2023-08-30T07:54:58",
"upload_time_iso_8601": "2023-08-30T07:54:58.808922Z",
"url": "https://files.pythonhosted.org/packages/84/54/d35805b61f1bc1515a7caacc4b677865a50b2cec5892cfd527eac8e10247/pygments_git-1.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-30 07:54:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adamchainz",
"github_project": "pygments-git",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "pygments-git"
}