Skip to content

Commit ac73a49

Browse files
committed
Actualizacion general del repositorio
1 parent 873af4d commit ac73a49

File tree

28 files changed

+177
-46
lines changed

28 files changed

+177
-46
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/usr/bin/env python3
2+
import re
3+
from pathlib import Path
4+
5+
EXCLUDED_DIRS={'.git','.github','__pycache__'}
6+
EXCLUDED_FILES={'README.md','CONTRIBUTING.md','INFO.md','LICENSE'}
7+
8+
ROOT=Path('.')
9+
START='<!-- AUTO-GENERATED-INDEX:START -->'
10+
END='<!-- AUTO-GENERATED-INDEX:END -->'
11+
12+
def write_readme(path:Path,lines):
13+
readme=path/'README.md'
14+
block=f"{START}\n"+'\n'.join(lines)+f"\n{END}"
15+
if readme.exists():
16+
content=readme.read_text(encoding='utf-8')
17+
if START in content and END in content:
18+
content=re.sub(
19+
re.escape(START)+'.*?'+re.escape(END),
20+
block,
21+
content,
22+
flags=re.DOTALL
23+
)
24+
else:
25+
content=content.rstrip()+"\n\n"+block
26+
else:
27+
content=f"# {path.name}\n\n{block}"
28+
readme.write_text(content,encoding='utf-8')
29+
30+
def generate_root_readme():
31+
lines=[
32+
f"- [{d.name}](/{d.name})"
33+
for d in sorted(ROOT.iterdir())
34+
if d.is_dir() and d.name not in EXCLUDED_DIRS
35+
]
36+
write_readme(ROOT,lines)
37+
38+
def generate_section_readme(section:Path):
39+
lines=[]
40+
41+
for d in sorted(section.iterdir()):
42+
if not d.is_dir() or d.name in EXCLUDED_DIRS:
43+
continue
44+
lines.append(f"- [{d.name}](/{d.as_posix()})")
45+
for f in sorted(d.glob('*.md')):
46+
if f.name in EXCLUDED_FILES:
47+
continue
48+
rel=f.relative_to(section).as_posix()
49+
lines.append(f" - [{rel}](/{f.as_posix()})")
50+
51+
for f in sorted(section.glob('*.md')):
52+
if f.name in EXCLUDED_FILES:
53+
continue
54+
lines.append(f"- [{f.name}](/{f.as_posix()})")
55+
56+
write_readme(section,lines)
57+
58+
if __name__=='__main__':
59+
generate_root_readme()
60+
for d in sorted(ROOT.iterdir()):
61+
if d.is_dir() and d.name not in EXCLUDED_DIRS:
62+
generate_section_readme(d)

.github/workflows/auto-readme.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Auto-generate README index
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update-readme:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repositorio
14+
uses: actions/checkout@v4
15+
16+
- name: Montaje de python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.x'
20+
21+
- name: Indexación de Readmes
22+
run: python .github/scripts/generate_readme_index.py
23+
24+
- name: Commit cambios
25+
run: |
26+
git config user.name "github-actions"
27+
git config user.email "github-actions@github.com"
28+
git add **/README.md
29+
git commit -m "docs: Indexación automática" || echo "Sin cambios por aplicar"
30+
git push

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright GitHub, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[![Last commit](https://img.shields.io/github/last-commit/Nisamov/RouterSwitchCommands?style=flat-square&color=000000&labelColor=ffffff)](https://github.com/Nisamov/RouterSwitchCommands/commits) [![License](https://img.shields.io/static/v1?label=License&message=MIT&color=000000&style=flat-square&labelColor=ffffff)](LICENSE) [![Stars](https://img.shields.io/github/stars/Nisamov/RouterSwitchCommands?style=flat-square&color=000000&labelColor=ffffff)](https://github.com/Nisamov/RouterSwitchCommands/stargazers) [![Forks](https://img.shields.io/github/forks/Nisamov/RouterSwitchCommands?style=flat-square&color=000000&labelColor=ffffff)](https://github.com/Nisamov/RouterSwitchCommands/network/members)
2+
3+
# Router & Switch Commands
4+
### Estructura y referencia para documentar comandos y conceptos de redes
5+
6+
Router & Switch Commands nació como una recopilación de apuntes personales para organizar y entender mejor distintos comandos, configuraciones y conceptos de redes, incluyendo routing, switching, seguridad y servicios de red.
7+
8+
Con el tiempo, se fue estructurando para que sea más fácil de navegar y consultar, tanto para mí como para cualquier persona interesada en aprender o consultar conceptos y comandos de manera práctica.
9+
10+
---
11+
<details open>
12+
<summary><strong>• OBJETIVOS DEL PROYECTO</strong></summary>
13+
<h1>Objetivos del proyecto</h1>
14+
15+
- Proporcionar un **formato claro y reutilizable** para documentar comandos y configuraciones de routers y switches.
16+
- Facilitar una documentación **legible y mantenible a largo plazo**.
17+
- Reducir duplicación, ambigüedad y variaciones innecesarias entre distintos materiales de referencia.
18+
- Servir como guía práctica para administradores de redes, ingenieros y estudiantes de networking.
19+
</details>
20+
21+
---
22+
<details open>
23+
<summary><strong>• ENFOQUE DEL PROYECTO</strong></summary>
24+
<h1>Enfoque del proyecto</h1>
25+
26+
El repositorio no pretende sustituir la documentación oficial de fabricantes, sino **complementarla** mediante:
27+
28+
- Ficheros organizados por área (routing, switching, seguridad, servicios),
29+
- Convenciones claras de documentación,
30+
- Ejemplos prácticos y homogéneos,
31+
- Una estructura pensada para crecer sin perder consistencia.
32+
</details>
33+
34+
---
35+
<details open>
36+
<summary><strong>• ESTRUCTURA DEL PROYECTO</strong></summary>
37+
<h1>Estructura del proyecto</h1>
38+
39+
La organización del repositorio está pensada para facilitar la navegación y el crecimiento progresivo del contenido:
40+
41+
<!-- AUTO-GENERATED-INDEX:START -->
42+
<!-- AUTO-GENERATED-INDEX:END -->
43+
</details>
44+
45+
---
46+
<details open>
47+
<summary><strong>• CONTRIBUYE AL PROYECTO</strong></summary>
48+
<h1>Contribuye al proyecto</h1>
49+
50+
Las contribuciones son bienvenidas siempre que respeten el formato y la estructura definidos.
51+
El objetivo es mantener una documentación coherente y de alta calidad.
52+
53+
> [Crear pull request](https://github.com/Nisamov/RouterSwitchCommands/pulls)
54+
</details>
55+
56+
---
57+
<div align="center">
58+
<p>Router & Switch Commands - By Nisamov | MIT License - 2026</p>
59+
<p>Contacto: <a href="mailto:nisamov.contact@gmail.com">nisamov.contact@gmail.com</a></p>
60+
</div>

Router/enrutamiento_ospf.md

Lines changed: 0 additions & 11 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Ejemplo práctico:
1414
Router(config)# interface gigabitEthernet 0/0
1515
Router(config-if)# ip address 192.168.1.1 255.255.255.0
1616
Router(config-if)# no shut
17-
```
17+
```
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)