Skip to content

Commit

Permalink
📝 Update scripts/generate-requirements.md.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Jun 20, 2023
1 parent 66e3571 commit ae6cdf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ repos:
- mdformat-black
- mdformat-config
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.7.1
rev: v0.8.1
hooks:
- id: markdownlint-cli2
additional_dependencies:
Expand All @@ -80,7 +80,7 @@ repos:
- id: update-package.json
- id: update-addon-info.json
- repo: https://github.com/perltidy/perltidy
rev: "20230309.02"
rev: "20230309.03"
hooks:
- id: perltidy
- repo: https://github.com/scop/pre-commit-shfmt
Expand All @@ -102,7 +102,7 @@ repos:
additional_dependencies:
- tomli
- repo: https://github.com/kumaraditya303/mirrors-pyright
rev: v1.1.309
rev: v1.1.313
hooks:
- id: pyright
- repo: https://github.com/PyCQA/bandit
Expand Down
4 changes: 4 additions & 0 deletions scripts/generate-requirements.md.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env -S perl -p
$title = $ARGV;
$title =~ s=.*?requirements/(.*?)\.txt=$1=;
if (m(^[^#].*://)) {
s=(^.*://)(.*)=- [$1$2](https://$2)=;
next;
}
s`^([^#\n][^\s[>=<^!^]*)`- [$1](https://pypi.org/project/$1)`;
s/^#\s*//;
s/^!.*/## $title/;

0 comments on commit ae6cdf2

Please sign in to comment.