Add unit tests for PDF Packager converter functionality

- Implement tests for converter properties, ensuring correct input and output formats.
- Add tests for chip parsing, covering various image, pdf_image, and pdfa chip formats.
- Include tests for the isArchiveOutput and getOutputFileName functions.
- Mock execFile for testing the convert function, verifying command execution and output file creation.
- Ensure all chips are parseable and validate the completeness of chip categories.
This commit is contained in:
Your Name 2026-01-24 14:39:22 +08:00
parent 87bd318303
commit 944fe18b75
11 changed files with 2233 additions and 8 deletions

125
LICENSE-OVERVIEW.md Normal file
View file

@ -0,0 +1,125 @@
# License Overview
This project uses a **Mixed License / Source-Available** model.
---
## 📋 Quick Summary
| Component Type | License | Commercial Use |
| ------------------------ | --------------------- | -------------------------------- |
| Upstream (from ConvertX) | AGPL-3.0 | ✅ Allowed (with source sharing) |
| Author Original | Custom Non-Commercial | ❌ Requires Permission |
---
## 1. Upstream Components (AGPL-3.0)
### What's Covered
Core functionality derived from [C4illin/ConvertX](https://github.com/C4illin/ConvertX):
- Base application architecture
- Original converter integrations
- Core API structure
### Your Obligations
Under AGPL-3.0, if you modify and deploy this software as a network service:
1. ✅ You must make your modified source code available
2. ✅ You must include the AGPL-3.0 license
3. ✅ You must state your changes
### Full License
See [LICENSE](LICENSE) for the complete AGPL-3.0 text.
---
## 2. Author Original Components (Custom Non-Commercial)
### What's Covered
All original work created by the ConvertX-CN author:
- 🌐 **i18n / Localization** - 65+ language translations
- 🎨 **UI Enhancements** - Custom interface improvements
- 📊 **PDF Translation** - PDFMathTranslate, BabelDOC integrations
- 📄 **MinerU Integration** - PDF to Markdown conversion
- 🔧 **New Converters** - Additional format support
- 📚 **Documentation** - Chinese documentation
- 🐳 **Docker Optimizations** - Multi-arch builds, CJK fonts
### Permissions
| Use Case | Allowed? |
| ----------------------- | ------------------------ |
| Personal use | ✅ Yes |
| Educational use | ✅ Yes |
| Non-commercial research | ✅ Yes |
| Commercial / SaaS | ❌ No (requires license) |
### Full License
See [LICENSE-AUTHOR](LICENSE-AUTHOR) for the complete terms.
---
## 🤝 Commercial Licensing
If you want to use ConvertX-CN in a commercial context:
### Contact Methods
1. **GitHub Issues**: https://github.com/pi-docket/ConvertX-CN/issues
- Create an issue with title: `[Commercial License Request]`
2. **GitHub Discussions**: https://github.com/pi-docket/ConvertX-CN/discussions
- Start a discussion in the appropriate category
3. **GitHub Profile**: https://github.com/pi-docket
- Check profile for additional contact information
### What to Include
When requesting a commercial license, please provide:
- Company/Organization name
- Intended use case
- Expected scale of deployment
- Contact information
---
## ❓ FAQ
### Q: Can I self-host for my company's internal use?
**A:** Internal use without external revenue generation is generally permitted.
If unsure, please contact us.
### Q: Can I offer this as a paid service?
**A:** No. You need a commercial license for SaaS or paid services.
### Q: Do I need to share my modifications?
**A:** For AGPL-3.0 components: Yes, if you deploy as a network service.
For author components: Depends on your license agreement.
### Q: Can I fork and create my own version?
**A:** Yes, but:
- AGPL-3.0 components must remain AGPL-3.0
- Author components cannot be used commercially without permission
---
## 📞 Contact
- **GitHub**: [@pi-docket](https://github.com/pi-docket)
- **Repository**: [ConvertX-CN](https://github.com/pi-docket/ConvertX-CN)
- **Issues**: [Report Issues](https://github.com/pi-docket/ConvertX-CN/issues)
- **Discussions**: [Community](https://github.com/pi-docket/ConvertX-CN/discussions)