[+] Export distros

This commit is contained in:
Azalea (on HyDEV-Daisy) 2022-08-20 09:30:23 -04:00
parent 8f8ecb7b94
commit b9773b989d
No known key found for this signature in database
GPG key ID: E289FAC0DA92DD2B
311 changed files with 7061 additions and 14 deletions

25
hyfetch/distro.py Normal file
View file

@ -0,0 +1,25 @@
from __future__ import annotations
import string
asciis: list['AsciiArt'] = []
class AsciiArt:
name: str
match: str
color: str
ascii: str
def __init__(self, match: str, color: str, ascii: str, name: str | None = None):
self.match = match
self.color = color
self.ascii = ascii
self.name = name or self.get_friendly_name()
asciis.append(self)
def get_friendly_name(self) -> str:
return self.match.split("|")[0].strip(string.punctuation + '* ') \
.replace('"', '').replace('*', '')