buggregator / trap

Buggregator local debug server for PHP projects as composer package
https://buggregator.dev
BSD 3-Clause "New" or "Revised" License
113 stars 8 forks source link

Add command `joke` #15

Closed roxblnfk closed 4 months ago

roxblnfk commented 1 year ago

Print a random joke about PHP


Or print a joke of the day on start

k2gl commented 4 months ago

I'm on it.

roxblnfk commented 4 months ago

Do you have a jokes list already? :D

k2gl commented 4 months ago

Do you have a jokes list already? :D

image

https://github.com/buggregator/trap/pull/55

k2gl commented 4 months ago

Now the message has a background

image

roxblnfk commented 4 months ago

The background should be with logo only. It's part of logo.

However, it's necessary to consider the message length and screen width. If the screen width is less than the message length and message bubble, then characters will be wrapped to a new line, and it will look terrible.

There are two solutions:

Symfony Console has a helper for determining terminal width, but it doesn't calculate it dynamically. Therefore, I would prefer the first or third option.

k2gl commented 4 months ago

Banana flavored version

image