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

✨ feat(plugins): add FIGlet plugin #12

Merged
merged 20 commits into from
Feb 18, 2024
Merged

Conversation

bcignasi
Copy link
Contributor

Summary

Adds plugin "figlet". Allows user to creats an ASCII art representation of a text using characters (letters, numbers, and symbols).

Related issue

--- gitMogged, bye bye.

How has this been tested?

  • Manual tests
  • Unit tests
  • Integration tests

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have read the contributing guidelines.
  • I have formatted the code with Black.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@bcignasi bcignasi requested a review from welpo as a code owner February 14, 2024 20:33
@welpo
Copy link
Owner

welpo commented Feb 14, 2024

Thank you so much! This looks promising.

If you would like to fix the failed check, you need to add the new pyfiglet dependency to pyproject.toml.

Do not do this manually; the instructions on how to do this are in the docs.

I can do this myself when I review it; up to you!

@welpo welpo changed the title Adds figlet plugin feature ✨ feat(plugins): add FIGlet plugin Feb 14, 2024
@welpo welpo added the enhancement New feature or request label Feb 14, 2024
@welpo welpo self-assigned this Feb 14, 2024
@welpo
Copy link
Owner

welpo commented Feb 15, 2024

Thanks for adding the dependency.

The docs were missing a step; that's why the build was still failing. I pushed a fix to the branch and also updated the docs.

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0c9b5c9) 100.00% compared to head (45529f0) 100.00%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         6    +1     
  Lines          385       416   +31     
=========================================
+ Hits           385       416   +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

welpo added a commit that referenced this pull request Feb 15, 2024
@welpo
Copy link
Owner

welpo commented Feb 17, 2024

I've noticed some fonts add one or even two newlines before the actual ascii art. For example, the univers font adds one empty line.

We could probably trim the fully empty (only whitespace) lines before returning the output. I can take care of this, if you want.

Copy link
Owner

@welpo welpo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some final touches this will be ready for merge! Thanks~

doteki/plugins/figlet.py Outdated Show resolved Hide resolved
doteki/plugins/figlet.py Outdated Show resolved Hide resolved
doteki/plugins/figlet.py Outdated Show resolved Hide resolved
tests/plugins/test_figlet.py Outdated Show resolved Hide resolved
@welpo
Copy link
Owner

welpo commented Feb 18, 2024

I've noticed some fonts add one or even two newlines before the actual ascii art. For example, the univers font adds one empty line.

We could probably trim the fully empty (only whitespace) lines before returning the output. I can take care of this, if you want.

I've done this in the new function trim_leading_and_trailing_empty_lines.

@welpo welpo merged commit ff0be35 into welpo:main Feb 18, 2024
8 checks passed
@welpo
Copy link
Owner

welpo commented Feb 18, 2024

Thank you for your hard work!!! 🫶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants