HorlogeSkynet / archey4

:computer: Maintained fork of the original Archey (Linux) system tool
https://git.io/archey4
GNU General Public License v3.0
291 stars 37 forks source link

[QUESTION] How to add support for new distributions ? #44

Closed Hacker-Planet closed 5 years ago

Hacker-Planet commented 5 years ago

I was wondering how one would add their distro to the list along with the ascii art to the python script? I Run KDE Neon and when checking distro version it comes up as neon and when I use archey in terminal it comes up with the linux logo. So I would like to know how I would go about adding KDE Neon to the list of distros.

Wasn't sure where I would ask this, sorry if this isn't the correct way.

HorlogeSkynet commented 5 years ago

Hi Robert !

First of all, yes this is the correct place for this kind of questions, as PR would be perfect to directly contribute to it :ok_hand:

About the subject, here is how it works since the v4.6.0 :

So a typical way to add a support for a new distributions would be to :

  1. Be sure that distro finds it (run pip3 install distro && python3 -m distro -j and verify that the output is consistent) ;
  2. Add the id output to the list of supported distributions in ./archey/distributions.py ;
  3. Add a proper ASCII art for your distributions in ./archey/logos/<your_distribution.py ;
  4. Add the newly created sub-module in ./archey/logos/init.py ;
  5. Update the ./archey/constants.py file with colors and logo associated to your distribution.

I hope that it was clear, don't hesitate to ask me/us anything (and in the future don't forget to set explicit titles to your issues, some maintainers of the F[L]OSS community are quite sensitive about this :wink:).

Cheers :wave:


EDIT : I'd be glad to merge a KDE Neon support before releasing v4.7.0 (currently frozen, waiting for #43 to be polished) :slightly_smiling_face:

Hacker-Planet commented 5 years ago

That would be awesome but I am having some tiny issue with the ascii art. I got one done but wasn't sure if it would work. V1.txt Wasn't quite sure what I was missing maybe you could take a look at it and maybe tell me what I've done wrong?

HorlogeSkynet commented 5 years ago

The ASCII art you got contains Unicode characters, and that is not going to work on old devices not supporting it (and Archey4 tries its best to maintain backward compatibility, including against old locales).

Could you manage to get a logo more or less 20-line high (for consistency purposes with the others) ? Maybe this commit could help you.

Bye :wave:

HorlogeSkynet commented 5 years ago

Closing for now. Feel free to re-open this or directly reply to this thread as needed @rstreeter :bowing_man:

HorlogeSkynet commented 4 years ago

About the original question, as of v4.7, one may be interested in 3999ce6f306f91bb54c99cfcfd38cfbe8e306b6d, which added support for CentOS :ok_hand:


Dedicated Wiki page : https://github.com/HorlogeSkynet/archey4/wiki/How-do-I-add-a-distribution-to-Archey%3F. Thanks to @ingrinder !