Universal File Format Converter
A powerful command-line tool for converting files between various formats
UniConvert-CLI is a universal file format converter designed for developers, content creators, and power users who need to convert files quickly and efficiently from the command line.
Why UniConvert-CLI?
- 🚀 All-in-One Solution: Convert documents, images, audio, video, archives, and data formats
- ⚡ Lightning Fast: Multi-threaded batch processing for maximum efficiency
- 🎯 Easy to Use: Simple commands with intelligent defaults
- 🔧 Extensible: Plugin architecture for custom converters
- 💪 Reliable: Comprehensive error handling and validation
- Supported Formats: PDF, DOCX, TXT, MD, HTML, EPUB, RTF, ODT
- Convert between office documents and markup formats
- Preserve formatting during conversion
- Supported Formats: PNG, JPG, GIF, BMP, WebP, TIFF, SVG, ICO
- Quality control and optimization
- Batch resize and format conversion
- Supported Formats: MP3, WAV, FLAC, AAC, OGG, M4A, WMA
- Bitrate and quality adjustment
- Metadata preservation
- Supported Formats: MP4, AVI, MKV, MOV, WMV, FLV, WebM
- Resolution and frame rate control
- Hardware acceleration support (via ffmpeg)
- Supported Formats: ZIP, TAR, GZIP, BZIP2, XZ, 7Z, RAR
- Extract and repackage archives
- Cross-format archive conversion
- Supported Formats: JSON, YAML, XML, CSV, TOML, INI
- Structured data transformation
- Format validation
# Install from PyPI
pip install uniconvert-cli
# Or install with development dependencies
pip install uniconvert-cli[dev]# Convert a single file
uniconvert input.jpg output.png
# Convert to specific format
uniconvert document.docx -f pdf
# Batch convert
uniconvert *.jpg -o output_dir/ -f png
# Convert with quality options
uniconvert video.mp4 output.webm --quality 80 --fps 30# List all supported formats
uniconvert --list-formats
# Check available dependencies
uniconvert --check-deps
# Show help
uniconvert --help# Convert image format
uniconvert photo.png photo.jpg
# Convert with specific quality
uniconvert image.png -f jpg -q 90
# Convert document
uniconvert report.docx -f pdf# Convert all images in a directory
uniconvert *.png -o converted/ -f jpg
# Convert with parallel processing
uniconvert *.mp4 -o output/ -f webm -j 8# Video conversion with custom settings
uniconvert input.mp4 output.mp4 --resolution 1920x1080 --fps 30 --bitrate 2M
# Audio conversion with quality setting
uniconvert input.wav output.mp3 --bitrate 320k
# Dry run (show what would be done)
uniconvert *.png -f jpg --dry-runUniConvert-CLI was designed with the following principles:
- Simplicity: Common tasks should be simple, complex tasks possible
- Performance: Leverage multi-threading for batch operations
- Reliability: Comprehensive error handling and validation
- Extensibility: Easy to add new format support
- Integration: Works well in scripts and CI/CD pipelines
# Clone the repository
git clone https://github.com/yourusername/uniconvert-cli.git
cd uniconvert-cli
# Install in development mode
pip install -e ".[dev]"
# Run tests
make test
# Build package
make buildWe welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
UniConvert-CLI 是一款通用文件格式转换器,专为开发者、内容创作者和高级用户设计,可以从命令行快速高效地转换文件。
为什么选择 UniConvert-CLI?
- 🚀 一体化解决方案:转换文档、图片、音频、视频、压缩包和数据格式
- ⚡ 极速转换:多线程批处理,效率最大化
- 🎯 简单易用:简洁命令,智能默认设置
- 🔧 可扩展:插件架构支持自定义转换器
- 💪 稳定可靠:全面的错误处理和验证
- 支持格式:PDF、DOCX、TXT、MD、HTML、EPUB、RTF、ODT
- 在办公文档和标记格式之间转换
- 转换过程中保留格式
- 支持格式:PNG、JPG、GIF、BMP、WebP、TIFF、SVG、ICO
- 质量控制和优化
- 批量调整大小和格式转换
- 支持格式:MP3、WAV、FLAC、AAC、OGG、M4A、WMA
- 比特率和质量调整
- 保留元数据
- 支持格式:MP4、AVI、MKV、MOV、WMV、FLV、WebM
- 分辨率和帧率控制
- 硬件加速支持(通过 ffmpeg)
- 支持格式:ZIP、TAR、GZIP、BZIP2、XZ、7Z、RAR
- 解压和重新打包压缩包
- 跨格式压缩包转换
- 支持格式:JSON、YAML、XML、CSV、TOML、INI
- 结构化数据转换
- 格式验证
# 从 PyPI 安装
pip install uniconvert-cli
# 或者安装开发依赖版本
pip install uniconvert-cli[dev]# 转换单个文件
uniconvert input.jpg output.png
# 转换为特定格式
uniconvert document.docx -f pdf
# 批量转换
uniconvert *.jpg -o output_dir/ -f png
# 带质量选项的转换
uniconvert video.mp4 output.webm --quality 80 --fps 30# 列出所有支持的格式
uniconvert --list-formats
# 检查可用依赖
uniconvert --check-deps
# 显示帮助
uniconvert --help# 转换图片格式
uniconvert photo.png photo.jpg
# 带特定质量的转换
uniconvert image.png -f jpg -q 90
# 转换文档
uniconvert report.docx -f pdf# 转换目录中的所有图片
uniconvert *.png -o converted/ -f jpg
# 并行处理转换
uniconvert *.mp4 -o output/ -f webm -j 8# 带自定义设置的视频转换
uniconvert input.mp4 output.mp4 --resolution 1920x1080 --fps 30 --bitrate 2M
# 带质量设置的音频转换
uniconvert input.wav output.mp3 --bitrate 320k
# 试运行(显示将要执行的操作)
uniconvert *.png -f jpg --dry-runUniConvert-CLI 遵循以下设计原则:
- 简洁性:常见任务简单,复杂任务可行
- 性能:利用多线程进行批量操作
- 可靠性:全面的错误处理和验证
- 可扩展性:易于添加新格式支持
- 集成性:与脚本和 CI/CD 管道良好配合
# 克隆仓库
git clone https://github.com/yourusername/uniconvert-cli.git
cd uniconvert-cli
# 以开发模式安装
pip install -e ".[dev]"
# 运行测试
make test
# 构建包
make build我们欢迎贡献!详情请参阅我们的贡献指南。
- Fork 仓库
- 创建功能分支 (
git checkout -b feature/amazing-feature) - 提交更改 (
git commit -m 'feat: add amazing feature') - 推送到分支 (
git push origin feature/amazing-feature) - 打开 Pull Request
本项目采用 MIT 协议 - 详情请参阅 LICENSE 文件。