Metadata-Version: 2.4
Name: bid-generator-core
Version: 3.0.0
Summary: Core library for generating professional bid proposal documents with strict source priority management
Project-URL: Homepage, https://github.com/openclaw/bid-generator
Project-URL: Documentation, https://github.com/openclaw/bid-generator/docs
Project-URL: Repository, https://github.com/openclaw/bid-generator.git
Project-URL: Issues, https://github.com/openclaw/bid-generator/issues
Author-email: OpenClaw <openclaw@example.com>
License: MIT License
        
        Copyright (c) 2025 OpenClaw
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: bid,document,generator,proposal,tender
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Requires-Dist: pypdf2>=3.0.0
Requires-Dist: python-docx>=0.8.11
Provides-Extra: dev
Requires-Dist: black>=22.0; extra == 'dev'
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pylint>=2.15; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# Bid Generator Core

A framework-agnostic core library for generating professional bid proposal documents (投标文件) with strict source priority management and core constraint checking.

## Features

- **Source Priority Management (P0-P3)**: Strict hierarchy for data sources
  - P0: Tender document (highest priority)
  - P1: Format template
  - P2: Existing data (company info, qualifications, cases)
  - P3: Industry standards (reference only)

- **Core Constraints**:
  - Content authenticity - no fabrication
  - Format compliance - follow template
  - Response completeness - address all substantial clauses
  - Missing items marked as `【待补充：XXX】`

- **Five-Step Workflow**:
  1. Parse tender document
  2. Parse format template
  3. Load existing data
  4. Content generation
  5. Quality check

## Installation

```bash
pip install bid-generator-core
```

## Quick Start

```python
from bid_generator_core import BidGenerator, generate_bid_document

# Method 1: Using the generator class
generator = BidGenerator(
    data_dir="./data",
    tender_doc_path="./tender.pdf",
    template_path="./template.docx",
    output_dir="./outputs"
)

result = generator.save()
print(f"Document generated: {result.document_path}")
print(f"Missing items: {result.missing_items}")

# Method 2: Using the convenience function
output_path = generate_bid_document(
    data_dir="./data",
    tender_doc_path="./tender.pdf"
)
```

## Data Directory Structure

```
data/
├── company_info.json      # Company basic information
├── project_info.json      # Project details
├── qualifications.json    # Certifications and qualifications
├── team_info.json         # Team member information
└── project_cases.json     # Historical project cases
```

## Advanced Usage

```python
from bid_generator_core import BidGenerator, GenerationResult

# Custom configuration
generator = BidGenerator(
    data_dir="./data",
    tender_doc_path="./tender.pdf",
    template_path="./template.docx",
    company_info={"name": "My Company"},  # Override from JSON
    auto_execute=True
)

# Get detailed result
result: GenerationResult = generator.save(return_result=True)

# Access reports
print(result.traceability_report)  # Data source traceability
print(result.quality_report)       # Quality check results
```

## Framework Adapters

This core library is used by various framework adapters:

- **OpenClaw Skill**: See `adapters/openclaw/`
- **Claude Code Skill**: See `.claude/skills/bid-generator/`

## License

MIT License
