-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselectors.json
More file actions
50 lines (50 loc) · 6.91 KB
/
selectors.json
File metadata and controls
50 lines (50 loc) · 6.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
"/": {
"content": "<python>\nimport time, random\nnow = time.strftime('%Y-%m-%d %H:%M:%S')\nuptime = random.randint(10, 999)\nload = round(random.uniform(0.8, 4.2), 2)\ncolor = '\\033[38;5;45m' if load < 2.0 else '\\033[38;5;208m' if load < 3.5 else '\\033[38;5;196m'\nreset = '\\033[0m'\n\nprint(f'{color}🌐 Gopher 2.0{reset}')\nprint(f'{color}──────────────────────{reset}')\nprint(f'\\n🕒 {now}')\nprint(f'⏱️ Uptime: {uptime} min')\nprint(f'📈 Load Avg: {color}{load}{reset}')\n\nif ansi_widgets:\n services = {\n 'Gopherd': random.choice([True, True, False]),\n 'Crypto': True,\n 'Renderer': True,\n 'AnimEngine': random.choice([True, False])\n }\n status_lines = []\n for name, up in services.items():\n icon = '🟢' if up else '🔴'\n status_lines.append(f'{icon} {name}')\n status_panel = ansi_widgets.bordered_panel('🛠️ Servicios', '\\n'.join(status_lines), style='rounded')\n print('\\n' + status_panel)\n</python>\n\n<img>/public/logo.png</img>",
"vars": {}
},
"/about": {
"content": "<md>## 🛡️ Gopher 2.0: La Web que Nunca Fue\n\n- 🔒 **Cifrado E2E**: X25519 + AES-256-GCM\n- ⚡ **Dinámico**: Python seguro en el servidor\n- 🎨 **ANSI Avanzado**: Gráficos, paneles, progreso\n- 🖼️ **Imágenes en terminal**: PNG → ANSI en tiempo real\n- 🎞️ **Animaciones**: Flipbook cifrado\n\n> \"Menos ruido, más señal. Menos JS, más alma.\"</md>",
"vars": {}
},
"/dashboard": {
"content": "<python>\nimport time, random\ntheme = ansi_widgets.ansi_time_theme() if ansi_widgets else ''\nreset = '\\033[0m'\nprint(f'{theme}🌅 Dashboard en Vivo{reset}')\n\nif ansi_widgets:\n # Métricas cambiantes\n cpu = min(100, max(0, 65 + random.randint(-10, 15)))\n ram = min(100, max(0, 42 + random.randint(-8, 12)))\n net = random.randint(10, 120)\n disk = 78\n\n # Gráfico de barras\n stats = {'CPU': cpu, 'RAM': ram, 'Red ↑': net, 'Disco': disk}\n chart = ansi_widgets.bar_chart(stats, width=55, color_map={'CPU': 'red', 'RAM': 'blue', 'Red ↑': 'yellow', 'Disco': 'green'})\n panel = ansi_widgets.bordered_panel('📊 Sistema en Tiempo Real', chart, style='double')\n print('\\n' + panel)\n\n # Barra de progreso con porcentaje\n print('\\n' + ansi_widgets.progress_bar(cpu, 100, 50, ))\n\n # Reloj digital estilizado\n clock = time.strftime('%H:%M:%S')\n print(f'\\n\\033[1;36m🕰️ {clock}\\033[0m')\n</python>",
"vars": {}
},
"/anim": {
"content": "<python>\nif ansi_widgets:\n title = ansi_widgets.gradient_text('🎞️ ANIMACIÓN ANSI', ['red', 'magenta', 'blue'])\n print(title)\nelse:\n print('🎞️ ANIMACIÓN ANSI')\n</python>\n\n<md>\n¡Una explosión de color en tu terminal!\n\nEsta animación se reproduce **automáticamente** si visitas este selector con el cliente Gopher 2.0.\n\n- 12 frames de alta fidelidad\n- Renderizado PNG → ANSI en tiempo real\n- Cifrado de extremo a extremo\n\n> ⚡ **Consejo**: Usa un terminal con soporte truecolor (como Alacritty, Kitty o moderno GNOME Terminal).</md>",
"vars": {}
},
"/anim/frame00": { "content": "<img>/public/anim/frame00.png</img>", "vars": {} },
"/anim/frame01": { "content": "<img>/public/anim/frame01.png</img>", "vars": {} },
"/anim/frame02": { "content": "<img>/public/anim/frame02.png</img>", "vars": {} },
"/anim/frame03": { "content": "<img>/public/anim/frame03.png</img>", "vars": {} },
"/anim/frame04": { "content": "<img>/public/anim/frame04.png</img>", "vars": {} },
"/anim/frame05": { "content": "<img>/public/anim/frame05.png</img>", "vars": {} },
"/anim/frame06": { "content": "<img>/public/anim/frame06.png</img>", "vars": {} },
"/anim/frame07": { "content": "<img>/public/anim/frame07.png</img>", "vars": {} },
"/anim/frame08": { "content": "<img>/public/anim/frame08.png</img>", "vars": {} },
"/anim/frame09": { "content": "<img>/public/anim/frame09.png</img>", "vars": {} },
"/anim/frame10": { "content": "<img>/public/anim/frame10.png</img>", "vars": {} },
"/anim/frame11": { "content": "<img>/public/anim/frame11.png</img>", "vars": {} },
"/cyber": {
"content": "<python>\nimport time\nif ansi_widgets:\n lines = [\n '\\033[38;5;46m> ACCESO CONCEDIDO AL NÚCLEO CYBER\\033[0m',\n '\\033[38;5;46m> INICIANDO SECUENCIA DE DESCIFRADO...\\033[0m',\n ]\n for line in lines:\n print(line)\n time.sleep(0.3)\n \n # Simular descifrado\n for i in range(1, 6):\n dots = '.' * i\n print(f'\\r\\033[38;5;46m> DESCIFRANDO{dots:5}\\033[0m', end='', flush=True)\n time.sleep(0.2)\n print('\\n\\033[1;38;5;46m🔓 ¡SISTEMA DESBLOQUEADO!\\033[0m')\n \n # Matriz de datos\n data = {\n 'Nivel de Amenaza': '🟢 Bajo',\n 'Firewall': '✅ Activo',\n 'Intrusos': '0',\n 'Ancho de Banda': '987 Mbps'\n }\n panel = ansi_widgets.bordered_panel('🛡️ PANEL CYBER DEFENSE', '\\n'.join(f'{k}: {v}' for k, v in data.items()), style='heavy')\n print('\\n' + panel)\nelse:\n print('🔐 Modo Cyber: requiere ansi_widgets')\n</python>",
"vars": {}
},
"/weather": {
"content": "<python>\nimport random\nif ansi_widgets:\n city = 'Neo-Tokyo'\n temp = random.randint(18, 32)\n condition = random.choice(['Soleado ☀️', 'Parcialmente nublado ⛅', 'Lluvia ligera 🌦️'])\n humidity = random.randint(40, 85)\n wind = random.randint(5, 25)\n \n # Icono según clima\n icon = '☀️' if 'Soleado' in condition else '⛅' if 'nublado' in condition else '🌧️'\n \n # Panel meteorológico\n weather_info = f\"{icon} {condition}\\n🌡️ {temp}°C\\n💧 Humedad: {humidity}%\\n💨 Viento: {wind} km/h\"\n panel = ansi_widgets.bordered_panel(f'🌤️ Clima en {city}', weather_info, style='rounded')\n print(panel)\n \n # Pronóstico extendido\n days = ['Hoy', 'Mañana', 'Jueves', 'Viernes']\n temps = [f'{random.randint(20,30)}°' for _ in days]\n forecast = ' '.join(f'{d}: {t}' for d, t in zip(days, temps))\n print(f'\\n\\033[90m{forecast}\\033[0m')\nelse:\n print('🌤️ Clima: requiere ansi_widgets')\n</python>",
"vars": {}
},
"/error-test": {
"content": "Selector inexistente: {{nonexistent}}\n<python>print('Esto no debería ejecutarse')</python>",
"vars": { "nonexistent": "error-test" }
},
"/docs": {
"content": "<md># 📚 Documentación\n\n## Características\n\n- **Seguridad**: X25519 + AES-256-GCM\n- **Dinamismo**: Ejecución segura de Python\n- **Estética**: Renderizado ANSI avanzado\n- **Multimedia**: Imágenes y animaciones en terminal\n\n> Diseñado para amantes de la terminal.\n\n## Selectores especiales\n\n- `/` → Inicio dinámico\n- `/dashboard` → Métricas en vivo\n- `/cyber` → Modo hacker\n- `/weather` → Clima ficticio\n- `/anim` → Animación automática</md>",
"vars": {}
},
"/logo": {
"content": "<img>/public/logo.png</img>",
"vars": {}
}
}