5e891ef461
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.
45 lines
1.4 KiB
Python
45 lines
1.4 KiB
Python
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=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",
|
|
],
|
|
entry_points={
|
|
"console_scripts": [
|
|
"mistral-ocr=mistral_ocr.__main__:main",
|
|
],
|
|
},
|
|
classifiers=[
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.7",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Topic :: Text Processing",
|
|
"Topic :: Utilities",
|
|
],
|
|
python_requires=">=3.7",
|
|
)
|