This guide is for the people who are interested in contributing to consumet.rs. It is not a complete guide yet, but it should help you get started. If you have any questions or any suggestions, please open a issue or join the discord server.
See our informal contributing guide for more details on contributing to this project.
To contribute to Consumet code, you need to know the following:
- Fork the repository
- Clone your fork to your local machine using the following command (make sure to change
<your_username>
to your GitHub username):
git clone https://github.com/<your-username>/consumet.rs.git
- Create a new branch:
git checkout -b <new-branch-name>
I believe that project structure is needed to make it simple to contribute to consumet.ts.
<category> is the category of the provider. For example, anime
or book
, etc
.
<provider-name> is the name of the provider. For example, libgen
or gogoanime
, etc
. (must be in camel case)
> tree
.github/
docs/
├── guides/
| ├── ...
| ├── anime.md
| ├── getting-started.md
│ └── contributing.md (informal guide)
├── providers/
│ └── <provider-name>.md (provider documentation)
├── README.md
examples/
provider-templates/
src/
|── extractors
|── html
|── models
├── providers
│ ├── <category>
│ │ ├── mod.rs
│ │ └── <provider-name>.rs
│ └── <category>
├── utils
└── lib.rs
.gitignore
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Cargo.toml
LICENSE
README.md
- Create a new file in the
src/providers/<category>/<provider-name>.rs
folder. - Start writing your provider code.
- Add the provider to the
src/providers/<category>/mod.rs
file.
- Update the documentation.
- Commit the changes.
- Update the provider code.
- Commit the changes.
When you've made changes to one or more files, you have to commit that file. You also need a message for that commit.
You should read these guidelines, or that summarized:
- Short and detailed
- Prefix one of these commit types:
feat:
A feature, possibly improving something already existingfix:
A fix, for example of a bugrefactor:
Refactoring a specific section of the codebasetest:
Everything related to testingdocs:
Everything related to documentationchore:
Code maintenance
Examples:
feat: Speed up parsing with new technique
fix: Fix 9anime search
refactor: Reformat code at 9anime.rs