lord63 / tldr.py

A python client for tldr: simplified and community-driven man pages.
MIT License
186 stars 18 forks source link

Improve the color theme #7

Closed lord63 closed 4 years ago

lord63 commented 8 years ago

Currently, the default color theme is:

    colors = {
        "description": "blue",
        "usage": "green",
        "command": "cyan"
    }

tldr.py use click as the CLI package, the colors that click supports are:

you can find the documentation here.

parser.py shows how tldr.py parse the markdown file.

If you have a custom color theme and you want to share with us, you can leave your comment with the configuration and maybe with a screen shot here.

Any suggestions and feedback are welcome :heart:

AdamGreenhill commented 8 years ago

In my personal opinion, that blue background mixed with the green is taxing on the eyes. If you can change the background to the original terminal setting, that would be great. Click seems to have the following options:

bg – if provided this will become the background color. reset (reset the color code only)

Shir0kamii commented 8 years ago

@AdamGreenhill I don't have a blue background but I agree with you that customizing the background color is a good thing

AdamGreenhill commented 8 years ago

This is the output of tldr when I run tldr on openSUSE in terminator - https://imgur.com/d9TkekV

Edit: clarification

Shir0kamii commented 8 years ago

And this is mine when I run it on Gentoo inside Terminator : https://imgur.com/ZmGg0sI

Not only the background is different from yours, but if a sentence uses multiples lines, only the first line is colored. (discovered it now)

lord63 commented 8 years ago

@AdamGreenhill I'm afraid that you're not using tldr.py. The output is not the way that tldr.py should have. Are you using tldr-python-client? The command for tldr.py should be tldr find sed.

@Shir0kamii The reason is the man page is not right, fetch the latest pages should fix this problem.

AdamGreenhill commented 8 years ago

@lord63 when I execute """ pip install tldr.py; tldr init ....; tldr find sed; """ there is a whole host of errors that occur. Using "pip install tldr" is the only one that works for me.

lord63 commented 8 years ago

@AdamGreenhill Could you please paste the full error log when you use tldr.py and tell me your environment(python version, OS platform and so on)? If there are some bugs, I'll fix them :)

AdamGreenhill commented 8 years ago

To answer the original question. In my opinion I think the default colourscheme should be white/white/white as differing bash prompts (or powershell for windows) might not mesh with the cyan/blue/green scheme now.

I have found that "command - blue, desc - cyan, usage - white" looks great though.

lord63 commented 4 years ago

Everyone has his own taste, and different terminal may have different appearance, just leave it to users, they can modify it.