used-by


Nameused-by JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
SummaryGenerate Used By badge from GitHub's dependencies information.
upload_time2024-10-15 09:09:55
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT License
keywords used by dependencies
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Used By

[![Used by](https://img.shields.io/static/v1?label=Used%20by&message=4&color=informational&logo=slickpic)](https://github.com/shenxianpeng/used-by/network/dependents)<!-- used by badge -->
[![main](https://github.com/shenxianpeng/used-by/actions/workflows/main.yml/badge.svg)](https://github.com/shenxianpeng/used-by/actions/workflows/main.yml)
[![pre-commit](https://github.com/shenxianpeng/used-by/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/shenxianpeng/used-by/actions/workflows/pre-commit.yml)
[![codecov](https://codecov.io/github/shenxianpeng/used-by/graph/badge.svg?token=QDO4MCI87B)](https://codecov.io/github/shenxianpeng/used-by)

Create and update Used By badge by leveraging GitHub's dependencies information via a pull request.

## Usage

### Run as GitHub Action

Create a new GitHub Actions workflow in your project, e.g. at `.github/workflows/used-by.yml`

```yaml
    steps:
      - uses: actions/checkout@v4
      - uses: shenxianpeng/used-by@main # or tag
        with:
          repo: '${{ github.repository }}' # current repository
          update-badge: 'true'

      # create pull request if changed
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v6
        with:
          add-paths: "README.md" # the file path to commit
          commit-message: "chore: update used-by badge by github-actions[bot]"
          title: "chore: automatic update used-by badge"
          base: main
          labels: documentation
          delete-branch: true
```

> [!IMPORTANT]
> To create pull request with `peter-evans/create-pull-request@v6` requires changing [Workflow permissions](https://github.com/peter-evans/create-pull-request?tab=readme-ov-file#workflow-permissions) to **Read and write permissions** and enabling  **Allow GitHub Actions to create and approve pull requests**.

## Required Inputs

### `repo`:
* Description: GitHub repository name. e.g. shenxianpeng/used-by. Defaults to shenxianpeng/used-by.
* Default: 'shenxianpeng/used-by'

## Optional Inputs

### `file-path`:
* Description: The path to file. Defaults to README.md.
* Default: 'README.md'

### `badge-label`:
* Description: The badge display name. Defaults to Used by.
* Default: 'Used by'

### `badge-color`:
* Description: The badge display color. Defaults to informational.
* Default: 'informational'

### `badge-logo`:
* Description: The badge display color. Defaults to slickpic.
* Default: 'slickpic'

### `update-badge`:
* Description: The badge display color. Defaults to false.
* Default: 'false'

For supported values of `badge-label`, `badge-color` and `badge-logo`, see https://shields.io/badges/static-badge

### Install `used-by` CLI

```bash
pip install git+https://github.com/shenxianpeng/used-by.git@main
```

### Help of `used-by` CLI

```bash
used-by --help
usage: used-by [-h] [--repo REPO] [--file-path FILE_PATH] [--badge-label BADGE_LABEL] [--badge-color BADGE_COLOR] [--badge-logo BADGE_LOGO] [--update-badge UPDATE_BADGE]

Generate a Used By badge from GitHub dependents information.

options:
  -h, --help            show this help message and exit
  --repo REPO           GitHub repository name (e.g., shenxianpeng/used-by).
  --file-path FILE_PATH
                        The path to the file where the badge will be added. Defaults to README.md.
  --badge-label BADGE_LABEL
                        The badge display name. Defaults to Used by.
  --badge-color BADGE_COLOR
                        The badge display color. Defaults to informational.
  --badge-logo BADGE_LOGO
                        The badge display logo. Defaults to slickpic.
  --update-badge UPDATE_BADGE
                        Add or update badge if set. Defaults to False.
```

### Run `used-by` CLI

```bash
# generate markdown makeup text by default
$ used-by --repo shenxianpeng/used-by
```

## Add Used By badge in README

Copy following content to show Used By badge in your repository README.

[![Used by](https://img.shields.io/static/v1?label=Used%20by&message=4&color=informational&logo=slickpic)](https://github.com/shenxianpeng/used-by/network/dependents)<!-- used by badge -->

**Markdown**

```
[![Used by](https://img.shields.io/static/v1?label=Used%20by&message=4&color=informational&logo=slickpic)](https://github.com/shenxianpeng/used-by/network/dependents)<!-- used by badge -->
```

**reStructuredText**

```
.. image:: https://img.shields.io/static/v1?label=Used%20by&message=0&color=informational&logo=slickpic
    :target: https://github.com/shenxianpeng/used-by/network/dependents
    :alt: used-by
```

## License

[MIT](LICENSE) © 2024-present Xianpeng Shen

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "used-by",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "used by, dependencies",
    "author": null,
    "author_email": "shenxianpeng <xianpeng.shen@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "# Used By\n\n[![Used by](https://img.shields.io/static/v1?label=Used%20by&message=4&color=informational&logo=slickpic)](https://github.com/shenxianpeng/used-by/network/dependents)<!-- used by badge -->\n[![main](https://github.com/shenxianpeng/used-by/actions/workflows/main.yml/badge.svg)](https://github.com/shenxianpeng/used-by/actions/workflows/main.yml)\n[![pre-commit](https://github.com/shenxianpeng/used-by/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/shenxianpeng/used-by/actions/workflows/pre-commit.yml)\n[![codecov](https://codecov.io/github/shenxianpeng/used-by/graph/badge.svg?token=QDO4MCI87B)](https://codecov.io/github/shenxianpeng/used-by)\n\nCreate and update Used By badge by leveraging GitHub's dependencies information via a pull request.\n\n## Usage\n\n### Run as GitHub Action\n\nCreate a new GitHub Actions workflow in your project, e.g. at `.github/workflows/used-by.yml`\n\n```yaml\n    steps:\n      - uses: actions/checkout@v4\n      - uses: shenxianpeng/used-by@main # or tag\n        with:\n          repo: '${{ github.repository }}' # current repository\n          update-badge: 'true'\n\n      # create pull request if changed\n      - name: Create Pull Request\n        uses: peter-evans/create-pull-request@v6\n        with:\n          add-paths: \"README.md\" # the file path to commit\n          commit-message: \"chore: update used-by badge by github-actions[bot]\"\n          title: \"chore: automatic update used-by badge\"\n          base: main\n          labels: documentation\n          delete-branch: true\n```\n\n> [!IMPORTANT]\n> To create pull request with `peter-evans/create-pull-request@v6` requires changing [Workflow permissions](https://github.com/peter-evans/create-pull-request?tab=readme-ov-file#workflow-permissions) to **Read and write permissions** and enabling  **Allow GitHub Actions to create and approve pull requests**.\n\n## Required Inputs\n\n### `repo`:\n* Description: GitHub repository name. e.g. shenxianpeng/used-by. Defaults to shenxianpeng/used-by.\n* Default: 'shenxianpeng/used-by'\n\n## Optional Inputs\n\n### `file-path`:\n* Description: The path to file. Defaults to README.md.\n* Default: 'README.md'\n\n### `badge-label`:\n* Description: The badge display name. Defaults to Used by.\n* Default: 'Used by'\n\n### `badge-color`:\n* Description: The badge display color. Defaults to informational.\n* Default: 'informational'\n\n### `badge-logo`:\n* Description: The badge display color. Defaults to slickpic.\n* Default: 'slickpic'\n\n### `update-badge`:\n* Description: The badge display color. Defaults to false.\n* Default: 'false'\n\nFor supported values of `badge-label`, `badge-color` and `badge-logo`, see https://shields.io/badges/static-badge\n\n### Install `used-by` CLI\n\n```bash\npip install git+https://github.com/shenxianpeng/used-by.git@main\n```\n\n### Help of `used-by` CLI\n\n```bash\nused-by --help\nusage: used-by [-h] [--repo REPO] [--file-path FILE_PATH] [--badge-label BADGE_LABEL] [--badge-color BADGE_COLOR] [--badge-logo BADGE_LOGO] [--update-badge UPDATE_BADGE]\n\nGenerate a Used By badge from GitHub dependents information.\n\noptions:\n  -h, --help            show this help message and exit\n  --repo REPO           GitHub repository name (e.g., shenxianpeng/used-by).\n  --file-path FILE_PATH\n                        The path to the file where the badge will be added. Defaults to README.md.\n  --badge-label BADGE_LABEL\n                        The badge display name. Defaults to Used by.\n  --badge-color BADGE_COLOR\n                        The badge display color. Defaults to informational.\n  --badge-logo BADGE_LOGO\n                        The badge display logo. Defaults to slickpic.\n  --update-badge UPDATE_BADGE\n                        Add or update badge if set. Defaults to False.\n```\n\n### Run `used-by` CLI\n\n```bash\n# generate markdown makeup text by default\n$ used-by --repo shenxianpeng/used-by\n```\n\n## Add Used By badge in README\n\nCopy following content to show Used By badge in your repository README.\n\n[![Used by](https://img.shields.io/static/v1?label=Used%20by&message=4&color=informational&logo=slickpic)](https://github.com/shenxianpeng/used-by/network/dependents)<!-- used by badge -->\n\n**Markdown**\n\n```\n[![Used by](https://img.shields.io/static/v1?label=Used%20by&message=4&color=informational&logo=slickpic)](https://github.com/shenxianpeng/used-by/network/dependents)<!-- used by badge -->\n```\n\n**reStructuredText**\n\n```\n.. image:: https://img.shields.io/static/v1?label=Used%20by&message=0&color=informational&logo=slickpic\n    :target: https://github.com/shenxianpeng/used-by/network/dependents\n    :alt: used-by\n```\n\n## License\n\n[MIT](LICENSE) \u00a9 2024-present Xianpeng Shen\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Generate Used By badge from GitHub's dependencies information.",
    "version": "0.1.4",
    "project_urls": {
        "source": "https://github.com/shenxianpeng/used-by",
        "tracker": "https://github.com/shenxianpeng/used-by/issues"
    },
    "split_keywords": [
        "used by",
        " dependencies"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3fafc8bf097b09df18a4791ce05a1565a2af67272ed3c53e3405cb01f11bc204",
                "md5": "378441f2d3d48963b57ca16e4ccb5540",
                "sha256": "6ae82ec370cf45679fd99a4a2a2ae1ef90b39ffe1cca5da2260eee3164ae86a4"
            },
            "downloads": -1,
            "filename": "used_by-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "378441f2d3d48963b57ca16e4ccb5540",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5672,
            "upload_time": "2024-10-15T09:09:55",
            "upload_time_iso_8601": "2024-10-15T09:09:55.808694Z",
            "url": "https://files.pythonhosted.org/packages/3f/af/c8bf097b09df18a4791ce05a1565a2af67272ed3c53e3405cb01f11bc204/used_by-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-15 09:09:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "shenxianpeng",
    "github_project": "used-by",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "used-by"
}
        
Elapsed time: 0.33160s