chore: remove outdated CODE_OF_CONDUCT and CONTRIBUTING documents

pull/2558/head
MinhVu2711 2 months ago
parent ca1bf6d7cf
commit 8090d87782

@ -0,0 +1,635 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
**Reddit Video Maker Bot - Manual Pipeline**
This project creates short-form videos from manually captured screenshots of social media posts (Reddit, Threads, X/Twitter, or any platform). The workflow is:
1. **Capture**: User manually screenshots posts and comments
2. **Organize**: Place screenshots in structured folders with text files
3. **Process**: Bot generates TTS audio from text files
4. **Render**: Bot assembles screenshots + audio + background into final video
**Key Philosophy**: No API access required. Works with any platform. User controls content selection.
## Tech Stack
- **Python**: 3.10, 3.11, or 3.12 (strict requirement)
- **FFmpeg**: Video processing and encoding (libx264 CPU encoder by default)
- **MoviePy**: Video/audio manipulation
- **TTS Engines**: Multiple providers (OhFreeMe, Crikk, GoogleTranslate, ElevenLabs, AWS Polly, OpenAI, TikTok)
- **Configuration**: TOML format (config.toml)
- **Dependencies**: See requirements.txt
## Development Commands
### Setup
```bash
# Create virtual environment
python3 -m venv ./venv
source ./venv/bin/activate # On Windows: .\venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install Playwright (for screenshot tools if needed)
python -m playwright install
python -m playwright install-deps
```
### Manual Pipeline Commands
```bash
# Create a new post folder with template files
python manual_main.py init <post_id> [--platform reddit|threads|x|other]
# Render a single post into video
python manual_main.py render <post_id>
# Render all unrendered posts
python manual_main.py render --all
# Re-render even if already done
python manual_main.py render <post_id> --force
# List all posts and their status
python manual_main.py list
```
### Testing Individual Modules
```bash
# Test TTS processor (after creating a post folder with text files)
python -c "from manual.scanner import PostScanner; from manual.tts_processor import ManualTTSProcessor; scanner = PostScanner(); post = scanner.scan_one('test_post'); tts = ManualTTSProcessor(post); tts.process()"
# Test scanner validation
python -c "from manual.scanner import PostScanner; scanner = PostScanner(); print(scanner.list_status())"
```
## Architecture: manual_main.py Workflow
### Entry Point: manual_main.py
**Purpose**: CLI entry point for the manual screenshot-to-video pipeline.
**Key Functions**:
- `load_config()`: Loads config.toml and sets up settings.config globally for TTS engines
- `cmd_init()`: Creates new post folder with template structure
- `cmd_render()`: Orchestrates the render pipeline (TTS → Video)
- `cmd_list()`: Lists all posts with status (ready/incomplete/empty)
**Configuration Strategy**:
1. Starts with built-in defaults (so TTS engines always have required config)
2. Deep-merges config.toml on top of defaults
3. Extracts `[manual]` section for manual-specific settings
4. Sets `settings.config` globally so shared modules (TTS, backgrounds) work
### Pipeline Flow
```
User Input (Screenshots + Text)
PostScanner (manual/scanner.py)
↓ validates & builds post_object
ManualTTSProcessor (manual/tts_processor.py)
↓ text → MP3 audio files
ManualVideoBuilder (manual/video_builder.py)
↓ screenshots + audio + background → MP4
Final Video (manual_results/)
```
### Module: manual/scanner.py
**Class**: `PostScanner`
**Responsibilities**:
- Scans `manual_posts/` directory for post folders
- Validates folder structure (naming convention, required files)
- Builds unified `post_object` dict for downstream processing
**File Naming Convention**:
```
<number>_<type>.<ext>
Examples:
0_title.png # Screenshot of post title (required)
0_title.txt # Text for TTS (required if no .mp3)
0_title.mp3 # Pre-recorded audio (optional, skips TTS if present)
1_comment.png # Screenshot of comment 1
1_comment.txt # Text for TTS
2_comment.png # Screenshot of comment 2
2_comment.txt # Text for TTS
```
**meta.json Format** (Optional):
The `meta.json` file provides optional metadata about the post. It's created automatically by `python manual_main.py init` with a template structure.
```json
{
"platform": "reddit",
"post_id": "my_post_001",
"title": "What's the most underrated life hack?",
"author": "u/username",
"url": "https://reddit.com/r/AskReddit/comments/...",
"created_at": "2026-05-26",
"tags": ["life_hacks", "tips"],
"notes": "High engagement post, good for shorts"
}
```
**Fields**:
- `platform`: Source platform (reddit, threads, x, other) - used in post_object
- `post_id`: Post identifier - should match folder name
- `title`: Post title - used if 0_title.txt is empty or missing
- `author`: Original author - used in post_object for tracking
- `url`: Source URL - used in post_object for reference
- `created_at`: Original post date - for your records
- `tags`: List of tags - for organization/filtering
- `notes`: Free-form notes - for your records
**Usage**:
- All fields are optional (scanner provides defaults)
- `platform`, `title`, `author`, `url` are read by scanner and included in post_object
- `created_at`, `tags`, `notes` are for your organization only (not used by pipeline)
- If `title` is empty, scanner uses first 100 chars of 0_title.txt
- If `platform` is empty, defaults to "other"
**Validation Rules**:
- At least 1 image file must exist
- Title image (0_title.png) is required
- Each image must have corresponding .mp3 OR .txt file
- .mp3 takes priority over .txt (if both exist, TTS is skipped)
- .txt files must not be empty (if no .mp3 exists)
**post_object Structure**:
```python
{
"post_id": str, # Folder name
"platform": str, # From meta.json or "reddit" default
"title": str, # From meta.json or extracted from 0_title.txt
"author": str, # From meta.json or "unknown"
"url": str, # From meta.json or ""
"post_dir": str, # Absolute path to post folder
"screenshots": [
{
"index": int, # 0, 1, 2, ...
"type": "title"|"comment", # From filename
"image_path": str, # Absolute path to .png
"text_path": str|None, # Absolute path to .txt (if exists)
"audio_path": str|None, # Absolute path to .mp3 (if exists)
"text": str|None, # Text content (loaded from .txt)
"audio_duration": float|None # Set by TTS processor
},
...
]
}
```
### Module: manual/tts_processor.py
**Class**: `ManualTTSProcessor`
**Responsibilities**:
- Converts text files to MP3 audio using configured TTS engine
- Skips TTS if pre-recorded .mp3 already exists
- Respects max_video_length by truncating clips
- Updates post_object with audio_path and audio_duration
**TTS Engine Selection**:
- Reads from `settings.config["settings"]["tts"]["voice_choice"]`
- Supported engines: ohfreeme, crikk, googletranslate, elevenlabs, aws_polly, openai, tiktok, pyttsx
- Falls back to GoogleTranslate if config missing (no API key needed)
**Processing Flow**:
1. Filter screenshots that need TTS (have text_path, no audio_path)
2. For each screenshot:
- Load text from .txt file
- Strip comments (lines starting with #)
- Call TTS engine to generate MP3
- Probe audio duration with ffmpeg
- Update screenshot dict with audio_path and audio_duration
3. Check total duration against max_video_length
4. Truncate if needed (keeps title + as many comments as fit)
**Key Methods**:
- `process()`: Main entry point, returns updated post_object
- `_load_text()`: Loads text from .txt file, strips comments
- `_generate_audio()`: Calls TTS engine wrapper
- `_get_audio_duration()`: Uses ffmpeg.probe to get duration
### Module: manual/video_builder.py
**Class**: `ManualVideoBuilder`
**Responsibilities**:
- Downloads/selects background video and audio
- Chops backgrounds to match video length
- Overlays screenshots onto background with timing
- Applies watermark (if enabled)
- Renders final MP4 video
**Video Assembly Pipeline**:
1. **Background Selection**:
- Scans local directories (assets/backgrounds/video, assets/backgrounds/audio)
- If local files exist: picks random
- If no local files: downloads from YouTube (via background_options)
2. **Background Preparation**:
- Chops video/audio to match total TTS duration
- Crops video to aspect ratio (W:H from config)
- Removes audio from background video (will be mixed later)
3. **Audio Track Assembly**:
- Concatenates all TTS audio clips in order
- Mixes with background audio at configured volume
- Outputs final audio track
4. **Video Overlay**:
- Scales background to final resolution (W×H)
- For each screenshot:
- Scales to screenshot_width_percent of video width
- Applies opacity
- Overlays at center position
- Enables only during its audio duration
- Overlays watermark (if enabled) at position (0,0)
5. **Rendering**:
- Uses FFmpeg with configured encoder (libx264 default)
- Shows progress bar during render
- Saves to output_dir with normalized filename
- Records to video_creation/data/videos.json (prevents re-rendering)
**Key Configuration**:
- `encoder`: Video encoder (libx264 for CPU, h264_nvenc for NVIDIA GPU)
- `resolution_w`, `resolution_h`: Output video dimensions (1080×1920 default)
- `opacity`: Screenshot overlay opacity (0.0-1.0)
- `screenshot_width_percent`: Screenshot width as % of video width (85 default)
- `background_audio_volume`: Background audio volume (0.0-1.0, 0 = disabled)
- `watermark_enabled`: Enable/disable watermark overlay
- `watermark_path`: Path to watermark PNG (must be 1080×1920 with alpha transparency)
**Background Priority**:
1. Local files in `background_video_dir` / `background_audio_dir`
2. YouTube download (if config specifies name and no local files)
3. Random selection if config = "random"
### Module: TTS/engine_wrapper.py
**Class**: `TTSEngine`
**Purpose**: Unified wrapper for all TTS engines. Used by both manual and automated workflows.
**Key Methods**:
- `run()`: Main entry point, generates MP3 files for all text
- `call_tts()`: Calls specific TTS module with text and filepath
- `split_post()`: Splits long text into chunks if exceeds max_chars
- `add_periods()`: Normalizes text (adds periods, removes URLs)
**TTS Module Interface**:
Each TTS module (TTS/OhFreeMe.py, TTS/Crikk.py, etc.) must implement:
```python
class TTSModule:
max_chars: int # Maximum characters per request
def run(self, text: str, filepath: str, random_voice: bool = False):
# Generate TTS audio and save to filepath
pass
```
## Configuration: config.toml
### Manual Pipeline Section
```toml
[manual]
input_dir = "manual_posts" # Input folder for post folders
output_dir = "manual_results" # Output folder for rendered videos
encoder = "libx264" # Video encoder (libx264 or h264_nvenc)
resolution_w = 1080 # Video width
resolution_h = 1920 # Video height (portrait)
opacity = 0.9 # Screenshot overlay opacity
background_video = "random" # "random" or specific name
background_audio = "random" # "random" or specific name
background_audio_volume = 0.15 # 0.0 = disabled, 1.0 = full volume
max_video_length = 120 # Max video duration in seconds
screenshot_width_percent = 85 # Screenshot width as % of video width
watermark_enabled = true # Enable watermark overlay
watermark_path = "assets/backgrounds/transparent-bg.png" # Watermark PNG path
background_video_dir = "assets/backgrounds/video" # Local video files
background_audio_dir = "assets/backgrounds/audio" # Local audio files
```
### TTS Configuration (Shared)
```toml
[settings.tts]
voice_choice = "ohfreeme" # TTS engine to use
random_voice = false # Randomize voice per clip
silence_duration = 0.3 # Silence between clips (seconds)
no_emojis = false # Strip emojis from text
# OhFreeMe TTS (Vietnamese support)
ohfreeme_lang = "vi" # Language code
ohfreeme_gender = "random" # "male", "female", or "random"
ohfreeme_rate = 1 # Speech rate (0.5-2.0)
ohfreeme_pitch = 0 # Pitch adjustment (-10 to 10)
ohfreeme_enhance = false # Audio enhancement
# Crikk TTS
# (API key loaded from environment variable CRIKK_API_KEY)
# ElevenLabs TTS
elevenlabs_voice_name = "Bella"
elevenlabs_api_key = "" # Or use ELEVEN_API_KEY env var
# OpenAI TTS
openai_api_url = "https://api.openai.com/v1/"
openai_api_key = "" # Or use OPENAI_API_KEY env var
openai_voice_name = "alloy"
openai_model = "tts-1"
# AWS Polly TTS
aws_polly_voice = "Matthew"
# TikTok TTS
tiktok_voice = "en_us_001"
tiktok_sessionid = "" # Required for TikTok TTS
```
### Resolution and Aspect Ratio
```toml
[settings]
resolution_w = 1080 # Also used by manual pipeline if not in [manual]
resolution_h = 1920 # Also used by manual pipeline if not in [manual]
opacity = 0.9 # Also used by manual pipeline if not in [manual]
```
## Environment Variables
Some TTS engines load configuration from environment variables via a `.env` file in the project root. The project uses `python-dotenv` to load these variables.
**TTS Engines Using Environment Variables**:
- **OhFreeMe**: Requires API URL, base URL, and JWT token
- **Crikk**: Requires API URL and base URL
- **ElevenLabs**: Can use `ELEVEN_API_KEY` (alternative to config.toml)
- **OpenAI**: Can use `OPENAI_API_KEY` (alternative to config.toml)
**Priority**: Environment variables take precedence over config.toml values for API keys.
**Security Note**: The `.env` file should be added to `.gitignore` and never committed to version control.
## Common Development Patterns
### Adding a New Post
```bash
# 1. Create folder structure
python manual_main.py init my_post_001 --platform reddit
# 2. Add screenshots and text files
# - Capture screenshots from social media
# - Save as 0_title.png, 1_comment.png, 2_comment.png, ...
# - Edit corresponding .txt files with text for TTS
# 3. Render video
python manual_main.py render my_post_001
# 4. Check output
ls manual_results/my_post_001.mp4
```
### Using Pre-recorded Audio
If you have pre-recorded audio (e.g., from a professional voice actor):
```bash
# Place .mp3 files alongside .txt files
manual_posts/my_post/
├── 0_title.png
├── 0_title.mp3 # Pre-recorded audio (TTS will be skipped)
├── 0_title.txt # Optional, for reference
├── 1_comment.png
├── 1_comment.mp3 # Pre-recorded audio
└── 1_comment.txt # Optional
```
The scanner prioritizes .mp3 over .txt. TTS is only called if .mp3 is missing.
### Debugging TTS Issues
```bash
# 1. Check which TTS engine is configured
grep "voice_choice" config.toml
# 2. Test TTS engine directly
python -c "from TTS.OhFreeMe import OhFreeMe; tts = OhFreeMe(); tts.run('Test text', 'test.mp3')"
# 3. Check TTS output files
ls assets/temp/<post_id>/mp3/
# 4. Verify audio duration
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 assets/temp/<post_id>/mp3/0_title.mp3
```
### Debugging Video Rendering Issues
```bash
# 1. Check FFmpeg installation
ffmpeg -version
# 2. Test encoder (libx264 should always work)
ffmpeg -f lavfi -i testsrc=duration=1:size=1080x1920:rate=30 -c:v libx264 test.mp4
# 3. Check background files
ls assets/backgrounds/video/
ls assets/backgrounds/audio/
# 4. Check temp files during render
ls assets/temp/<post_id>/
# Should contain: background.mp4, background.mp3, background_noaudio.mp4, audio.mp3
# 5. Check watermark file
ls assets/backgrounds/transparent-bg.png
```
### Changing Video Encoder
For faster rendering with NVIDIA GPU:
```toml
[manual]
encoder = "h264_nvenc" # Requires NVIDIA GPU with NVENC support
```
Test if NVENC is available:
```bash
ffmpeg -encoders | grep nvenc
```
### Batch Processing Multiple Posts
```bash
# Create multiple posts
for id in post_001 post_002 post_003; do
python manual_main.py init $id
done
# After adding screenshots and text, render all
python manual_main.py render --all
```
## File Structure
```
RedditVideoMakerBot/
├── manual_main.py # CLI entry point for manual pipeline
├── config.toml # Configuration file
├── requirements.txt # Python dependencies
├── manual/ # Manual pipeline modules
│ ├── __init__.py
│ ├── scanner.py # Folder scanner & validator
│ ├── tts_processor.py # TTS text → MP3
│ └── video_builder.py # Video assembly & rendering
├── TTS/ # TTS engine implementations
│ ├── engine_wrapper.py # Unified TTS wrapper
│ ├── OhFreeMe.py # OhFreeMe TTS (Vietnamese)
│ ├── Crikk.py # Crikk TTS
│ ├── GTTS.py # Google Translate TTS
│ ├── elevenlabs.py # ElevenLabs TTS
│ ├── aws_polly.py # AWS Polly TTS
│ ├── openai_tts.py # OpenAI TTS
│ ├── TikTok.py # TikTok TTS
│ └── pyttsx.py # pyttsx3 TTS (offline)
├── video_creation/ # Shared video utilities
│ ├── background.py # Background download & chopping
│ ├── final_video.py # (Not used by manual pipeline)
│ ├── screenshot_downloader.py # (Not used by manual pipeline)
│ └── voices.py # (Not used by manual pipeline)
├── utils/ # Shared utilities
│ ├── settings.py # Config loader
│ ├── console.py # Rich console output
│ ├── ffmpeg_install.py # FFmpeg checker
│ ├── voice.py # Text sanitization
│ └── ...
├── manual_posts/ # Input: User-created post folders
│ └── <post_id>/
│ ├── meta.json # Optional metadata
│ ├── 0_title.png # Required: Title screenshot
│ ├── 0_title.txt # Required: Title text for TTS
│ ├── 1_comment.png # Optional: Comment screenshots
│ ├── 1_comment.txt # Optional: Comment text for TTS
│ └── ...
├── manual_results/ # Output: Rendered videos
│ └── <post_id>.mp4
├── assets/
│ ├── backgrounds/
│ │ ├── video/ # Local background videos
│ │ ├── audio/ # Local background audio
│ │ └── transparent-bg.png # Watermark overlay
│ └── temp/ # Temporary files during render
│ └── <post_id>/
│ ├── mp3/ # TTS audio files
│ ├── background.mp4 # Chopped background video
│ ├── background.mp3 # Chopped background audio
│ └── ...
└── video_creation/data/
└── videos.json # Tracking of rendered videos (prevents re-render)
```
## Important Notes
### Python Version Requirement
The project strictly requires Python 3.10, 3.11, or 3.12. This is checked at startup in manual_main.py:
```python
if sys.version_info.major != 3 or sys.version_info.minor not in [10, 11, 12]:
print("This program requires Python 3.10, 3.11, or 3.12.")
sys.exit(1)
```
### FFmpeg Requirement
FFmpeg must be installed on the system. The bot checks for FFmpeg at startup via `ffmpeg_install()` and will attempt to install it if missing (on some platforms).
### Config.toml Can Be Empty
The manual pipeline has built-in defaults for all settings. If config.toml is missing or empty, the bot will use GoogleTranslate TTS (no API key needed) and default video settings.
### Watermark Overlay
The watermark feature overlays a PNG image on top of the entire video. The watermark file must:
- Be 1080×1920 pixels (matching video resolution)
- Have alpha transparency (transparent areas show video underneath)
- Be placed at `assets/backgrounds/transparent-bg.png` (or custom path in config)
The watermark is overlaid at position (0,0) and spans the entire video duration.
### Video Tracking
Rendered videos are tracked in `video_creation/data/videos.json` to prevent re-rendering. This file is shared between manual and automated workflows. To force re-render:
```bash
python manual_main.py render <post_id> --force
```
Or manually remove the entry from videos.json.
### Background Video/Audio Sources
**Priority**:
1. Local files in `assets/backgrounds/video/` and `assets/backgrounds/audio/`
2. YouTube download (if no local files and config specifies a name)
**Local Files**:
- Drop .mp4/.mkv/.webm files into `assets/backgrounds/video/`
- Drop .mp3/.wav/.ogg files into `assets/backgrounds/audio/`
- Bot will randomly select from available files
**YouTube Download**:
- Defined in `video_creation/background.py``background_options` dict
- Downloads on first use, cached for future renders
- Requires internet connection
### TTS Engine Selection
The manual pipeline uses the same TTS engines as the automated workflow. Engine is selected via `settings.config["settings"]["tts"]["voice_choice"]`.
**Recommended for Vietnamese**: `ohfreeme` or `crikk`
**Recommended for English**: `elevenlabs`, `openai`, or `googletranslate`
**No API Key Required**: `googletranslate` (default fallback)
### Text File Format
Text files (.txt) support comments:
```
# This is a comment and will be ignored by TTS
This text will be read by TTS.
# Another comment
More text to be read.
```
Lines starting with `#` are stripped before TTS processing.
### Error Handling
The manual pipeline validates post folders before rendering:
- Missing required files → Error message with specific missing files
- Empty text files → Error message
- Invalid naming convention → Files are ignored
Use `python manual_main.py list` to check status of all posts before rendering.

@ -1,127 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at the [discord server](https://discord.gg/yqNvvDMYpq).
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

@ -1,147 +0,0 @@
# Contributing to Reddit Video Maker Bot 🎥
Thanks for taking the time to contribute! ❤️
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for the maintainers and smooth out the experience for all involved. We are looking forward to your contributions. 🎉
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
>
> - ⭐ Star the project
> - 📣 Tweet about it
> - 🌲 Refer this project in your project's readme
## Table of Contents
- [Contributing to Reddit Video Maker Bot 🎥](#contributing-to-reddit-video-maker-bot-)
- [Table of Contents](#table-of-contents)
- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Reporting Bugs](#reporting-bugs)
- [How Do I Submit a Good Bug Report?](#how-do-i-submit-a-good-bug-report)
- [Suggesting Enhancements](#suggesting-enhancements)
- [How Do I Submit a Good Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
- [Your First Code Contribution](#your-first-code-contribution)
- [Your environment](#your-environment)
- [Making your first PR](#making-your-first-pr)
- [Improving The Documentation](#improving-the-documentation)
## I Have a Question
> If you want to ask a question, we assume that you have read the available [Documentation](https://reddit-video-maker-bot.netlify.app/).
Before you ask a question, it is best to search for existing [Issues](https://github.com/elebumm/RedditVideoMakerBot/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
If you then still feel the need to ask a question and need clarification, we recommend the following:
- Open an [Issue](https://github.com/elebumm/RedditVideoMakerBot/issues/new).
- Provide as much context as you can about what you're running into.
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
We will then take care of the issue as soon as possible.
Additionally, there is a [Discord Server](https://discord.gg/swqtb7AsNQ) for any questions you may have
## I Want To Contribute
### Reporting Bugs
<details><summary><h4>Before Submitting a Bug Report</h4></summary>
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g., using incompatible environment components/versions (Make sure that you have read the [documentation](https://luka-hietala.gitbook.io/documentation-for-the-reddit-bot/). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [issues](https://github.com/elebumm/RedditVideoMakerBot/).
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue - you probably aren't the first to get the error!
- Collect information about the bug:
- Stack trace (Traceback) - preferably formatted in a code block.
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
- Your input and the output
- Is the issue reproducible? Does it exist in previous versions?
#### How Do I Submit a Good Bug Report?
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
- Open an [Issue](https://github.com/elebumm/RedditVideoMakerBot/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.
Once it's filed:
- The project team will label the issue accordingly.
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will try to support you as best as they can, but you may not receive an instant.
- If the team discovers that this is an issue it will be marked `bug` or `error`, as well as possibly other tags relating to the nature of the error), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
</details>
### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for Reddit Video Maker Bot, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
<details><summary><h4>Before Submitting an Enhancement</h4></summary>
- Make sure that you are using the latest version.
- Read the [documentation](https://luka-hietala.gitbook.io/documentation-for-the-reddit-bot/) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/elebumm/RedditVideoMakerBot/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset.
#### How Do I Submit a Good Enhancement Suggestion?
Enhancement suggestions are tracked as [GitHub issues](https://github.com/elebumm/RedditVideoMakerBot/issues).
- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->
- **Explain why this enhancement would be useful** to most users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
</details>
### Your First Code Contribution
#### Your environment
You development environment should follow the requirements stated in the [README file](README.md). If you are not using the specified versions, **please reference this in your pull request**, so reviewers can test your code on both versions.
#### Setting up your development repository
These steps are only specified for beginner developers trying to contribute to this repository.
If you know how to make a fork and clone, you can skip these steps.
Before contributing, follow these steps (if you are a beginner)
- Create a fork of this repository to your personal account
- Clone the repo to your computer
- Make sure that you have all dependencies installed
- Run `python main.py` to make sure that the program is working
- Now, you are all setup to contribute your own features to this repo!
Even if you are a beginner to working with python or contributing to open source software,
don't worry! You can still try contributing even to the documentation!
("Setting up your development repository" was written by a beginner developer themselves!)
#### Making your first PR
When making your PR, follow these guidelines:
- Your branch has a base of _develop_, **not** _master_
- You are merging your branch into the _develop_ branch
- You link any issues that are resolved or fixed by your changes. (this is done by typing "Fixes #\<issue number\>") in your pull request
- Where possible, you have used `git pull --rebase`, to avoid creating unnecessary merge commits
- You have meaningful commits, and if possible, follow the commit style guide of `type: explanation`
- Here are the commit types:
- **feat** - a new feature
- **fix** - a bug fix
- **docs** - a change to documentation / commenting
- **style** - formatting changes - does not impact code
- **refactor** - refactored code
- **chore** - updating configs, workflows etc - does not impact code
### Improving The Documentation
All updates to the documentation should be made in a pull request to [this repo](https://github.com/LukaHietala/RedditVideoMakerBot-website)
Loading…
Cancel
Save