✨ initial commit
This commit is contained in:
113
examples/README.md
Normal file
113
examples/README.md
Normal file
@@ -0,0 +1,113 @@
|
||||
# FreezeLib Examples
|
||||
|
||||
**Language / 语言**: [English](README.md) | [中文](README_CN.md)
|
||||
|
||||
This directory contains comprehensive examples demonstrating various features of FreezeLib.
|
||||
|
||||
## 📁 Example Categories
|
||||
|
||||
### [01-basic/](01-basic/) - Basic Usage
|
||||
- Simple code screenshot generation
|
||||
- Basic configuration
|
||||
- Getting started examples
|
||||
|
||||
### [02-formats/](02-formats/) - Output Formats
|
||||
- SVG output examples
|
||||
- PNG output examples
|
||||
- Format comparison
|
||||
- Quality settings
|
||||
|
||||
### [03-themes/](03-themes/) - Theme Showcase
|
||||
- Popular themes demonstration
|
||||
- Theme comparison
|
||||
- Custom theme creation
|
||||
|
||||
### [04-languages/](04-languages/) - Programming Languages
|
||||
- Syntax highlighting for different languages
|
||||
- Language-specific optimizations
|
||||
- Multi-language projects
|
||||
|
||||
### [05-terminal/](05-terminal/) - Terminal Output
|
||||
- ANSI color support
|
||||
- Terminal styling
|
||||
- Command output screenshots
|
||||
|
||||
### [06-advanced/](06-advanced/) - Advanced Configuration
|
||||
- Complex styling options
|
||||
- Performance optimization
|
||||
- Custom fonts and layouts
|
||||
|
||||
### [07-batch/](07-batch/) - Batch Processing
|
||||
- Multiple file processing
|
||||
- Automated workflows
|
||||
- Bulk operations
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
To run all examples:
|
||||
|
||||
```bash
|
||||
cd examples
|
||||
go run run_all_examples.go
|
||||
```
|
||||
|
||||
To run specific category:
|
||||
|
||||
```bash
|
||||
cd examples/01-basic
|
||||
go run main.go
|
||||
```
|
||||
|
||||
## 📊 Output Formats
|
||||
|
||||
Each example category demonstrates:
|
||||
- **SVG**: Vector format, perfect for web and documentation
|
||||
- **PNG**: Raster format, ideal for presentations and social media
|
||||
- **Quality comparisons**: Different settings and their effects
|
||||
|
||||
## 🎨 Visual Features Demonstrated
|
||||
|
||||
- **Syntax Highlighting**: 100+ programming languages
|
||||
- **Themes**: Light, dark, and custom themes
|
||||
- **Window Decorations**: macOS-style window controls
|
||||
- **Line Numbers**: Optional line numbering
|
||||
- **Shadows and Borders**: Visual enhancement effects
|
||||
- **Custom Fonts**: Typography options
|
||||
- **ANSI Colors**: Terminal output rendering
|
||||
- **Responsive Sizing**: Adaptive dimensions
|
||||
|
||||
## 📝 Code Examples Include
|
||||
|
||||
- **Web Development**: HTML, CSS, JavaScript, TypeScript
|
||||
- **Backend**: Go, Python, Java, C#, Rust
|
||||
- **Mobile**: Swift, Kotlin, Dart
|
||||
- **DevOps**: Docker, YAML, Shell scripts
|
||||
- **Data**: SQL, JSON, CSV processing
|
||||
- **Documentation**: Markdown, configuration files
|
||||
|
||||
## 🔧 Configuration Examples
|
||||
|
||||
Each category includes examples of:
|
||||
- Basic configuration
|
||||
- Advanced customization
|
||||
- Performance optimization
|
||||
- Error handling
|
||||
- Best practices
|
||||
|
||||
## 📖 Learning Path
|
||||
|
||||
1. **Start with [01-basic/](01-basic/)** - Learn fundamental concepts
|
||||
2. **Explore [02-formats/](02-formats/)** - Understand output options
|
||||
3. **Try [03-themes/](03-themes/)** - Discover visual styles
|
||||
4. **Check [04-languages/](04-languages/)** - See language support
|
||||
5. **Advanced topics** - Dive into specialized use cases
|
||||
|
||||
## 🤝 Contributing Examples
|
||||
|
||||
To add new examples:
|
||||
|
||||
1. Choose appropriate category or create new one
|
||||
2. Follow the naming convention: `example_name.go`
|
||||
3. Include both code and generated output
|
||||
4. Add documentation in README.md
|
||||
5. Test with `go run main.go`
|
Reference in New Issue
Block a user