Thank you for your interest in contributing to Auto Clipper! This document provides guidelines and information for contributors.
- Rust 1.75.0 or higher
- FFmpeg
- yt-dlp
- curl
- Git
- Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/clipper-rust.git
cd clipper-rust- Set up environment
cp .env.example .env
# Add your Gemini API key to .env- Install dependencies and build
cargo build
cargo test- Check if the bug has already been reported in Issues
- If not, create a new issue with:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- System information (OS, Rust version, etc.)
- Error messages or logs
- Check Issues for existing feature requests
- Create a new issue with:
- Clear description of the feature
- Use case and motivation
- Possible implementation approach
- Create a branch
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix-
Make your changes
- Follow the coding standards below
- Add tests for new functionality
- Update documentation if needed
-
Test your changes
cargo test
cargo clippy
cargo fmt- Commit your changes
git add .
git commit -m "feat: add new feature" # or "fix: resolve bug"- Push and create PR
git push origin your-branch-nameThen create a Pull Request on GitHub.
- Use
cargo fmtfor formatting - Use
cargo clippyfor linting - Follow Rust naming conventions
- Add documentation comments for public functions
- Keep functions small and focused
Follow Conventional Commits:
feat:new featuresfix:bug fixesdocs:documentation changesstyle:formatting changesrefactor:code refactoringtest:adding testschore:maintenance tasks
/// Analyzes video with Gemini AI to suggest viral clips
///
/// # Arguments
/// * `video_info` - Video title and metadata
/// * `duration` - Video duration in seconds
///
/// # Returns
/// * `Result<String, Box<dyn std::error::Error>>` - JSON response from Gemini
async fn analyze_with_gemini(
video_info: &str,
duration: f64
) -> Result<String, Box<dyn std::error::Error>> {
// Implementation
}# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run with output
cargo test -- --nocapture#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_timestamp_parsing() {
// Test implementation
}
#[tokio::test]
async fn test_async_function() {
// Async test implementation
}
}- Add rustdoc comments for public APIs
- Include examples in documentation
- Update README.md for user-facing changes
docs/
├── README.md # Main documentation
├── installation.md # Installation guide
├── usage.md # Usage examples
├── configuration.md # Configuration options
├── api.md # API reference
└── development.md # Development guide
- Update version in
Cargo.toml - Update
CHANGELOG.md - Create release PR
- Tag release after merge
- GitHub Actions will build and publish
- GitHub Discussions for questions and ideas
- Issues for bugs and feature requests
By contributing, you agree that your contributions will be licensed under the MIT License.
Contributors will be recognized in:
- README.md contributors section
- Release notes
- GitHub contributors page
Thank you for contributing to Auto Clipper! 🎉