diff --git a/hyfetch/distros/adélie.py b/hyfetch/distros/adelie.py similarity index 86% rename from hyfetch/distros/adélie.py rename to hyfetch/distros/adelie.py index e671a84d..c69a1594 100644 --- a/hyfetch/distros/adélie.py +++ b/hyfetch/distros/adelie.py @@ -2,7 +2,7 @@ from . import AsciiArt -adélie = AsciiArt(match=r'''"Adélie"* | "Adelie"*''', color='4 7 6', ascii=r""" +adelie = AsciiArt(match=r'''"Adélie"* | "Adelie"*''', color='4 7 6', ascii=r""" ${c1} ${c3} ,-^-___ ${c3} /\\\/// ${c2}refined.${c1} /\\\\// diff --git a/hyfetch/distros/chimera.py b/hyfetch/distros/chimera.py new file mode 100644 index 00000000..7b8e11e6 --- /dev/null +++ b/hyfetch/distros/chimera.py @@ -0,0 +1,25 @@ +# This file is automatically generated. Please do not modify. + +from . import AsciiArt + +chimera = AsciiArt(match=r'''"Chimera"*''', color='1 5 4 1', ascii=r""" +${c3}ddddddddddddddc ${c1},cc: +${c3}ddddddddddddddc ${c1},cc: +${c3}ddddddddddddddd ${c1},cc: +${c3}ddddddddddddl:' ${c1},cc: +${c3}dddddddddl' ${c1}..;cc: +${c3}dddddddo. ${c1},:cccccc: +${c3}ddddddl ${c1},ccc:''''' +${c3}dddddo. ${c1};ccc. ............ + .ccc. cccccccccccc +${c2}...... ${c1}.ccc. .ccc''''''''' +${c2}OOOOOk. ${c1};ccc. .ccc; ...... +${c2}OOOOOOd ${c1}'ccc:,....,:ccc' ${c4}coooooo +${c2}OOOOOOOx. ${c1}':cccccccc:' ${c4}.looooooo +${c2}OOOOOOOOOd, ${c1}`'''` ${c4}.coooooooo +${c2}OOOOOOOOOOOOdc,. ${c4}..,coooooooooooo +${c2}OOOOOOOOOOOOOOOO' ${c4}.oooooooooooooooo +${c2}OOOOOOOOOOOOOOOO' ${c4}.oooooooooooooooo +${c2}OOOOOOOOOOOOOOOO' ${c4}.oooooooooooooooo +""") + \ No newline at end of file diff --git a/hyfetch/distros/distro_detector.py b/hyfetch/distros/distro_detector.py index 74dbe403..3575121c 100644 --- a/hyfetch/distros/distro_detector.py +++ b/hyfetch/distros/distro_detector.py @@ -9,8 +9,8 @@ def detect(name: str) -> AsciiArt | None: return None name = name.lower() if name.startswith('adélie') or name.startswith('adelie'): - from .adélie import adélie - return adélie + from .adelie import adelie + return adelie if name.startswith('aix'): from .aix import aix @@ -304,6 +304,10 @@ def detect(name: str) -> AsciiArt | None: from .chapeau import chapeau return chapeau + if name.startswith('chimera'): + from .chimera import chimera + return chimera + if name.startswith('chonkysealos'): from .chonkysealos import chonkysealos return chonkysealos @@ -476,6 +480,10 @@ def detect(name: str) -> AsciiArt | None: from .evolutionos import evolutionos return evolutionos + if name.startswith('eweos'): + from .eweos import eweos + return eweos + if name.startswith('exherbo'): from .exherbo import exherbo return exherbo @@ -1472,6 +1480,10 @@ def detect(name: str) -> AsciiArt | None: from .xenia import xenia return xenia + if name.startswith('tatra'): + from .tatra import tatra + return tatra + if name.startswith('zorin'): from .zorin import zorin return zorin diff --git a/hyfetch/distros/eweos.py b/hyfetch/distros/eweos.py new file mode 100644 index 00000000..9d6cb554 --- /dev/null +++ b/hyfetch/distros/eweos.py @@ -0,0 +1,22 @@ +# This file is automatically generated. Please do not modify. + +from . import AsciiArt + +eweos = AsciiArt(match=r'''"eweOS"*''', color='7 11 9 8 1', ascii=r""" +${c2} #####%%% +${c2} ##%%${c3}////${c2}%%%%%${c3}/// +${c2} #%%%%${c3}////((((////${c2}% +${c1} *@@@@@@@${c3}/${c5},,,${c3}/////${c5},,,${c2}%${c1}@@@@@@@ +${c1} .@@@@@@@@@@@${c3}////////${c2}%%%${c1}@@@@@@@@@@@@ +${c1} @@@${c4}...${c1}@@@@@@${c3}////${c2}%%${c3}////${c1}@@@@@@@@@@@@@@@@ +${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +${c1} @@@@@@@@@@@@@@@@@@@@@@@@@@@ +${c1} @@@@@@@@@@@@@@@@@@@@@@@ +${c1} @@@@@@ @@@@@@ +${c1} @@@ @@@ +""") + \ No newline at end of file diff --git a/hyfetch/distros/tatra.py b/hyfetch/distros/tatra.py new file mode 100644 index 00000000..b8783ba0 --- /dev/null +++ b/hyfetch/distros/tatra.py @@ -0,0 +1,23 @@ +# This file is automatically generated. Please do not modify. + +from . import AsciiArt + +tatra = AsciiArt(match=r'''"Tatra"*''', color='4 7', ascii=r""" +${c1} + . .:. . .:. + .^^.!.:::. .^!?J?^ + .:^.^!!!~:~^. .7??77!~~^. + .~^.!??77?!.^~: ..:^^7JJJ7~~^. + .^~.^7???7~.~~. .7??????????! + .:^:^^~^^:!^ ^: .......^!:... + .!7~.::.!.::. ~BG~ :^ ^~: + :!!~ ~. ?BBBB! ^?J!. .!~. + :!. .JBY. .Y#BBBY?~!???J7. :^^. + .. :5#B#P~P#BBP?7?55J?J7: + ^P#BBBBBBBB5?7J5555J!..... + !BBBBBBGBBGJ77::Y555J?77777^ + ?BBBBG5JJ5PJ?!: .?Y??????77?~. + .YBGPYJ??????Y?^^^^~7?????????7?!. + .^^:..::::::::.....:::::::::::..:. +""") + \ No newline at end of file diff --git a/tools/list_distros.py b/tools/list_distros.py index 3e292fa8..068c8afa 100755 --- a/tools/list_distros.py +++ b/tools/list_distros.py @@ -10,6 +10,7 @@ import textwrap from pathlib import Path import regex +import unicodedata from hypy_utils import write from hyfetch.distros import AsciiArt @@ -34,7 +35,7 @@ def parse_ascii_distros() -> list[AsciiArt]: """ Parse ascii distros from neofetch script """ - nf = (Path(__file__).parent.parent / 'neofetch').read_text().replace('\t', ' ' * 4) + nf = (Path(__file__).parent.parent / 'neofetch').read_text('utf-8').replace('\t', ' ' * 4) # Get the content of "get_distro_ascii" function nf = nf[nf.index('get_distro_ascii() {\n'):] @@ -139,6 +140,9 @@ def export_distro(d: AsciiArt) -> str: for s in string.punctuation + ' ': varname = varname.replace(s, '_') + # Remove accents + varname = unicodedata.normalize('NFKD', varname).encode('ascii', 'ignore').decode('utf-8') + # Escape/unescape ascii ascii = d.ascii.replace("\\\\", "\\")