pygments-git


Namepygments-git JSON
Version 1.8.0 PyPI version JSON
download
home_pageNone
SummaryPygments lexers for Git output and files.
upload_time2024-10-23 21:46:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords git pygments
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ============
pygments-git
============

.. image:: https://img.shields.io/github/actions/workflow/status/adamchainz/pygments-git/main.yml.svg?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.

----

**Get better at command line Git** with my book `Boost Your Git DX <https://adamchainz.gumroad.com/l/bygdx>`__.

----

Installation
============

Use **pip**:

.. code-block:: sh

    python -m pip install pygments-git

Python 3.9 to 3.13 supported.

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-ignore``
--------------

A lexer for |.gitignore files|__.

.. |.gitignore files| replace:: ``.gitignore`` files
__ https://git-scm.com/docs/gitignore

``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": null,
    "name": "pygments-git",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "Git, Pygments",
    "author": null,
    "author_email": "Adam Johnson <me@adamj.eu>",
    "download_url": "https://files.pythonhosted.org/packages/ff/9e/e54e5a9bb49686b5da2b7d312235c673cebbb9ad0ed92f9c4ff0f7769a97/pygments_git-1.8.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.svg?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\n----\n\n**Get better at command line Git** with my book `Boost Your Git DX <https://adamchainz.gumroad.com/l/bygdx>`__.\n\n----\n\nInstallation\n============\n\nUse **pip**:\n\n.. code-block:: sh\n\n    python -m pip install pygments-git\n\nPython 3.9 to 3.13 supported.\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-ignore``\n--------------\n\nA lexer for |.gitignore files|__.\n\n.. |.gitignore files| replace:: ``.gitignore`` files\n__ https://git-scm.com/docs/gitignore\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": null,
    "summary": "Pygments lexers for Git output and files.",
    "version": "1.8.0",
    "project_urls": {
        "Changelog": "https://github.com/adamchainz/pygments-git/blob/main/CHANGELOG.rst",
        "Funding": "https://adamj.eu/books/",
        "Repository": "https://github.com/adamchainz/pygments-git"
    },
    "split_keywords": [
        "git",
        " pygments"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9c435f3c95eacd1131f384f197d270d7a63599f4748eccdd3405da9cbc8a2388",
                "md5": "26fd0793994ac6dcde7ac7ce8446e0ca",
                "sha256": "5eb2048f3856904948ac9821c8e8948e58ed4c5ead1321af857f9a61920ca4e4"
            },
            "downloads": -1,
            "filename": "pygments_git-1.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "26fd0793994ac6dcde7ac7ce8446e0ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6094,
            "upload_time": "2024-10-23T21:46:46",
            "upload_time_iso_8601": "2024-10-23T21:46:46.962164Z",
            "url": "https://files.pythonhosted.org/packages/9c/43/5f3c95eacd1131f384f197d270d7a63599f4748eccdd3405da9cbc8a2388/pygments_git-1.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ff9ee54e5a9bb49686b5da2b7d312235c673cebbb9ad0ed92f9c4ff0f7769a97",
                "md5": "0bf4ef37ba278cc1dbd800c933075d35",
                "sha256": "c1a784dfd8ceff04aecff86cc579a70733a271e1b77c852f6ffa8ae54cff8d2d"
            },
            "downloads": -1,
            "filename": "pygments_git-1.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0bf4ef37ba278cc1dbd800c933075d35",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7846,
            "upload_time": "2024-10-23T21:46:48",
            "upload_time_iso_8601": "2024-10-23T21:46:48.000840Z",
            "url": "https://files.pythonhosted.org/packages/ff/9e/e54e5a9bb49686b5da2b7d312235c673cebbb9ad0ed92f9c4ff0f7769a97/pygments_git-1.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-23 21:46:48",
    "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"
}
        
Elapsed time: 0.38167s