mirror of
https://github.com/Steffo99/steffula-code.git
synced 2024-11-24 12:04:21 +00:00
13 lines
587 B
Python
Executable file
13 lines
587 B
Python
Executable file
#!/usr/bin/python3
|
|
|
|
import re
|
|
|
|
with open("../themes/Steffula-color-theme.json") as file:
|
|
while line := file.readline():
|
|
if match := re.search(r'''["']name["']: ?["']([a-z-]+)["'],''', line):
|
|
name = match.group(1)
|
|
while line := file.readline():
|
|
if match := re.search(r'''["']foreground["']: ?["'][#]([0-9a-f]+)["'],''', line):
|
|
color = match.group(1)
|
|
print(f"- ![{name}](https://img.shields.io/static/v1?style=flat-square&label={name}&color={color}&message=%23{color})")
|
|
break
|