diff options
| author | Bobby <[email protected]> | 2022-11-05 03:09:59 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-11-05 03:09:59 -0400 |
| commit | 3487049d5b7ada8b9e10cb5500e2f5c4249a13d8 (patch) | |
| tree | 19c37fd599bcb99eb9dbd5cecdf5f1e19f810e76 | |
| parent | 101cc6d5b832f6a2c22b08fb37922f3548c7a574 (diff) | |
| download | texty-3487049d5b7ada8b9e10cb5500e2f5c4249a13d8.tar.xz texty-3487049d5b7ada8b9e10cb5500e2f5c4249a13d8.zip | |
feat: Added maintainers
| -rw-r--r-- | README.md | 14 | ||||
| -rwxr-xr-x | commit.sh | 3 | ||||
| -rw-r--r-- | maintainers.yml | 22 | ||||
| -rw-r--r-- | requirements.txt | 2 | ||||
| -rw-r--r-- | scripts/maintainers.py | 51 |
5 files changed, 86 insertions, 6 deletions
@@ -6,11 +6,11 @@ Text Editor The project is open to contributions. All kinds of suggestions are welcome. I want to make contributing to this project as easy and transparent as possible, whether it's: -- Reporting a bug (See [Issues](https://github.com/luciferreeves/texty/issues) Page) -- Discussing the current state of the code -- Submitting a fix -- Proposing new features -- Becoming a maintainer +- Reporting a bug (Go to [File a Bug](https://github.com/luciferreeves/texty/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D) for reporting a bug) +- Discussing the current state of the code (See [Discussions](https://github.com/luciferreeves/texty/discussions) Page) +- Submitting a fix (See [Pull Requests](https://github.com/luciferreeves/texty/pulls) Page) +- Proposing new features (See [Request a Feature](https://github.com/luciferreeves/texty/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=%5BFEATURE%5D) for requesting a feature) +- Becoming a maintainer (See [Maintainers]( GitHub is being exclusively used to host code, to track issues and feature requests, as well as accept pull requests for this project. Following is a guideline for developing via GitHub: @@ -100,3 +100,7 @@ Once you have made your changes, you can submit them by [creating a pull request ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +## Maintainers + +<!-- maintainers -->
- [Bobby](luciferreeves) - [https://thatcomputerscientist.com](https://thatcomputerscientist.com)

\ No newline at end of file @@ -42,6 +42,9 @@ commands() { # Generate Requirements.txt pipreqs --force . + + # Generate Maintainers List + python3 scripts/maintainers.py } # Default values for optional arguments diff --git a/maintainers.yml b/maintainers.yml new file mode 100644 index 0000000..6d6babd --- /dev/null +++ b/maintainers.yml @@ -0,0 +1,22 @@ +# This file is a list of maintainers for the project. It is used by the +# `maintainers` command in the `commit.sh` script to automatically add +# maintainers to the `README.md` file in the maintainers section, present +# at the bottom of the file. + + +# The maintainers are listed in the following format: +# - name: <name of the maintainer> +# github: <github username of the maintainer> +# email: <email of the maintainer> (optional) +# website: <website of the maintainer> (optional) +# twitter: <twitter username of the maintainer> (optional) + +# The maintainers are listed in the order of their addition to the file. If +# you ever added or modified any parts of this repository, please add your +# name to the maintainers list at the bottom of this file. + +- name: "Bobby" + github: "luciferreeves" + email: "" + website: "https://thatcomputerscientist.com" + diff --git a/requirements.txt b/requirements.txt index 8b13789..bee6c14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ - +PyYAML==6.0 diff --git a/scripts/maintainers.py b/scripts/maintainers.py new file mode 100644 index 0000000..2ab3b0f --- /dev/null +++ b/scripts/maintainers.py @@ -0,0 +1,51 @@ +# This file is used to generate the list of maintainers from the maintainers.yml +# file. It is used to make sure that all the maintainers are listed in the +# README.md file. + +import yaml + +def main(): + # Load the maintainers.yml file + with open('maintainers.yml', 'r') as f: + maintainers = yaml.safe_load(f) + + # Load the README.md file + with open('README.md', 'r') as f: + readme = f.read() + + # Generate the list of maintainers + maintainers_list = "" + maintainer_images = "" + for maintainer in maintainers: + if not maintainer['name'] or not maintainer['github']: + # Skip maintainers without a name or github username + continue + + # Generate the markdown for the maintainer + maintainers_list += "- [{}]({})".format(maintainer['name'], maintainer['github']) + if maintainer['email']: + maintainers_list += "<{}>".format(maintainer['email']) + + if maintainer['website']: + maintainers_list += " - [{}]({})".format(maintainer['website'], maintainer['website']) + + # Move to next line + maintainers_list += "\r" + + # Generate the markdown for the maintainer's image + image_url = "https://github.com/{}.png?size=40".format(maintainer['github']) + maintainer_images += " ".format(maintainer['name'], image_url) + + # Remove everything below "<!-- maintainers -->" in the README.md file + readme = readme.split("<!-- maintainers -->")[0] + + # Add the list of maintainers to the README.md file + readme += "<!-- maintainers -->\r" + maintainers_list + "\r" + maintainer_images + + # Save the README.md file + with open('README.md', 'w') as f: + f.write(readme) + + +if __name__ == '__main__': + main() |
