Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More in-depth docs/API #78

Open
jkob opened this issue Apr 17, 2020 · 2 comments
Open

More in-depth docs/API #78

jkob opened this issue Apr 17, 2020 · 2 comments

Comments

@jkob
Copy link

jkob commented Apr 17, 2020

Hi,

Been toying around with this project for a bit and it's been great. But I'm having trouble figuring out what goes where. For example:

  • Where do I define the color to use (the pyfiglet class or the Figlet class?)

Very likely that I'm missing something obvious. But for me, the short "Quickstart" guide on how to use the package (by importing into code) is not very clear.
Maybe this is something that can be accomplished along with #74?

@pwaller
Copy link
Owner

pwaller commented Nov 1, 2020

Thanks for raising this. I agree it's not clear to a newcomer. Improvements welcomed. I don't have time to address the general complaint very well myself but I will review changes which improve the situation. The smaller the changes the better.

At the moment I'd recommend reading the source code if you want to know how it works and the API and have a need which isn't immediately addressed by just poking around. (e.g. search for "color" and look for relevant-looking code).

Addressing your colour question in particular:

def print_figlet(text, font=DEFAULT_FONT, colors=":", **kwargs):
ansiColors = parse_color(colors)
if ansiColors:
sys.stdout.write(ansiColors)
print(figlet_format(text, font, **kwargs))
if ansiColors:
sys.stdout.write(RESET_COLORS.decode('UTF-8', 'replace'))
sys.stdout.flush()

@pwaller pwaller mentioned this issue Sep 1, 2023
@pwaller
Copy link
Owner

pwaller commented Sep 1, 2023

Another request from #105, merging into this issue:

Are there any docs containing list of colors, fonts, and functions/classes as well as their args(that the user is supposed to use)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants