diff --git a/batch_v3.py b/batch_v3.py index e104291..95ddd61 100644 --- a/batch_v3.py +++ b/batch_v3.py @@ -62,12 +62,13 @@ def verify_script( script: str, source_dir: str, target_file: str, - job_dir: Path, + job_dir: str | Path, ) -> dict: """Execute script on 2 sample files to verify correctness. Returns {"ok": True/False, "processed": int, "errors": [...], "error": str}. """ + job_dir = Path(job_dir) # Select 2 sample xlsx files all_xlsx = sorted( f for f in Path(source_dir).rglob("*.xlsx") diff --git a/static/batch3.html b/static/batch3.html index 43771e4..c86e630 100644 --- a/static/batch3.html +++ b/static/batch3.html @@ -32,8 +32,10 @@ pre { background: #2c2c2c; color: #f5f0eb; padding: .8rem; border-radius: 6px; o .info-row span { background: #ede5db; padding: 3px 10px; border-radius: 6px; } .spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; margin-right: 6px; } @keyframes spin { to { transform: rotate(360deg); } } -.copy-btn { position: absolute; top: 4px; right: 4px; padding: 3px 10px; font-size: .7rem; background: rgba(255,255,255,.85); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; z-index: 1; } -.copy-btn:hover { background: #fff; color: var(--text); } +.copy-btn { position: absolute; top: 4px; right: 4px; padding: 4px 12px; font-size: .75rem; background: var(--card); color: var(--accent); border: 1.5px solid var(--accent); border-radius: 4px; cursor: pointer; z-index: 1; font-weight: 600; } +.copy-btn:hover { background: var(--accent); color: #fff; } +.copy-btn-inline { display: inline-block; padding: 4px 14px; font-size: .75rem; background: var(--card); color: var(--accent); border: 1.5px solid var(--accent); border-radius: 4px; cursor: pointer; font-weight: 600; margin-top: .5rem; } +.copy-btn-inline:hover { background: var(--accent); color: #fff; } .verify-ok { background: #e8f5e9; border: 1px solid var(--green); border-radius: 6px; padding: .5rem .8rem; margin: .5rem 0; font-size: .85rem; color: var(--green); } .verify-fail { background: #fce4ec; border: 1px solid var(--accent); border-radius: 6px; padding: .5rem .8rem; margin: .5rem 0; font-size: .85rem; color: var(--accent); } @@ -75,10 +77,8 @@ pre { background: #2c2c2c; color: #f5f0eb; padding: .8rem; border-radius: 6px; o