github-dependents-info 1.3.2__tar.gz → 1.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/PKG-INFO +3 -3
- {github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/README.md +2 -2
- {github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/github_dependents_info/__main__.py +6 -1
- {github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/github_dependents_info/gh_dependents_info.py +23 -2
- {github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/pyproject.toml +1 -1
- {github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/setup.py +2 -2
- {github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/LICENSE +0 -0
- {github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/github_dependents_info/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: github-dependents-info
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: Collect information about dependencies between a github repo and other repositories. Results available in JSON, markdown and badges.
|
|
5
5
|
Home-page: https://github.com/nvuillam/github-dependents-info
|
|
6
6
|
License: MIT
|
|
@@ -264,6 +264,7 @@ _________________
|
|
|
264
264
|
| -s<br/> --sort | String | _(optional)_ Sort order: name (default) or stars |
|
|
265
265
|
| -x<br/> --minstars | String | _(optional)_ If set, filters repositories to keep only those with more than X stars |
|
|
266
266
|
| -m<br/> --markdownfile | String | _(optional)_ Output markdown file file |
|
|
267
|
+
| -d<br/> --docurl | String | _(optional)_ Hyperlink to use when clicking on badge markdown file badge. (Default: link to markdown file) |
|
|
267
268
|
| -p<br/> --mergepackages | String | _(optional)_ In case of multiple packages, merge their stats in a single one in markdown and json output |
|
|
268
269
|
| -j<br/> --json | String | _(optional)_ Output in json format |
|
|
269
270
|
| -v<br/> --version | Boolean | _(optional)_ Displays version of github-dependents-info |
|
|
@@ -307,7 +308,6 @@ Create a file **.github/workflows/github-dependents-info.yml** in your repositor
|
|
|
307
308
|
If will generate a new Pull Request (or replace the pending one) every time the usage stats will have changed :)
|
|
308
309
|
|
|
309
310
|
```yaml
|
|
310
|
-
---
|
|
311
311
|
# GitHub Dependents Info workflow
|
|
312
312
|
# More info at https://github.com/nvuillam/github-dependents-info/
|
|
313
313
|
name: GitHub Dependents Info
|
|
@@ -346,7 +346,7 @@ jobs:
|
|
|
346
346
|
|
|
347
347
|
# Collect data & generate markdown
|
|
348
348
|
- name: GitHub Dependents Info
|
|
349
|
-
uses: nvuillam/github-dependents-info@v1.
|
|
349
|
+
uses: nvuillam/github-dependents-info@v1.4.0 # If you trust me enough you can replace version by "main" :)
|
|
350
350
|
# See documentation for variables details: https://github.com/nvuillam/github-dependents-info?tab=readme-ov-file#%EF%B8%8F-usage
|
|
351
351
|
with:
|
|
352
352
|
repo: ${{ github.repository }}
|
|
@@ -235,6 +235,7 @@ _________________
|
|
|
235
235
|
| -s<br/> --sort | String | _(optional)_ Sort order: name (default) or stars |
|
|
236
236
|
| -x<br/> --minstars | String | _(optional)_ If set, filters repositories to keep only those with more than X stars |
|
|
237
237
|
| -m<br/> --markdownfile | String | _(optional)_ Output markdown file file |
|
|
238
|
+
| -d<br/> --docurl | String | _(optional)_ Hyperlink to use when clicking on badge markdown file badge. (Default: link to markdown file) |
|
|
238
239
|
| -p<br/> --mergepackages | String | _(optional)_ In case of multiple packages, merge their stats in a single one in markdown and json output |
|
|
239
240
|
| -j<br/> --json | String | _(optional)_ Output in json format |
|
|
240
241
|
| -v<br/> --version | Boolean | _(optional)_ Displays version of github-dependents-info |
|
|
@@ -278,7 +279,6 @@ Create a file **.github/workflows/github-dependents-info.yml** in your repositor
|
|
|
278
279
|
If will generate a new Pull Request (or replace the pending one) every time the usage stats will have changed :)
|
|
279
280
|
|
|
280
281
|
```yaml
|
|
281
|
-
---
|
|
282
282
|
# GitHub Dependents Info workflow
|
|
283
283
|
# More info at https://github.com/nvuillam/github-dependents-info/
|
|
284
284
|
name: GitHub Dependents Info
|
|
@@ -317,7 +317,7 @@ jobs:
|
|
|
317
317
|
|
|
318
318
|
# Collect data & generate markdown
|
|
319
319
|
- name: GitHub Dependents Info
|
|
320
|
-
uses: nvuillam/github-dependents-info@v1.
|
|
320
|
+
uses: nvuillam/github-dependents-info@v1.4.0 # If you trust me enough you can replace version by "main" :)
|
|
321
321
|
# See documentation for variables details: https://github.com/nvuillam/github-dependents-info?tab=readme-ov-file#%EF%B8%8F-usage
|
|
322
322
|
with:
|
|
323
323
|
repo: ${{ github.repository }}
|
{github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/github_dependents_info/__main__.py
RENAMED
|
@@ -32,6 +32,9 @@ def main(
|
|
|
32
32
|
help="""Path to markdown file to insert/update Used By badge between tags
|
|
33
33
|
<!-- gh-dependents-info-used-by-start --><!-- gh-dependents-info-used-by-end -->""",
|
|
34
34
|
),
|
|
35
|
+
doc_url: str = typer.Option(
|
|
36
|
+
None, "-d", "--docurl", help="Hyperlink to use when clicking on badge markdown file badge"
|
|
37
|
+
),
|
|
35
38
|
badge_color: str = typer.Option("informational", "-c", "--markdownbadgecolor", help="Markdown badge color"),
|
|
36
39
|
sort_key: str = typer.Option(None, "-s", "--sort", help="Sort of name(default) or stars"),
|
|
37
40
|
min_stars: int = typer.Option(None, "-x", "--minstars", help="Filter dependents with less than X stars"),
|
|
@@ -98,6 +101,8 @@ def main(
|
|
|
98
101
|
json_output=json_output,
|
|
99
102
|
csv_directory=csv_directory,
|
|
100
103
|
badge_markdown_file=badge_markdown_file,
|
|
104
|
+
doc_url=doc_url,
|
|
105
|
+
markdown_file=markdown_file,
|
|
101
106
|
badge_color=badge_color,
|
|
102
107
|
merge_packages=merge_packages,
|
|
103
108
|
)
|
|
@@ -108,7 +113,7 @@ def main(
|
|
|
108
113
|
gh_deps_info.build_markdown(file=markdown_file)
|
|
109
114
|
# Update existing markdown to add badge
|
|
110
115
|
if badge_markdown_file is not None:
|
|
111
|
-
gh_deps_info.write_badge(badge_markdown_file)
|
|
116
|
+
gh_deps_info.write_badge(badge_markdown_file, "total_doc_url")
|
|
112
117
|
# Print text or json result
|
|
113
118
|
gh_deps_info.print_result()
|
|
114
119
|
|
|
@@ -21,6 +21,8 @@ class GithubDependentsInfo:
|
|
|
21
21
|
self.min_stars = None if "min_stars" not in options else options["min_stars"]
|
|
22
22
|
self.json_output = True if "json_output" in options and options["json_output"] is True else False
|
|
23
23
|
self.merge_packages = True if "merge_packages" in options and options["merge_packages"] is True else False
|
|
24
|
+
self.doc_url = options["doc_url"] if "doc_url" in options else None
|
|
25
|
+
self.markdown_file = options["markdown_file"] if "markdown_file" in options else None
|
|
24
26
|
self.badge_color = options["badge_color"] if "badge_color" in options else "informational"
|
|
25
27
|
self.debug = True if "debug" in options and options["debug"] is True else False
|
|
26
28
|
self.overwrite_progress = (
|
|
@@ -96,6 +98,10 @@ class GithubDependentsInfo:
|
|
|
96
98
|
t.find("svg", {"class": "octicon-star"}).parent.text.strip().replace(",", "")
|
|
97
99
|
),
|
|
98
100
|
}
|
|
101
|
+
# Collect avatar image
|
|
102
|
+
image = t.findAll("img", {"class": "avatar"})
|
|
103
|
+
if len(image) > 0 and image[0].attrs and "src" in image[0].attrs:
|
|
104
|
+
result_item["img"] = image[0].attrs["src"]
|
|
99
105
|
# Skip result if less than minimum stars
|
|
100
106
|
if self.min_stars is not None and result_item["stars"] < self.min_stars:
|
|
101
107
|
continue
|
|
@@ -174,6 +180,13 @@ class GithubDependentsInfo:
|
|
|
174
180
|
self.all_public_dependent_repos = sorted(self.all_public_dependent_repos, key=lambda d: d["name"])
|
|
175
181
|
|
|
176
182
|
# Build total badges
|
|
183
|
+
doc_url_to_use = "https://github.com/nvuillam/github-dependents-info"
|
|
184
|
+
if self.doc_url is not None:
|
|
185
|
+
doc_url_to_use = self.doc_url
|
|
186
|
+
elif self.markdown_file is not None:
|
|
187
|
+
doc_url_to_use = f"https://github.com/{self.repo}/blob/main/{self.markdown_file}"
|
|
188
|
+
self.badges["total_doc_url"] = self.build_badge("Used%20by", self.total_sum, url=doc_url_to_use)
|
|
189
|
+
|
|
177
190
|
self.badges["total"] = self.build_badge("Used%20by", self.total_sum)
|
|
178
191
|
self.badges["public"] = self.build_badge("Used%20by%20(public)", self.total_public_sum)
|
|
179
192
|
self.badges["private"] = self.build_badge("Used%20by%20(private)", self.total_private_sum)
|
|
@@ -336,7 +349,11 @@ class GithubDependentsInfo:
|
|
|
336
349
|
for repo1 in self.all_public_dependent_repos:
|
|
337
350
|
repo_label = repo1["name"]
|
|
338
351
|
repo_stars = repo1["stars"]
|
|
339
|
-
|
|
352
|
+
image_md = ""
|
|
353
|
+
if "img" in repo1:
|
|
354
|
+
img = repo1["img"]
|
|
355
|
+
image_md = f'<img class="avatar mr-2" src="{img}" width="20" height="20" alt=""> '
|
|
356
|
+
md_lines += [f"|{image_md}[{repo_label}](https://github.com/{repo_label}) | {repo_stars} |"]
|
|
340
357
|
# Dependents by package
|
|
341
358
|
else:
|
|
342
359
|
for package in self.packages:
|
|
@@ -355,7 +372,11 @@ class GithubDependentsInfo:
|
|
|
355
372
|
for repo1 in package["public_dependents"]:
|
|
356
373
|
repo_label = repo1["name"]
|
|
357
374
|
repo_stars = repo1["stars"]
|
|
358
|
-
|
|
375
|
+
image_md = ""
|
|
376
|
+
if "img" in repo1:
|
|
377
|
+
img = repo1["img"]
|
|
378
|
+
image_md = f'<img class="avatar mr-2" src="{img}" width="20" height="20" alt=""> '
|
|
379
|
+
md_lines += [f"|{image_md}[{repo_label}](https://github.com/{repo_label}) | {repo_stars} |"]
|
|
359
380
|
md_lines += [""]
|
|
360
381
|
|
|
361
382
|
# footer
|
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
5
5
|
|
|
6
6
|
[tool.poetry]
|
|
7
7
|
name = "github-dependents-info"
|
|
8
|
-
version = "1.
|
|
8
|
+
version = "1.4.0"
|
|
9
9
|
description = "Collect information about dependencies between a github repo and other repositories. Results available in JSON, markdown and badges."
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
authors = ["nvuillam <nicolas.vuillamy@gmail.com>"]
|
|
@@ -20,9 +20,9 @@ entry_points = \
|
|
|
20
20
|
|
|
21
21
|
setup_kwargs = {
|
|
22
22
|
'name': 'github-dependents-info',
|
|
23
|
-
'version': '1.
|
|
23
|
+
'version': '1.4.0',
|
|
24
24
|
'description': 'Collect information about dependencies between a github repo and other repositories. Results available in JSON, markdown and badges.',
|
|
25
|
-
'long_description': '# github-dependents-info\n\n<div align="center">\n\n[](https://pypi.org/project/github-dependents-info/)\n[](https://pypi.org/project/github-dependents-info/)\n[](https://github.com/nvuillam/github-dependents-info/stargazers/)\n[](https://github.com/nvuillam/github-dependents-info/actions?query=workflow%3Abuild)\n[](https://pypi.org/project/github-dependents-info/)\n[](https://github.com/nvuillam/github-dependents-info/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)\n\n[](https://github.com/nvuillam/github-dependents-info/graphs/contributors/)\n[](https://github.com/sponsors/nvuillam)\n[](https://oxsecurity.github.io/megalinter)\n[](https://github.com/nvuillam/github-dependents-info/blob/master/LICENSE)\n[](http://makeapullrequest.com)\n\nCollect information about dependencies between a github repo and other repositories.\n\n</div>\n\n_________________\n## 🚀 Features\n\nGitHub API does not allow to collect information about package usage (**Used by** on home, **Dependents** in insights section)\n\nThis package uses GitHub HTML to collect dependents information and can:\n\n- Output as text\n- Output as json (including shields.io markdown badges)\n- Generate summary markdown file\n- Update existing markdown by inserting **Used by** badge within tags\n - `<!-- gh-dependents-info-used-by-start --><!-- gh-dependents-info-used-by-end -->`\n- Handle multiple repositories packages\n- Filter results using minimum stars\n\nBadges example\n\n[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n\n<details>\n <summary>JSON output</summary>\n\n```json\n{\n "all_public_dependent_repos": [\n {\n "name": "CIT-SeniorDesign/CIT-SeniorDesign.github.io",\n "stars": 0\n },\n {\n "name": "Moaz-Adel/Jobsity-Challenge",\n "stars": 0\n },\n {\n "name": "Moaz-Adel/automation-exercise-cypress",\n "stars": 0\n },\n {\n "name": "RecuencoJones/vscode-groovy-lint-issue",\n "stars": 0\n },\n {\n "name": "aboe026/data-structures",\n "stars": 0\n },\n {\n "name": "aboe026/shields.io-badge-results",\n "stars": 0\n },\n {\n "name": "aboe026/software-update-checker",\n "stars": 2\n },\n {\n "name": "katalon-labs/katalon-recorder-extension",\n "stars": 0\n },\n {\n "name": "mashafrancis/sa-jenkins",\n "stars": 0\n },\n {\n "name": "nvuillam/vscode-groovy-lint",\n "stars": 52\n },\n {\n "name": "run2cmd/dotfiles",\n "stars": 2\n }\n ],\n "packages": [\n {\n "id": null,\n "name": "nvuillam/npm-groovy-lint",\n "url": "https://github.com/nvuillam/npm-groovy-lint/network/dependents",\n "public_dependent_stars": 56,\n "public_dependents": [\n {\n "name": "CIT-SeniorDesign/CIT-SeniorDesign.github.io",\n "stars": 0\n },\n {\n "name": "Moaz-Adel/Jobsity-Challenge",\n "stars": 0\n },\n {\n "name": "Moaz-Adel/automation-exercise-cypress",\n "stars": 0\n },\n {\n "name": "RecuencoJones/vscode-groovy-lint-issue",\n "stars": 0\n },\n {\n "name": "aboe026/data-structures",\n "stars": 0\n },\n {\n "name": "aboe026/shields.io-badge-results",\n "stars": 0\n },\n {\n "name": "aboe026/software-update-checker",\n "stars": 2\n },\n {\n "name": "katalon-labs/katalon-recorder-extension",\n "stars": 0\n },\n {\n "name": "mashafrancis/sa-jenkins",\n "stars": 0\n },\n {\n "name": "nvuillam/vscode-groovy-lint",\n "stars": 52\n },\n {\n "name": "run2cmd/dotfiles",\n "stars": 2\n }\n ],\n "public_dependents_number": 11,\n "private_dependents_number": 4,\n "total_dependents_number": 15,\n "badges": {\n "total": "[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "public": "[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "private": "[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "stars": "[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)"\n }\n }\n ],\n "total_dependents_number": 15,\n "public_dependents_number": 11,\n "private_dependents_number": 4,\n "public_dependents_stars": 56,\n "badges": {\n "total": "[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "public": "[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "private": "[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "stars": "[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)"\n }\n}\n\n```\n</details>\n\n<details>\n <summary>Markdown output for single package</summary>\n\n```markdown\n# Dependents stats for nvuillam/npm-groovy-lint\n\n## Package nvuillam/npm-groovy-lint\n\n[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n\n| Repository | Stars |\n|:--------------------------------------------------------------------------------------------------------------|------:|\n| [CIT-SeniorDesign/CIT-SeniorDesign.github.io](https://github.com/CIT-SeniorDesign/CIT-SeniorDesign.github.io) | 0 |\n| [Moaz-Adel/Jobsity-Challenge](https://github.com/Moaz-Adel/Jobsity-Challenge) | 0 |\n| [Moaz-Adel/automation-exercise-cypress](https://github.com/Moaz-Adel/automation-exercise-cypress) | 0 |\n| [RecuencoJones/vscode-groovy-lint-issue](https://github.com/RecuencoJones/vscode-groovy-lint-issue) | 0 |\n| [aboe026/data-structures](https://github.com/aboe026/data-structures) | 0 |\n| [aboe026/shields.io-badge-results](https://github.com/aboe026/shields.io-badge-results) | 0 |\n| [aboe026/software-update-checker](https://github.com/aboe026/software-update-checker) | 2 |\n| [katalon-labs/katalon-recorder-extension](https://github.com/katalon-labs/katalon-recorder-extension) | 0 |\n| [mashafrancis/sa-jenkins](https://github.com/mashafrancis/sa-jenkins) | 0 |\n| [nvuillam/vscode-groovy-lint](https://github.com/nvuillam/vscode-groovy-lint) | 52 |\n| [run2cmd/dotfiles](https://github.com/run2cmd/dotfiles) | 2 |\n\n_Generated by [github-dependents-info](https://github.com/nvuillam/github-dependents-info)_\n```\n</details>\n\nNote: If your repository packages have millions of dependents, running github-dependent-infos could take hours, as it works by browsing and scraping HTML pages returned by GitHub. For example, [angular/angular dependents](assets/angular-package-usage.md) did run during several hours !\n\n- [Installation](#⚙️-installation)\n- [Usage](#🛠️-usage)\n- [Examples](#🧪-examples)\n- [Use as GitHub Action](#use-as-github-action)\n\n_________________\n## ⚙️ Installation\n\n```bash\npip install -U github-dependents-info\n```\n\nor install with `Poetry`\n\n```bash\npoetry add github-dependents-info\n```\n\n_________________\n## 🛠️ Usage\n\n```shell\n github-dependents-info [OPTIONS]\n```\n\n| Parameter | Type | Description |\n|-----------------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| --repo | String | Repository. Example: `oxsecurity/megalinter` |\n| -b<br/> --badgemarkdownfile | String | _(optional)_ Path to markdown file where to insert/update **Used by** badge <br/> (must contain tags `<!-- gh-dependents-info-used-by-start --><!-- gh-dependents-info-used-by-end -->`) |\n| -s<br/> --sort | String | _(optional)_ Sort order: name (default) or stars |\n| -x<br/> --minstars | String | _(optional)_ If set, filters repositories to keep only those with more than X stars |\n| -m<br/> --markdownfile | String | _(optional)_ Output markdown file file |\n| -p<br/> --mergepackages | String | _(optional)_ In case of multiple packages, merge their stats in a single one in markdown and json output |\n| -j<br/> --json | String | _(optional)_ Output in json format |\n| -v<br/> --version | Boolean | _(optional)_ Displays version of github-dependents-info |\n| --verbose | Boolean | _(optional)_ Verbose output |\n\n_________________\n## 🧪 Examples\n\n- Text output\n\n github-dependents-info --repo nvuillam/npm-groovy-lint\n\n- JSON output\n\n github-dependents-info --repo nvuillam/npm-groovy-lint --json\n\n- Insert/Update **Used by** markdown badge within an existing markdown file containing tags `<!-- gh-dependents-info-used-by-start --><!-- gh-dependents-info-used-by-end -->`\n\n github-dependents-info --repo nvuillam/npm-groovy-lint --badgemarkdownfile ./README.md\n\n- Build markdown file with dependent repos (single package), sorted by name\n\n github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --verbose\n\n- Build markdown file with dependent repos (single package), with minimum 10 stars\n\n github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --minstars 10 --verbose\n\n- Build markdown file with dependent repos (multiple package), sorted by stars\n\n github-dependents-info --repo oxsecurity/megalinter --markdownfile ./docs/package-usage.md --sort stars --verbose\n\n- Build markdown file with dependent repos (multiple package), with merged list of packages in output markdown\n\n github-dependents-info --repo oxsecurity/megalinter --markdownfile ./docs/package-usage.md --sort stars --mergepackages --verbose\n\n## Use as GitHub Action\n\nCreate a file **.github/workflows/github-dependents-info.yml** in your repository with the following content.\n\nIf will generate a new Pull Request (or replace the pending one) every time the usage stats will have changed :)\n\n```yaml\n---\n# GitHub Dependents Info workflow\n# More info at https://github.com/nvuillam/github-dependents-info/\nname: GitHub Dependents Info\n\n# Let by default\non:\n # On manual launch\n workflow_dispatch:\n # On every push on selected branches (usually just main)\n push:\n branches: [main, setup-gdi]\n # Scheduled interval: Use CRON format https://crontab.guru/\n schedule:\n - cron: "0 0 * * 0" # Every sunday at midnight\n\npermissions: read-all\n\nconcurrency:\n group: ${{ github.ref }}-${{ github.workflow }}\n cancel-in-progress: true\n\njobs:\n build:\n name: GitHub Dependents Info\n runs-on: ubuntu-latest\n permissions:\n contents: write\n pull-requests: write\n steps:\n # Git Checkout\n - name: Checkout Code\n uses: actions/checkout@v4\n with:\n token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}\n fetch-depth: 0\n\n # Collect data & generate markdown\n - name: GitHub Dependents Info\n uses: nvuillam/github-dependents-info@v1.3.2\n # See documentation for variables details: https://github.com/nvuillam/github-dependents-info?tab=readme-ov-file#%EF%B8%8F-usage\n with:\n repo: ${{ github.repository }}\n # markdownfile: docs/github-dependents-info.md\n # badgemarkdownfile: README.md\n # sort: stars\n # minstars: "0"\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n # Workaround for git issues\n - name: Prepare commit\n run: sudo chown -R $USER:$USER .\n\n # Create pull request\n - name: Create Pull Request\n id: cpr\n uses: peter-evans/create-pull-request@v5\n with:\n token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}\n branch: github-dependents-info-auto-update\n commit-message: "[GitHub Dependents Info] Updated markdown file(s)"\n delete-branch: true\n title: "[GitHub Dependents Info] Updated markdown file"\n body: "_Generated with [github-dependents-info](https://github.com/nvuillam/github-dependents-info), by [Nicolas Vuillamy](https://github.com/nvuillam)_"\n labels: documentation\n - name: Create PR output\n run: |\n echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"\n echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"\n```\n\n_________________\n## 🛡 License\n\n[](https://github.com/nvuillam/github-dependents-info/blob/master/LICENSE)\n\nThis project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/nvuillam/github-dependents-info/blob/master/LICENSE) for more details.\n\n_________________\n## Credits [](https://github.com/TezRomacH/python-package-template)\n\nThis package has been inspired by stackexchange post [How to use GitHub API to get a repository\'s dependents information in GitHub?](https://stackoverflow.com/questions/58734176/how-to-use-github-api-to-get-a-repositorys-dependents-information-in-github)\n- [Bertrand Martel](https://github.com/bertrandmartel)\n- [muvaf](https://stackoverflow.com/users/5233252/muvaf)\n- [Mo Ganji](https://www.linkedin.com/in/mohganji/) <!-- markdown-link-check-disable-line -->\n\nThis project was generated with [`python-package-template`](https://github.com/TezRomacH/python-package-template)\n',
|
|
25
|
+
'long_description': '# github-dependents-info\n\n<div align="center">\n\n[](https://pypi.org/project/github-dependents-info/)\n[](https://pypi.org/project/github-dependents-info/)\n[](https://github.com/nvuillam/github-dependents-info/stargazers/)\n[](https://github.com/nvuillam/github-dependents-info/actions?query=workflow%3Abuild)\n[](https://pypi.org/project/github-dependents-info/)\n[](https://github.com/nvuillam/github-dependents-info/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)\n\n[](https://github.com/nvuillam/github-dependents-info/graphs/contributors/)\n[](https://github.com/sponsors/nvuillam)\n[](https://oxsecurity.github.io/megalinter)\n[](https://github.com/nvuillam/github-dependents-info/blob/master/LICENSE)\n[](http://makeapullrequest.com)\n\nCollect information about dependencies between a github repo and other repositories.\n\n</div>\n\n_________________\n## 🚀 Features\n\nGitHub API does not allow to collect information about package usage (**Used by** on home, **Dependents** in insights section)\n\nThis package uses GitHub HTML to collect dependents information and can:\n\n- Output as text\n- Output as json (including shields.io markdown badges)\n- Generate summary markdown file\n- Update existing markdown by inserting **Used by** badge within tags\n - `<!-- gh-dependents-info-used-by-start --><!-- gh-dependents-info-used-by-end -->`\n- Handle multiple repositories packages\n- Filter results using minimum stars\n\nBadges example\n\n[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n\n<details>\n <summary>JSON output</summary>\n\n```json\n{\n "all_public_dependent_repos": [\n {\n "name": "CIT-SeniorDesign/CIT-SeniorDesign.github.io",\n "stars": 0\n },\n {\n "name": "Moaz-Adel/Jobsity-Challenge",\n "stars": 0\n },\n {\n "name": "Moaz-Adel/automation-exercise-cypress",\n "stars": 0\n },\n {\n "name": "RecuencoJones/vscode-groovy-lint-issue",\n "stars": 0\n },\n {\n "name": "aboe026/data-structures",\n "stars": 0\n },\n {\n "name": "aboe026/shields.io-badge-results",\n "stars": 0\n },\n {\n "name": "aboe026/software-update-checker",\n "stars": 2\n },\n {\n "name": "katalon-labs/katalon-recorder-extension",\n "stars": 0\n },\n {\n "name": "mashafrancis/sa-jenkins",\n "stars": 0\n },\n {\n "name": "nvuillam/vscode-groovy-lint",\n "stars": 52\n },\n {\n "name": "run2cmd/dotfiles",\n "stars": 2\n }\n ],\n "packages": [\n {\n "id": null,\n "name": "nvuillam/npm-groovy-lint",\n "url": "https://github.com/nvuillam/npm-groovy-lint/network/dependents",\n "public_dependent_stars": 56,\n "public_dependents": [\n {\n "name": "CIT-SeniorDesign/CIT-SeniorDesign.github.io",\n "stars": 0\n },\n {\n "name": "Moaz-Adel/Jobsity-Challenge",\n "stars": 0\n },\n {\n "name": "Moaz-Adel/automation-exercise-cypress",\n "stars": 0\n },\n {\n "name": "RecuencoJones/vscode-groovy-lint-issue",\n "stars": 0\n },\n {\n "name": "aboe026/data-structures",\n "stars": 0\n },\n {\n "name": "aboe026/shields.io-badge-results",\n "stars": 0\n },\n {\n "name": "aboe026/software-update-checker",\n "stars": 2\n },\n {\n "name": "katalon-labs/katalon-recorder-extension",\n "stars": 0\n },\n {\n "name": "mashafrancis/sa-jenkins",\n "stars": 0\n },\n {\n "name": "nvuillam/vscode-groovy-lint",\n "stars": 52\n },\n {\n "name": "run2cmd/dotfiles",\n "stars": 2\n }\n ],\n "public_dependents_number": 11,\n "private_dependents_number": 4,\n "total_dependents_number": 15,\n "badges": {\n "total": "[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "public": "[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "private": "[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "stars": "[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)"\n }\n }\n ],\n "total_dependents_number": 15,\n "public_dependents_number": 11,\n "private_dependents_number": 4,\n "public_dependents_stars": 56,\n "badges": {\n "total": "[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "public": "[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "private": "[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",\n "stars": "[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)"\n }\n}\n\n```\n</details>\n\n<details>\n <summary>Markdown output for single package</summary>\n\n```markdown\n# Dependents stats for nvuillam/npm-groovy-lint\n\n## Package nvuillam/npm-groovy-lint\n\n[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)\n\n| Repository | Stars |\n|:--------------------------------------------------------------------------------------------------------------|------:|\n| [CIT-SeniorDesign/CIT-SeniorDesign.github.io](https://github.com/CIT-SeniorDesign/CIT-SeniorDesign.github.io) | 0 |\n| [Moaz-Adel/Jobsity-Challenge](https://github.com/Moaz-Adel/Jobsity-Challenge) | 0 |\n| [Moaz-Adel/automation-exercise-cypress](https://github.com/Moaz-Adel/automation-exercise-cypress) | 0 |\n| [RecuencoJones/vscode-groovy-lint-issue](https://github.com/RecuencoJones/vscode-groovy-lint-issue) | 0 |\n| [aboe026/data-structures](https://github.com/aboe026/data-structures) | 0 |\n| [aboe026/shields.io-badge-results](https://github.com/aboe026/shields.io-badge-results) | 0 |\n| [aboe026/software-update-checker](https://github.com/aboe026/software-update-checker) | 2 |\n| [katalon-labs/katalon-recorder-extension](https://github.com/katalon-labs/katalon-recorder-extension) | 0 |\n| [mashafrancis/sa-jenkins](https://github.com/mashafrancis/sa-jenkins) | 0 |\n| [nvuillam/vscode-groovy-lint](https://github.com/nvuillam/vscode-groovy-lint) | 52 |\n| [run2cmd/dotfiles](https://github.com/run2cmd/dotfiles) | 2 |\n\n_Generated by [github-dependents-info](https://github.com/nvuillam/github-dependents-info)_\n```\n</details>\n\nNote: If your repository packages have millions of dependents, running github-dependent-infos could take hours, as it works by browsing and scraping HTML pages returned by GitHub. For example, [angular/angular dependents](assets/angular-package-usage.md) did run during several hours !\n\n- [Installation](#⚙️-installation)\n- [Usage](#🛠️-usage)\n- [Examples](#🧪-examples)\n- [Use as GitHub Action](#use-as-github-action)\n\n_________________\n## ⚙️ Installation\n\n```bash\npip install -U github-dependents-info\n```\n\nor install with `Poetry`\n\n```bash\npoetry add github-dependents-info\n```\n\n_________________\n## 🛠️ Usage\n\n```shell\n github-dependents-info [OPTIONS]\n```\n\n| Parameter | Type | Description |\n|-----------------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| --repo | String | Repository. Example: `oxsecurity/megalinter` |\n| -b<br/> --badgemarkdownfile | String | _(optional)_ Path to markdown file where to insert/update **Used by** badge <br/> (must contain tags `<!-- gh-dependents-info-used-by-start --><!-- gh-dependents-info-used-by-end -->`) |\n| -s<br/> --sort | String | _(optional)_ Sort order: name (default) or stars |\n| -x<br/> --minstars | String | _(optional)_ If set, filters repositories to keep only those with more than X stars |\n| -m<br/> --markdownfile | String | _(optional)_ Output markdown file file |\n| -d<br/> --docurl | String | _(optional)_ Hyperlink to use when clicking on badge markdown file badge. (Default: link to markdown file) |\n| -p<br/> --mergepackages | String | _(optional)_ In case of multiple packages, merge their stats in a single one in markdown and json output |\n| -j<br/> --json | String | _(optional)_ Output in json format |\n| -v<br/> --version | Boolean | _(optional)_ Displays version of github-dependents-info |\n| --verbose | Boolean | _(optional)_ Verbose output |\n\n_________________\n## 🧪 Examples\n\n- Text output\n\n github-dependents-info --repo nvuillam/npm-groovy-lint\n\n- JSON output\n\n github-dependents-info --repo nvuillam/npm-groovy-lint --json\n\n- Insert/Update **Used by** markdown badge within an existing markdown file containing tags `<!-- gh-dependents-info-used-by-start --><!-- gh-dependents-info-used-by-end -->`\n\n github-dependents-info --repo nvuillam/npm-groovy-lint --badgemarkdownfile ./README.md\n\n- Build markdown file with dependent repos (single package), sorted by name\n\n github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --verbose\n\n- Build markdown file with dependent repos (single package), with minimum 10 stars\n\n github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --minstars 10 --verbose\n\n- Build markdown file with dependent repos (multiple package), sorted by stars\n\n github-dependents-info --repo oxsecurity/megalinter --markdownfile ./docs/package-usage.md --sort stars --verbose\n\n- Build markdown file with dependent repos (multiple package), with merged list of packages in output markdown\n\n github-dependents-info --repo oxsecurity/megalinter --markdownfile ./docs/package-usage.md --sort stars --mergepackages --verbose\n\n## Use as GitHub Action\n\nCreate a file **.github/workflows/github-dependents-info.yml** in your repository with the following content.\n\nIf will generate a new Pull Request (or replace the pending one) every time the usage stats will have changed :)\n\n```yaml\n# GitHub Dependents Info workflow\n# More info at https://github.com/nvuillam/github-dependents-info/\nname: GitHub Dependents Info\n\n# Let by default\non:\n # On manual launch\n workflow_dispatch:\n # On every push on selected branches (usually just main)\n push:\n branches: [main, setup-gdi]\n # Scheduled interval: Use CRON format https://crontab.guru/\n schedule:\n - cron: "0 0 * * 0" # Every sunday at midnight\n\npermissions: read-all\n\nconcurrency:\n group: ${{ github.ref }}-${{ github.workflow }}\n cancel-in-progress: true\n\njobs:\n build:\n name: GitHub Dependents Info\n runs-on: ubuntu-latest\n permissions:\n contents: write\n pull-requests: write\n steps:\n # Git Checkout\n - name: Checkout Code\n uses: actions/checkout@v4\n with:\n token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}\n fetch-depth: 0\n\n # Collect data & generate markdown\n - name: GitHub Dependents Info\n uses: nvuillam/github-dependents-info@v1.4.0 # If you trust me enough you can replace version by "main" :)\n # See documentation for variables details: https://github.com/nvuillam/github-dependents-info?tab=readme-ov-file#%EF%B8%8F-usage\n with:\n repo: ${{ github.repository }}\n # markdownfile: docs/github-dependents-info.md\n # badgemarkdownfile: README.md\n # sort: stars\n # minstars: "0"\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n # Workaround for git issues\n - name: Prepare commit\n run: sudo chown -R $USER:$USER .\n\n # Create pull request\n - name: Create Pull Request\n id: cpr\n uses: peter-evans/create-pull-request@v5\n with:\n token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}\n branch: github-dependents-info-auto-update\n commit-message: "[GitHub Dependents Info] Updated markdown file(s)"\n delete-branch: true\n title: "[GitHub Dependents Info] Updated markdown file"\n body: "_Generated with [github-dependents-info](https://github.com/nvuillam/github-dependents-info), by [Nicolas Vuillamy](https://github.com/nvuillam)_"\n labels: documentation\n - name: Create PR output\n run: |\n echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"\n echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"\n```\n\n_________________\n## 🛡 License\n\n[](https://github.com/nvuillam/github-dependents-info/blob/master/LICENSE)\n\nThis project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/nvuillam/github-dependents-info/blob/master/LICENSE) for more details.\n\n_________________\n## Credits [](https://github.com/TezRomacH/python-package-template)\n\nThis package has been inspired by stackexchange post [How to use GitHub API to get a repository\'s dependents information in GitHub?](https://stackoverflow.com/questions/58734176/how-to-use-github-api-to-get-a-repositorys-dependents-information-in-github)\n- [Bertrand Martel](https://github.com/bertrandmartel)\n- [muvaf](https://stackoverflow.com/users/5233252/muvaf)\n- [Mo Ganji](https://www.linkedin.com/in/mohganji/) <!-- markdown-link-check-disable-line -->\n\nThis project was generated with [`python-package-template`](https://github.com/TezRomacH/python-package-template)\n',
|
|
26
26
|
'author': 'nvuillam',
|
|
27
27
|
'author_email': 'nicolas.vuillamy@gmail.com',
|
|
28
28
|
'maintainer': 'None',
|
|
File without changes
|
{github_dependents_info-1.3.2 → github_dependents_info-1.4.0}/github_dependents_info/__init__.py
RENAMED
|
File without changes
|