From 2d49b9c514878811e3cf0fd87f3946a4342a84c2 Mon Sep 17 00:00:00 2001 From: Lennard Wolf <7870758+MultifokalHirn@users.noreply.github.com> Date: Thu, 21 Dec 2023 16:29:20 +0100 Subject: [PATCH] docs: add fun ascii art logo --- README.md | 20 ++++++++++++++++++++ src/ornaments/_utils.py | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 src/ornaments/_utils.py diff --git a/README.md b/README.md index f05ae54..40ae428 100644 --- a/README.md +++ b/README.md @@ -136,15 +136,35 @@ only_once_callable_function() ``` +``` txt + .::=+=--++=::. + .-+++*-+++ =*+*=++=-: + :+#+-=:-.:+--+++=.=+:=**=. + .+#==::--+#*-...:=%%+-:**==*= + .@%=*=+:*#*. .#@#-==-==-*. + #@--+=-##:: %@#=:=:+::= + -@@:==+:%+-. =@=:++=:: -. + *@@:-==:%*-. =@*+=+-+-.-. + :@@:.-==+@%- %@===+==: =. + #@-++-=--#%= :%%----=:. := + #@=.:-:+++++==:--++=.::=++..:+ + :*%#*=:*+: -==:#%#*.==+::..-- + ::-+**=++-:=--.*%%%==--.:::. + :--:==-:--:--:-::::: + . . : : ... +``` + ## Addendum > > See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for information on how to setup and contribute to this project. ![License](https://img.shields.io/github/license/MultifokalHirn/ornaments) +
+


diff --git a/src/ornaments/_utils.py b/src/ornaments/_utils.py new file mode 100644 index 0000000..0368703 --- /dev/null +++ b/src/ornaments/_utils.py @@ -0,0 +1,35 @@ +import os + + +def print_logo(terminal_width: int = 80) -> None: + """ + Prints the logo of the project. + + Logo was generated using ascii-image-converter (https://github.com/TheZoraiz/ascii-image-converter): + $ ascii-image-converter ornaments.png --dimensions 40,17 + + """ + try: + terminal_width = os.get_terminal_size().columns + except Exception: + terminal_width = 80 + + logo_width = 40 + padding = int((terminal_width - logo_width) / 2) * " " + print("\n") + + print(padding + " .::=+=--++=::. ") + print(padding + " .-+++*-+++ =*+*=++=-: ") + print(padding + " :+#+-=:-.:+--+++=.=+:=**=. ") + print(padding + " .+#==::--+#*-...:=%%+-:**==*= ") + print(padding + " .@%=*=+:*#*. .#@#-==-==-*. ") + print(padding + " #@--+=-##:: %@#=:=:+::= ") + print(padding + " -@@:==+:%+-. =@=:++=:: -. ") + print(padding + " *@@:-==:%*-. =@*+=+-+-.-. ") + print(padding + " :@@:.-==+@%- %@===+==: =. ") + print(padding + " #@-++-=--#%= :%%----=:. := ") + print(padding + " #@=.:-:+++++==:--++=.::=++..:+ ") + print(padding + " :*%#*=:*+: -==:#%#*.==+::..-- ") + print(padding + " ::-+**=++-:=--.*%%%==--.:::. ") + print(padding + " :--:==-:--:--:-::::: ") + print(padding + " . . : : ... ")