Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files1234572 unmodified lines7879808182838410 unmodified lines9596979899100101113 unmodified lines21521621721821922023 unmodified lines244245246247248249250251252188 unmodified lines44144244344444544644744844945045145228 unmodified lines4814824834844854864874884893 unmodified lines4934944954964974984998 unmodified lines5085095105115125135142 unmodified lines5175185195205215225235242 unmodified lines5275285295305315325337 unmodified lines54154254354454554654716 unmodified lines56456556656756856957057157257357457557657757857910 unmodified lines59059159259359459559659759859960060160214 unmodified lines61761861962062162262338 unmodified lines66266366466566666766866922 unmodified lines6926936946956966976986 unmodified lines7057067077087097107116 unmodified lines7187197207217227237248 unmodified lines7337347357367377387399 unmodified lines74975075175275375426 unmodified lines781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">72 unmodified lines40% { opacity: 0.026331; }45% { opacity: 0.048532; }50% { opacity: 0.026331; }55% { opacity: 0.048532; }60% { opacity: 0.026331; }65% { opacity: 0.048532; }70% { opacity: 0.026331; }10 unmodified linesposition: relative;}.glitch::before, .glitch::after {content: attr(data-text);position: absolute;top: 0;113 unmodified linesborder: 2px dashed var(--dark-green);background: linear-gradient(135deg, rgba(0, 255, 65, 0.02) 0%, rgba(0, 0, 0, 0.3) 100%);transition: all 0.3s ease;}.drop-zone.drag-over {23 unmodified lines50% { box-shadow: 0 0 20px var(--electric-blue), 0 0 40px var(--electric-blue); }}.pulse-green { animation: pulse-green 2s infinite; }.pulse-crimson { animation: pulse-crimson 2s infinite; }.pulse-blue { animation: pulse-blue 2s infinite; }/* Scan Line Animation */@keyframes scanline {188 unmodified lines/* Responsive */@media (max-width: 768px) {.data-grid {grid-template-columns: 1fr;}}</style></head><body class="crt neural-bg grid-bg hex-pattern"><div class="scan-overlay"></div>28 unmodified lines<section class="border-b border-green-900/50 bg-black/80 p-4"><div class="max-w-screen-2xl mx-auto"><div class="grid md:grid-cols-2 gap-6"><!-- Drop Zone --><div class="drop-zone rounded-lg p-6 text-center" id="drop-zone"><input type="file" id="file-input" accept=".py,.sh" class="hidden"><div id="drop-content"><div class="w-16 h-16 mx-auto mb-4 rounded-full border-2 border-dashed border-green-700 flex items-center justify-center">3 unmodified lines</div><p class="text-green-400 font-bold mb-2">DROP SCRIPT FILE HERE</p><p class="text-green-700 text-xs mb-4">or click to browse (.py / .sh)</p><button onclick="document.getElementById('file-input').click()" class="btn-arc bg-green-900/30 border border-green-700 text-green-400 px-6 py-2 text-xs hover:bg-green-800/50 transition-all">BROWSE FILES</button></div>8 unmodified lines</div></div><div id="file-type-badge" class="file-badge python mx-auto mb-3">PYTHON</div><button onclick="clearFile()" class="text-xs text-crimson hover:text-crimson/70 underline">[REMOVE FILE]</button></div></div>2 unmodified lines<div class="flex items-center justify-between mb-3 border-b border-green-900/50 pb-2"><span class="text-xs text-green-600 font-bold">SOURCE CODE PREVIEW</span><div class="flex gap-2"><button onclick="pasteFromClipboard()" class="text-xs text-cyan-400 hover:text-cyan-300">[PASTE]</button><button onclick="clearPreview()" class="text-xs text-crimson hover:text-crimson/70">[CLEAR]</button></div></div><textarea id="code-preview" class="flex-1 bg-black/50 border border-green-900/30 text-green-300 p-3 font-mono text-xs resize-none focus:outline-none" rows="8" placeholder="// Script source code will appear here... // Or paste code directly"></textarea>2 unmodified lines<!-- Parse Controls --><div class="mt-4 flex flex-wrap items-center justify-between gap-4"><div class="flex items-center gap-4 text-xs"><label class="flex items-center gap-2 cursor-pointer"><input type="checkbox" id="detect-args" checked class="accent-green-500"><span class="text-green-400">Auto-detect Arguments</span>7 unmodified lines<span class="text-green-400">Dark Theme GUI</span></label></div><button onclick="parseScript()" id="parse-btn" class="btn-arc bg-gradient-to-r from-green-700 to-green-600 text-black font-bold px-8 py-3 hover:from-green-500 hover:to-green-400 transition-all uppercase tracking-widest text-sm pulse-green flex items-center gap-2"><span id="parse-btn-text">⚡ CONVERT TO GUI</span><div id="parse-spinner" class="hidden w-5 h-5 border-2 border-black border-t-transparent rounded-full animate-spin"></div></button>16 unmodified lines<!-- Tab Navigation --><div class="border-b border-green-900/50 bg-black/90"><div class="max-w-screen-2xl mx-auto flex overflow-x-auto"><button onclick="switchTab('params')" id="tab-params" class="tab-btn active px-6 py-4 text-xs font-mono border-r border-green-900/50 whitespace-nowrap"><span class="mr-2">01</span>PARAMETERS</button><button onclick="switchTab('preview')" id="tab-preview" class="tab-btn px-6 py-4 text-xs font-mono border-r border-green-900/50 whitespace-nowrap hover:text-green-400"><span class="mr-2">02</span>GUI PREVIEW</button><button onclick="switchTab('code')" id="tab-code" class="tab-btn px-6 py-4 text-xs font-mono border-r border-green-900/50 whitespace-nowrap hover:text-green-400"><span class="mr-2">03</span>GENERATED CODE</button><button onclick="switchTab('export')" id="tab-export" class="tab-btn px-6 py-4 text-xs font-mono whitespace-nowrap hover:text-green-400"><span class="mr-2">04</span>EXPORT</button></div>10 unmodified lines<span class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></span>DETECTED PARAMETERS</h2><button onclick="addCustomParam()" class="text-xs border border-green-700 px-3 py-1 hover:bg-green-900 transition-all">+ ADD CUSTOM</button></div><div id="params-container" class="grid md:grid-cols-2 gap-4"><!-- Dynamic parameter cards --><div class="col-span-2 text-center py-12 text-green-700"><div class="w-16 h-16 mx-auto mb-4 border-2 border-dashed border-green-900 rounded-full flex items-center justify-center"><span class="text-2xl">⚡</span>14 unmodified linesLIVE GUI PREVIEW</h2><div class="flex gap-2"><button onclick="refreshPreview()" class="text-xs border border-cyan-700 px-3 py-1 hover:bg-cyan-900/30 transition-all">REFRESH</button><select id="theme-select" onchange="changeTheme()" class="bg-black border border-cyan-800 text-cyan-400 text-xs px-2 py-1"><option value="cyber">CYBER GREEN</option><option value="crimson">CRIMSON RED</option>38 unmodified linesGENERATED HTML CODE</h2><div class="flex gap-2"><button onclick="copyGeneratedCode()" class="text-xs border border-purple-700 px-3 py-1 hover:bg-purple-900/30 transition-all">COPY ALL</button><button onclick="downloadGenerated()" class="text-xs bg-purple-900/30 border border-purple-600 px-3 py-1 hover:bg-purple-800/50 transition-all">DOWNLOAD .HTML</button></div></div>22 unmodified lines</div><h3 class="text-amber-400 font-bold mb-2">STANDALONE HTML</h3><p class="text-amber-600/70 text-xs mb-4">Single file with embedded CSS/JS</p><button onclick="exportStandalone()" class="w-full btn-arc bg-amber-900/30 border border-amber-600 text-amber-400 py-2 hover:bg-amber-800/50 transition-all text-xs font-bold">DOWNLOAD</button></div>6 unmodified lines</div><h3 class="text-cyan-400 font-bold mb-2">PYTHON WRAPPER</h3><p class="text-cyan-600/70 text-xs mb-4">Tkinter wrapper for original script</p><button onclick="exportPythonWrapper()" class="w-full btn-arc bg-cyan-900/30 border border-cyan-600 text-cyan-400 py-2 hover:bg-cyan-800/50 transition-all text-xs font-bold">DOWNLOAD</button></div>6 unmodified lines</div><h3 class="text-green-400 font-bold mb-2">ELECTRON APP</h3><p class="text-green-600/70 text-xs mb-4">Desktop application package</p><button onclick="exportElectron()" class="w-full btn-arc bg-green-900/30 border border-green-600 text-green-400 py-2 hover:bg-green-800/50 transition-all text-xs font-bold">DOWNLOAD</button></div>8 unmodified lines<div class="max-w-screen-2xl mx-auto"><div class="flex items-center justify-between mb-2"><span class="text-xs text-green-600 font-bold">CONVERSION LOG</span><button onclick="clearTerminal()" class="text-xs text-green-700 hover:text-green-500">[CLEAR]</button></div><div id="terminal-output" class="font-mono text-xs text-green-400/80 h-32 overflow-auto bg-black/50 p-3 rounded border border-green-900/30"><div class="text-green-700">Black Arch Script GUI Converter initialized...</div>9 unmodified lineslet currentScript = null;let detectedParams = [];let generatedGUI = null;// Clockfunction updateClock() {26 unmodified linesdocument.getElementById('terminal-output').innerHTML = '';}// File Drop Handlingconst dropZone = document.getElementById('drop-zone');const fileInput = document.getElementById('file-input');dropZone.addEventListener('dragover', (e) => {e.preventDefault();dropZone.classList.add('drag-over');});dropZone.addEventListener('dragleave', () => {dropZone.classList.remove('drag-over');});dropZone.addEventListener('drop', (e) => {e.preventDefault();dropZone.classList.remove('drag-over');const files = e.dataTransfer.files;if (files.length > 0) handleFile(files[0]);});dropZone.addEventListener('click', () => {fileInput.click();});fileInput.addEventListener('change', (e) => {if (e.target.files.length > 0) handleFile(e.target.files[0]);});function handleFile(file) {const ext = file.name.split('.').pop().toLowerCase();if (!['py', 'sh'].includes(ext)) {log('Invalid file type. Only .py and .sh supported', 'error');return;}currentScript = {name: file.name,size: file.size,type: ext,content: ''};const reader = new FileReader();reader.onload = (e) => {currentScript.content = e.target.result;document.getElementById('code-preview').value = e.target.result;updateFileDisplay();log(`Loaded ${file.name} (${(file.size/1024).toFixed(2)} KB)`, 'success');};reader.readAsText(file);}function updateFileDisplay() {document.getElementById('drop-content').classList.add('hidden');document.getElementById('file-info').classList.remove('hidden');dropZone.classList.add('has-file');document.getElementById('filename').textContent = currentScript.name;document.getElementById('filesize').textContent =`${(currentScript.size / 1024).toFixed(2)} KB`;const badge = document.getElementById('file-type-badge');badge.className = `file-badge mx-auto mb-3 ${currentScript.type === 'py' ? 'python' : 'bash'}`;badge.textContent = currentScript.type === 'py' ? 'PYTHON' : 'BASH';}function clearFile() {currentScript = null;document.getElementById('drop-content').classList.remove('hidden');document.getElementById('file-info').classList.add('hidden');dropZone.classList.remove('has-file');document.getElementById('code-preview').value = '';document.getElementById('file-input').value = '';log('File cleared', 'info');}function pasteFromClipboard() {navigator.clipboard.readText().then(text => {document.getElementById('code-preview').value = text;currentScript = {name: 'pasted_script.py',size: text.length,type: 'py',content: text};log('Pasted from clipboard', 'success');}).catch12345672 unmodified lines7980818283848510 unmodified lines96979899100101102103113 unmodified lines21721821922022122222323 unmodified lines247248249250251252253254255256257258259260261262263188 unmodified lines45245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149228 unmodified lines5215225235245255265275285293 unmodified lines5335345355365375385398 unmodified lines5485495505515525535542 unmodified lines5575585595605615625635642 unmodified lines5675685695705715725737 unmodified lines58158258358458558658716 unmodified lines60460560660760860961061161261361461561661761861910 unmodified lines63063163263363463563663763863964064114 unmodified lines65665765865966066166238 unmodified lines70170270370470570670770822 unmodified lines7317327337347357367376 unmodified lines7447457467477487497506 unmodified lines7577587597607617627638 unmodified lines7727737747757767777789 unmodified lines78878979079179279379426 unmodified lines821822823824825<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">72 unmodified lines40% { opacity: 0.026331; }45% { opacity: 0.048532; }50% { opacity: 0.026331; }55% { opacity: 0.048532; }60% { opacity: 0.026331; }65% { opacity: 0.048532; }70% { opacity: 0.026331; }10 unmodified linesposition: relative;}.glitch::before,.glitch::after {content: attr(data-text);position: absolute;top: 0;113 unmodified linesborder: 2px dashed var(--dark-green);background: linear-gradient(135deg, rgba(0, 255, 65, 0.02) 0%, rgba(0, 0, 0, 0.3) 100%);transition: all 0.3s ease;cursor: pointer;}.drop-zone.drag-over {23 unmodified lines50% { box-shadow: 0 0 20px var(--electric-blue), 0 0 40px var(--electric-blue); }}.pulse-green {animation: pulse-green 2s infinite;}.pulse-crimson {animation: pulse-crimson 2s infinite;}.pulse-blue {animation: pulse-blue 2s infinite;}/* Scan Line Animation */@keyframes scanline {188 unmodified lines/* Responsive */@media (max-width: 768px) {.data-grid { grid-template-columns: 1fr; }}/* Text colors using CSS variables */.text-crimson { color: var(--crimson); }.text-electric-blue, .text-cyan-400 { color: var(--electric-blue); }.text-amber-400 { color: var(--amber); }.text-purple-400 { color: var(--purple); }.border-crimson { border-color: var(--crimson); }.border-electric-blue { border-color: var(--electric-blue); }.hover\:text-crimson:hover { color: var(--crimson); }.hover\:text-cyan-300:hover { color: var(--cyan); }.bg-cyan-900\/30 { background: rgba(0, 240, 255, 0.3); }.border-cyan-600 { border-color: var(--electric-blue); }.text-cyan-500 { color: var(--electric-blue); }.border-cyan-700 { border-color: var(--electric-blue); }.bg-cyan-900\/30 { background: rgba(0, 240, 255, 0.3); }.hover\:bg-cyan-800\/50:hover { background: rgba(0, 240, 255, 0.5); }.border-cyan-500\/30 { border-color: rgba(0, 240, 255, 0.3); }.bg-purple-900\/30 { background: rgba(191, 0, 255, 0.3); }.border-purple-600 { border-color: var(--purple); }.border-purple-700 { border-color: var(--purple); }.hover\:bg-purple-900\/30:hover { background: rgba(191, 0, 255, 0.3); }.hover\:bg-purple-800\/50:hover { background: rgba(191, 0, 255, 0.5); }.text-purple-500 { color: var(--purple); }.border-purple-500\/30 { border-color: rgba(191, 0, 255, 0.3); }.bg-amber-900\/30 { background: rgba(255, 170, 0, 0.3); }.border-amber-600 { border-color: var(--amber); }.border-amber-500\/30 { border-color: rgba(255, 170, 0, 0.3); }.hover\:bg-amber-800\/50:hover { background: rgba(255, 170, 0, 0.5); }.text-amber-500 { color: var(--amber); }.text-amber-600\/70 { color: rgba(255, 170, 0, 0.7); }</style></head><body class="crt neural-bg grid-bg hex-pattern"><div class="scan-overlay"></div>28 unmodified lines<section class="border-b border-green-900/50 bg-black/80 p-4"><div class="max-w-screen-2xl mx-auto"><div class="grid md:grid-cols-2 gap-6"><!-- Drop Zone --><div class="drop-zone rounded-lg p-6 text-center relative" id="drop-zone"><input type="file" id="file-input" accept=".py,.sh" class="hidden"><div id="drop-content"><div class="w-16 h-16 mx-auto mb-4 rounded-full border-2 border-dashed border-green-700 flex items-center justify-center">3 unmodified lines</div><p class="text-green-400 font-bold mb-2">DROP SCRIPT FILE HERE</p><p class="text-green-700 text-xs mb-4">or click to browse (.py / .sh)</p><button type="button" id="browse-btn" class="btn-arc bg-green-900/30 border border-green-700 text-green-400 px-6 py-2 text-xs hover:bg-green-800/50 transition-all">BROWSE FILES</button></div>8 unmodified lines</div></div><div id="file-type-badge" class="file-badge python mx-auto mb-3">PYTHON</div><button type="button" onclick="clearFile()" class="text-xs text-crimson hover:text-crimson/70 underline">[REMOVE FILE]</button></div></div>2 unmodified lines<div class="flex items-center justify-between mb-3 border-b border-green-900/50 pb-2"><span class="text-xs text-green-600 font-bold">SOURCE CODE PREVIEW</span><div class="flex gap-2"><button type="button" onclick="pasteFromClipboard()" class="text-xs text-cyan-400 hover:text-cyan-300">[PASTE]</button><button type="button" onclick="clearPreview()" class="text-xs text-crimson hover:text-crimson/70">[CLEAR]</button></div></div><textarea id="code-preview" class="flex-1 bg-black/50 border border-green-900/30 text-green-300 p-3 font-mono text-xs resize-none focus:outline-none" rows="8" placeholder="// Script source code will appear here... // Or paste code directly"></textarea>2 unmodified lines<!-- Parse Controls --><div class="mt-4 flex flex-wrap items-center justify-between gap-4"><div class="flex items-center gap-4 text-xs flex-wrap"><label class="flex items-center gap-2 cursor-pointer"><input type="checkbox" id="detect-args" checked class="accent-green-500"><span class="text-green-400">Auto-detect Arguments</span>7 unmodified lines<span class="text-green-400">Dark Theme GUI</span></label></div><button type="button" onclick="parseScript()" id="parse-btn" class="btn-arc bg-gradient-to-r from-green-700 to-green-600 text-black font-bold px-8 py-3 hover:from-green-500 hover:to-green-400 transition-all uppercase tracking-widest text-sm pulse-green flex items-center gap-2"><span id="parse-btn-text">⚡ CONVERT TO GUI</span><div id="parse-spinner" class="hidden w-5 h-5 border-2 border-black border-t-transparent rounded-full animate-spin"></div></button>16 unmodified lines<!-- Tab Navigation --><div class="border-b border-green-900/50 bg-black/90"><div class="max-w-screen-2xl mx-auto flex overflow-x-auto"><button type="button" onclick="switchTab('params')" id="tab-params" class="tab-btn active px-6 py-4 text-xs font-mono border-r border-green-900/50 whitespace-nowrap"><span class="mr-2">01</span>PARAMETERS</button><button type="button" onclick="switchTab('preview')" id="tab-preview" class="tab-btn px-6 py-4 text-xs font-mono border-r border-green-900/50 whitespace-nowrap hover:text-green-400"><span class="mr-2">02</span>GUI PREVIEW</button><button type="button" onclick="switchTab('code')" id="tab-code" class="tab-btn px-6 py-4 text-xs font-mono border-r border-green-900/50 whitespace-nowrap hover:text-green-400"><span class="mr-2">03</span>GENERATED CODE</button><button type="button" onclick="switchTab('export')" id="tab-export" class="tab-btn px-6 py-4 text-xs font-mono whitespace-nowrap hover:text-green-400"><span class="mr-2">04</span>EXPORT</button></div>10 unmodified lines<span class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></span>DETECTED PARAMETERS</h2><button type="button" onclick="addCustomParam()" class="text-xs border border-green-700 px-3 py-1 hover:bg-green-900 transition-all">+ ADD CUSTOM</button></div><div id="params-container" class="grid md:grid-cols-2 gap-4"><div class="col-span-2 text-center py-12 text-green-700"><div class="w-16 h-16 mx-auto mb-4 border-2 border-dashed border-green-900 rounded-full flex items-center justify-center"><span class="text-2xl">⚡</span>14 unmodified linesLIVE GUI PREVIEW</h2><div class="flex gap-2"><button type="button" onclick="refreshPreview()" class="text-xs border border-cyan-700 px-3 py-1 hover:bg-cyan-900/30 transition-all">REFRESH</button><select id="theme-select" onchange="changeTheme()" class="bg-black border border-cyan-800 text-cyan-400 text-xs px-2 py-1"><option value="cyber">CYBER GREEN</option><option value="crimson">CRIMSON RED</option>38 unmodified linesGENERATED HTML CODE</h2><div class="flex gap-2"><button type="button" onclick="copyGeneratedCode()" class="text-xs border border-purple-700 px-3 py-1 hover:bg-purple-900/30 transition-all">COPY ALL</button><button type="button" onclick="downloadGenerated()" class="text-xs bg-purple-900/30 border border-purple-600 px-3 py-1 hover:bg-purple-800/50 transition-all">DOWNLOAD .HTML</button></div></div>22 unmodified lines</div><h3 class="text-amber-400 font-bold mb-2">STANDALONE HTML</h3><p class="text-amber-600/70 text-xs mb-4">Single file with embedded CSS/JS</p><button type="button" onclick="exportStandalone()" class="w-full btn-arc bg-amber-900/30 border border-amber-600 text-amber-400 py-2 hover:bg-amber-800/50 transition-all text-xs font-bold">DOWNLOAD</button></div>6 unmodified lines</div><h3 class="text-cyan-400 font-bold mb-2">PYTHON WRAPPER</h3><p class="text-cyan-600/70 text-xs mb-4">Tkinter wrapper for original script</p><button type="button" onclick="exportPythonWrapper()" class="w-full btn-arc bg-cyan-900/30 border border-cyan-600 text-cyan-400 py-2 hover:bg-cyan-800/50 transition-all text-xs font-bold">DOWNLOAD</button></div>6 unmodified lines</div><h3 class="text-green-400 font-bold mb-2">ELECTRON APP</h3><p class="text-green-600/70 text-xs mb-4">Desktop application package</p><button type="button" onclick="exportElectron()" class="w-full btn-arc bg-green-900/30 border border-green-600 text-green-400 py-2 hover:bg-green-800/50 transition-all text-xs font-bold">DOWNLOAD</button></div>8 unmodified lines<div class="max-w-screen-2xl mx-auto"><div class="flex items-center justify-between mb-2"><span class="text-xs text-green-600 font-bold">CONVERSION LOG</span><button type="button" onclick="clearTerminal()" class="text-xs text-green-700 hover:text-green-500">[CLEAR]</button></div><div id="terminal-output" class="font-mono text-xs text-green-400/80 h-32 overflow-auto bg-black/50 p-3 rounded border border-green-900/30"><div class="text-green-700">Black Arch Script GUI Converter initialized...</div>9 unmodified lineslet currentScript = null;let detectedParams = [];let generatedGUI = null;let currentTab = 'params';// Clockfunction updateClock() {26 unmodified linesdocument.getElementById('terminal-output').innerHTML = '';}// File Drop Handling - FIXEDconst dropZone = document.getElementById('drop
index.html+72-117