Add support for missing Nutrient DWS API tools
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with src/nutrient_dws/api/direct.py and the OpenAPI spec, then choose one unchecked tool rather than treating the full checklist as a single change. Review existing patterns in tests/unit/ and tests/integration/ for file handling, validation, and errors. Done means the selected tool has its DirectAPIMixin method, builder support, tests, and documentation updates.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Missing Tools to Implement
Based on the Nutrient API documentation, the following tools are missing and should be added:
High Priority PDF Processing Tools
- split_pdf - Split PDF into multiple files
- duplicate_pdf_pages - Duplicate specific pages
- delete_pdf_pages - Delete specific pages
- add_page - Add blank or content pages
- set_page_label - Set page labels/numbering
Document Generation Tools
- pdf_generator - Generate PDFs from templates
- pdf_creator - Create PDFs programmatically
- pdf_writer - Write content to PDFs
- url_to_pdf - Convert URLs to PDF
Form and Annotation Tools
- json_import - Import form data from JSON
- xfdf_import - Import XFDF annotations
- pdf_form_filling - Fill PDF forms
- pdf_form_creator - Create interactive forms
- pdf_annotations - Add/modify annotations
Conversion Tools
- pdf_converter - General PDF conversion
- office_to_pdf - Convert Office documents (DOC, DOCX, XLS, XLSX, PPT, PPTX, RTF, ODT)
- image_to_pdf - Convert images (JPG, PNG, TIFF, HEIC, WebP, SVG, GIF, TGA, EPS)
- html_to_pdf - Convert HTML to PDF
- pdf_to_image - Convert PDF to images
- office_to_image - Convert Office documents to images
- html_to_image - Convert HTML to images
- pdf_to_office - Convert PDF to Office formats
- image_to_office - Convert images to Office formats
- html_to_office - Convert HTML to Office formats
Optimization and Archive Tools
- pdf_optimization - Optimize PDF file size
- image_optimization - Optimize images in PDFs
- pdf_linearization - Linearize PDFs for web viewing
- pdf_to_pdf_a - Convert to PDF/A format
- pdf_a_validation - Validate PDF/A compliance
Data Extraction Tools
- text_extraction - Extract text from documents
- key_value_pair_extraction - Extract key-value pairs
- image_to_text - OCR for images
- table_extraction - Extract tables to Excel/XML/JSON/CSV
Security Tools
- pdf_security - Add/remove security settings
- digital_signatures - Add digital signatures (already has basic support)
AI Tools
- ai_redaction - AI-powered redaction (mentioned in OpenAPI spec)
Implementation Guidelines
For each new tool, follow this pattern:
-
Add method to
DirectAPIMixininsrc/nutrient_dws/api/direct.py:def tool_name( self, input_file: FileInput, output_path: Optional[str] = None, **tool_specific_params, ) -> Optional[bytes]: """Tool description.""" return self._process_file("api-tool-name", input_file, output_path, **options) -
Add builder API support - tools should automatically work with builder pattern via
_process_file -
Add comprehensive tests in
tests/unit/andtests/integration/ -
Update documentation with examples and parameter descriptions
-
Follow existing patterns for:
- Error handling (AuthenticationError, APIError)
- File handling (FileInput type)
- Parameter validation
- Type hints and docstrings
Tool Name Mapping
The Python method names should be snake_case versions of the API tool names:
- API:
split-pdf→ Python:split_pdf - API:
office-to-pdf→ Python:office_to_pdf - API:
pdf-to-pdf-a→ Python:pdf_to_pdf_a
Notes
- All tools should support the same file input types:
str(path),bytes, or file-like objects - All tools should support optional
output_pathparameter - Consider adding input format validation where appropriate
- Some tools may need special handling for multiple file inputs/outputs
- Refer to the OpenAPI spec for exact parameter names and types
- Ngôn ngữ chính
- Python
- Star
- 54
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·