Skip to content

Latest commit

 

History

History
112 lines (94 loc) · 3.84 KB

CONTRIBUTING.md

File metadata and controls

112 lines (94 loc) · 3.84 KB

Contributing

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.

Table of Contents

Prerequisites

To contribute to Consumet code, you need to know the following:

Cloning the repository

  1. Fork the repository
  2. 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
  1. Create a new branch:
git checkout -b <new-branch-name>

Project structure

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

Setting up the provider

  1. Create a new file in the src/providers/<category>/<provider-name>.rs folder.
  2. Start writing your provider code.
  3. Add the provider to the src/providers/<category>/mod.rs file.

Updaing codebase

Updating documentation

  1. Update the documentation.
  2. Commit the changes.

Fixing a provider

  1. Update the provider code.
  2. Commit the changes.

Commit message

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 existing
    • fix: A fix, for example of a bug
    • refactor: Refactoring a specific section of the codebase
    • test: Everything related to testing
    • docs: Everything related to documentation
    • chore: Code maintenance

Examples:

  • feat: Speed up parsing with new technique
  • fix: Fix 9anime search
  • refactor: Reformat code at 9anime.rs