Add comprehensive documentation and code comments

This commit adds extensive documentation to the Mistral OCR CLI project:

- Add API.md with detailed API response format documentation
- Add CHANGELOG.md to track version changes
- Add CONTRIBUTING.md with guidelines for contributors
- Enhance README.md with more detailed usage examples and troubleshooting
- Add proper docstrings to all Python modules and functions
- Update requirements.txt with development dependencies
- Improve setup.py with better metadata

These changes make the project more accessible to users and contributors.
This commit is contained in:
2025-04-24 21:11:41 +02:00
parent 240d64023b
commit 5e891ef461
13 changed files with 786 additions and 15 deletions
+17 -1
View File
@@ -1,10 +1,24 @@
from setuptools import setup, find_packages
import os
import re
# Read version from __init__.py
with open(os.path.join('mistral_ocr', '__init__.py'), 'r') as f:
version_match = re.search(r"__version__\s*=\s*['\"]([^'\"]*)['\"]", f.read())
version = version_match.group(1) if version_match else '0.1.0'
# Read long description from README.md
with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
setup(
name="mistral-ocr",
version="0.1.0",
version=version,
description="A CLI tool for performing OCR on documents using Mistral AI",
long_description=long_description,
long_description_content_type="text/markdown",
author="Mistral OCR Team",
url="https://github.com/yourusername/mistral-ocr-python",
packages=find_packages(),
install_requires=[
"requests>=2.25.0",
@@ -23,6 +37,8 @@ setup(
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Text Processing",
"Topic :: Utilities",
],
python_requires=">=3.7",
)