[+] Export distros
This commit is contained in:
parent
8f8ecb7b94
commit
b9773b989d
311 changed files with 7061 additions and 14 deletions
25
hyfetch/distro.py
Normal file
25
hyfetch/distro.py
Normal 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('*', '')
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue