primer commit
This commit is contained in:
commit
2be35d7e55
17 files changed
+2709
No files matched your search
@@ -0,0 +1,70 @@
|
||||
# Configuración
|
||||
|
||||
## Requisitos
|
||||
|
||||
- Python 3.10+
|
||||
- Playwright (chromium)
|
||||
- Acceso a HANA (hdbcli)
|
||||
- **Google Chrome** (para `get_token_headless.py`)
|
||||
- **rsync** (Mac/Linux) o **net use** (Windows) para SMB
|
||||
|
||||
## Instalación
|
||||
|
||||
```bash
|
||||
# Crear y activar entorno virtual (recomendado)
|
||||
python3 -m venv sunat-env
|
||||
source sunat-env/bin/activate
|
||||
|
||||
# Instalar dependencias
|
||||
pip install -r requirements.txt
|
||||
playwright install chromium
|
||||
```
|
||||
|
||||
## Variables de Entorno (`.env`)
|
||||
|
||||
```ini
|
||||
# SUNAT
|
||||
SUNAT_RUC=20503662869
|
||||
SUNAT_USER=TAGUMED3
|
||||
SUNAT_PASSWORD=xxxxx
|
||||
|
||||
# HANA
|
||||
HANA_HOST=192.168.1.175
|
||||
HANA_PORT=30015
|
||||
HANA_USER=SYSTEM
|
||||
HANA_PASSWORD=SAPB1Admin.25
|
||||
HANA_SCHEMA=SBO_TAGUMEDICA_21
|
||||
|
||||
# SMB / NAS
|
||||
SMB_SERVER=192.168.1.175
|
||||
SMB_SHARE=FileSAP
|
||||
SMB_USER=tu_usuario
|
||||
SMB_PASSWORD=tu_contraseña
|
||||
SMB_MOUNT_MAC=/Volumes/FileSAP
|
||||
SMB_MOUNT_LINUX=/mnt/filesap
|
||||
SMB_MOUNT_WINDOWS=S:
|
||||
SMB_SUBFOLDER=COMPRAS/TAGUMEDICA/ADJUNTOS_CORREOS
|
||||
```
|
||||
|
||||
## Ejecución
|
||||
|
||||
```bash
|
||||
# Activar entorno virtual
|
||||
source sunat-env/bin/activate
|
||||
|
||||
# Obtener token manualmente (con navegador visible)
|
||||
python get_token.py
|
||||
|
||||
# Obtener token headless (sin ventana, requiere Chrome real)
|
||||
python get_token_headless.py
|
||||
|
||||
# Daemon completo (automático)
|
||||
python main.py
|
||||
|
||||
# Reporte de fallas (resumen texto + gráficos PNG)
|
||||
python reporte_fallas.py
|
||||
```
|
||||
|
||||
## Logs
|
||||
|
||||
Todos los logs se guardan en `logs/YYYY-MM-DD.log`. Rotación automática diaria, los archivos mayores a 7 días se eliminan.
|
||||
Reference in new issue
Block a user