[F] Fix distro listing script
This commit is contained in:
parent
97a31aba52
commit
5f079cec46
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ from hypy_utils import write
|
||||||
from hyfetch.distros import AsciiArt
|
from hyfetch.distros import AsciiArt
|
||||||
|
|
||||||
RE_SPLIT = regex.compile('EOF[ \n]*?;;')
|
RE_SPLIT = regex.compile('EOF[ \n]*?;;')
|
||||||
RE_COLORS = regex.compile("""(?<=set_colors )[\"#a-z\\d ]+(?=\n)""")
|
RE_COLORS = regex.compile("""(?<=set_colors )[\"#a-zA-Z\\d ']+(?=\n)""")
|
||||||
|
|
||||||
|
|
||||||
def substr(s: str, start: str, end: str | None = None):
|
def substr(s: str, start: str, end: str | None = None):
|
||||||
|
@ -63,7 +63,7 @@ def parse_ascii_distros() -> list[AsciiArt]:
|
||||||
match = match[:-1]
|
match = match[:-1]
|
||||||
|
|
||||||
# Get colors
|
# Get colors
|
||||||
color = RE_COLORS.findall(block)[0]
|
color = RE_COLORS.findall(block)[0].strip("'")
|
||||||
if len(color) == 0:
|
if len(color) == 0:
|
||||||
raise Exception(block)
|
raise Exception(block)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue