Files
manual_wpf/cleanup_and_setup.bat
2025-07-21 15:32:49 +09:00

67 lines
1.6 KiB
Batchfile

@echo off
echo Cleaning up fletimageanalysis folder for CLI-only processing...
cd fletimageanalysis
REM Delete unnecessary test files
del /q test_*.py 2>nul
del /q python_mapping_usage.py 2>nul
REM Delete backup and alternative files
del /q *_backup.py 2>nul
del /q *_previous.py 2>nul
del /q *_fixed.py 2>nul
del /q cross_tabulated_csv_exporter_*.py 2>nul
REM Delete documentation files
del /q *.md 2>nul
del /q LICENSE 2>nul
del /q .gitignore 2>nul
REM Delete directories not needed for CLI
rmdir /s /q back_src 2>nul
rmdir /s /q docs 2>nul
rmdir /s /q testsample 2>nul
rmdir /s /q uploads 2>nul
rmdir /s /q assets 2>nul
rmdir /s /q results 2>nul
rmdir /s /q __pycache__ 2>nul
rmdir /s /q .vscode 2>nul
rmdir /s /q .git 2>nul
rmdir /s /q .gemini 2>nul
rmdir /s /q .venv 2>nul
echo Essential files for CLI processing:
echo - batch_cli.py
echo - config.py
echo - multi_file_processor.py
echo - pdf_processor.py
echo - dxf_processor.py
echo - gemini_analyzer.py
echo - csv_exporter.py
echo - requirements.txt
echo - mapping_table_json.json
echo - .env
echo.
echo Creating virtual environment...
python -m venv venv
echo.
echo Activating virtual environment and installing packages...
call venv\Scripts\activate.bat
pip install --upgrade pip
pip install PyMuPDF google-genai Pillow ezdxf numpy python-dotenv pandas requests
echo.
echo Testing installation...
python -c "import fitz; print('✓ PyMuPDF OK')"
python -c "import google.genai; print('✓ Gemini API OK')"
python -c "import pandas; print('✓ Pandas OK')"
python -c "import ezdxf; print('✓ EZDXF OK')"
echo.
echo Setup complete!
echo Virtual environment created at: fletimageanalysis\venv\
echo.
pause