Skip to content

Commit 5da2173

Browse files
committed
script to list repos without token and some repos
1 parent a35a564 commit 5da2173

22 files changed

+387
-136
lines changed

_projects/agarnung.github.io.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: agarnung.github.io
3+
tools: [HTML, SCSS, CSS]
4+
image: https://avatars.githubusercontent.com/u/191017814?s=400&u=2f077960138f20824e6286bfd7b7375126c0487d&v=4
5+
description: My portfolio. This same webpage. Meta-Internet stuff.
6+
external_url: https://agarnung.github.io/
7+
---
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: awesome-3d-point-cloud-denoising
3+
tools: [HTML]
4+
image: https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.cs.cmu.edu%2F~kmcrane%2FProjects%2FDDG%2F&psig=AOvVaw1DtDKGM1wxZxmckGDVfpP2&ust=1737374313499000&source=images&cd=vfe&opi=89978449&ved=0CBQQjRxqFwoTCIi48-jdgYsDFQAAAAAdAAAAABAE
5+
description: A curated list of awesome 3D point cloud denoising papers
6+
external_url: https://github.com/agarnung/awesome-3d-point-cloud-denoising
7+
---

_projects/(2) Awesome Project.md renamed to _projects/cv-theremin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name: cv-theremin
33
tools: [Python]
44
image: https://images.squarespace-cdn.com/content/v1/57e28e3337c58156a9932042/1475651102704-2MY4P3XQF0F0B3CB841C/WebLeonTheremin.jpg?format=1500w
55
description: A handtracking and 2D camera based digital theremin
6-
external_url: https://github.com/yousinix
6+
external_url: https://github.com/agarnung/cv-theremin/tree/main
77
---

_projects/generate_repos.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import os
2+
import requests
3+
4+
# No usaremos token, así que solo listamos los repos públicos.
5+
# Pero esto también limita las posibles solicitudes a 60 por hora.
6+
USERNAME = "agarnung"
7+
8+
# Endpoint de la API de GitHub para listar repositorios públicos
9+
GITHUB_API_URL = f"https://api.github.com/users/{USERNAME}/repos"
10+
11+
# Carpeta para guardar los archivos de cada repo
12+
os.makedirs("repos_metadata", exist_ok=True)
13+
14+
# Obtener la lista de repositorios públicos
15+
response = requests.get(GITHUB_API_URL)
16+
17+
# Código de estado HTTP de respuesta satisfactoria (200–299)
18+
if response.status_code == 200:
19+
repos = response.json()
20+
21+
for repo in repos:
22+
# Metadatos para crear los archivos YAML
23+
name = repo["name"]
24+
description = repo["description"] or "No description provided"
25+
html_url = repo["html_url"]
26+
27+
# Endpoint de los lenguajes
28+
languages_url = repo["languages_url"]
29+
languages_response = requests.get(languages_url)
30+
if languages_response.status_code == 200:
31+
languages = list(languages_response.json().keys())
32+
else:
33+
languages = ["Not specified"]
34+
35+
# Formato del portfolio
36+
content = f"""---
37+
name: {name}
38+
tools: {languages}
39+
image: PLACE_YOUR_FULL_URL_HERE_IF_ANY
40+
description: {description}
41+
external_url: {html_url}
42+
---"""
43+
44+
# Cada archivo tiene el nombre del repo
45+
filename = os.path.join("repos_metadata", f"{name}.md")
46+
with open(filename, "w") as file:
47+
file.write(content)
48+
49+
print(f"Archivo generado para el repositorio: {name}")
50+
51+
else:
52+
print(f"Error al obtener repositorios: {response.status_code} - {response.text}")
53+

_projects/pi-memorizer.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: pi-memorizer
3+
tools: [JavaScript, CSS, HTML]
4+
image: https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.cnn.com%2F2017%2F03%2F14%2Fus%2Fpi-day-things-to-know-trnd%2Findex.html&psig=AOvVaw3IrQJ15c8ZWm9bxBLbuLSZ&ust=1737373905756000&source=images&cd=vfe&opi=89978449&ved=0CBQQjRxqFwoTCOChu6XcgYsDFQAAAAAdAAAAABAE
5+
description:A game to memorize arbitrary digits of π
6+
external_url: https://agarnung.github.io/pi-memorizer/
7+
---

_projects/x86-64-assembly-intro.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: x86-64-assembly-intro
3+
tools: [Assembly, C, C++, Shell]
4+
image: https://www.google.com/url?sa=i&url=https%3A%2F%2Fkids.nationalgeographic.com%2Fhistory%2Farticle%2Fada-lovelace&psig=AOvVaw1g6zRRARPZO0wQncVC7jtL&ust=1737374022949000&source=images&cd=vfe&opi=89978449&ved=0CBUQjRxqFwoTCMD65d3cgYsDFQAAAAAdAAAAABAE
5+
description: Introductory exercises to assembly language
6+
external_url: https://github.com/agarnung/x86-64-assembly-intro
7+
---

_site/generate_repos.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import os
2+
import requests
3+
import yaml
4+
5+
# No usaremos token, así que solo listamos los repos públicos
6+
USERNAME = "agarnung"
7+
8+
# Endpoint de la API de GitHub para listar repositorios públicos
9+
GITHUB_API_URL = f"https://api.github.com/users/{USERNAME}/repos"
10+
11+
# Carpeta para guardar los archivos de cada repo
12+
os.makedirs("repos_metadata", exist_ok=True)
13+
14+
# Obtener la lista de repositorios públicos
15+
response = requests.get(GITHUB_API_URL)
16+
17+
# Código de estado HTTP de respuesta satisfactoria (200–299)
18+
if response.status_code == 200:
19+
repos = response.json()
20+
21+
for repo in repos:
22+
# Metadatos para crear los archivos YAML
23+
name = repo["name"]
24+
description = repo["description"] or "No description provided"
25+
html_url = repo["html_url"]
26+
27+
# Endpoint de los lenguajes
28+
languages_url = repo["languages_url"]
29+
languages_response = requests.get(languages_url)
30+
if languages_response.status_code == 200:
31+
languages = list(languages_response.json().keys())
32+
else:
33+
languages = ["Not specified"]
34+
35+
36+
# Formato del portfolio
37+
yaml_content = f"""---
38+
name: {name}
39+
tools: {languages}
40+
image: PLACE_YOUR_FULL_URL_HERE_IF_ANY
41+
description: {description}
42+
external_url: {html_url}
43+
---"""
44+
45+
# Cada YAML tiene el nombre del repo
46+
yaml_filename = os.path.join("repos_metadata", f"{name}.yaml")
47+
with open(yaml_filename, "w") as file:
48+
file.write(yaml_content)
49+
50+
print(f"Archivo generado para el repositorio: {name}")
51+
52+
else:
53+
print(f"Error al obtener repositorios: {response.status_code} - {response.text}")
54+

_site/projects/2-awesome-project.html

Lines changed: 0 additions & 134 deletions
This file was deleted.

_site/projects/agarnung-github-io.yaml

Whitespace-only changes.

_site/projects/agarnung.yaml

Whitespace-only changes.

0 commit comments

Comments
 (0)