sojorn/sojorn_app/tools/README.md
2026-02-01 16:06:12 -06:00

59 lines
1.7 KiB
Markdown

# Reaction Tools
This folder contains tools for managing reaction sets in Sojorn.
## Available Tools
### 1. add_reaction_folder.dart
**Purpose**: Add new reaction folders to the reaction picker
**When to use**: After creating a new folder with images and credit.md
**How to run**:
```bash
# Windows (easy)
tools\add_new_folder.bat
# Manual
dart tools/add_reaction_folder.dart
```
**What it does**:
- Scans `assets/reactions/` for folders
- Checks which folders have PNG/SVG files
- Updates `lib/widgets/reactions/reaction_picker.dart` to include folders with content
- Ignores empty folders automatically
### 2. generate_reaction_config.dart
**Purpose**: Generate configuration file (legacy/alternative)
**When to use**: If you prefer JSON-based configuration
**How to run**:
```bash
dart tools/generate_reaction_config.dart
```
**What it does**:
- Scans folders and creates `reaction_config.json`
- Lists all files found in each folder
- Provides build-time file discovery
## Recommended Workflow
1. **Create Folder**: `mkdir assets/reactions/yourtheme`
2. **Add Images**: Drop PNG/SVG files in the folder
3. **Add Credits**: Create `credit.md` (optional)
4. **Update Picker**: Run `tools\add_new_folder.bat`
5. **Restart App**: See your new reaction tabs!
## File Naming Tips
The system tries 200+ common file names including:
- Basic: `heart`, `thumbs_up`, `laugh`, `wow`, `sad`, `angry`
- Faces: `smiling_face`, `winking_face`, `laughing_face`, `melting_face`
- Special: `skull`, `ghost`, `robot`, `angel`, `devil`
- Hearts: `heart_with_arrow`, `broken_heart`, `green_heart`, `blue_heart`
- Actions: `clap`, `pray`, `party`, `fire`, `thinking`
- Modern: `lol`, `omg`, `cool`, `hot`, `computer`, `phone`
Use descriptive names with underscores, not spaces or camelCase.