Giter Site home page Giter Site logo

Comments (4)

kdeldycke avatar kdeldycke commented on August 25, 2024

Just found out the issue: mdedup --help and naked mdedup calls doesn't not produces the same output.

The fix would be to wrap/patch the original --help option call and plug in there the code producing the enhanced help screen from:

# Print help screen and exit if no mail source provided.
if not mail_sources:
# Extract keywords
keywords = collect_keywords(ctx)
# Apply dynamic style to help screen.
click.echo(colorized_help(ctx.get_help(), keywords))
# Produce the strategy reference table, with grouped aliases.
method_to_ids = {}
for strat_id, method in sorted(STRATEGY_METHODS.items(), reverse=True):
method_to_ids.setdefault(method, []).append(strat_id)
strat_table = sorted(
[
("|".join(strat_ids), " ".join(method.__doc__.split()))
for method, strat_ids in method_to_ids.items()
]
)
# Reuse click machinery to format CLI helper output.
formatter = ctx.make_formatter()
# XXX Seems to have no effect. Should have introduced an empty line
# before section.
formatter.write_paragraph()
with formatter.section("Available strategies"):
formatter.write_dl(strat_table)
click.echo(colorized_help(formatter.getvalue().rstrip(), keywords))
ctx.exit()

from mail-deduplicate.

kdeldycke avatar kdeldycke commented on August 25, 2024

This might be fixed naturally if there's progress on contributing som of my custom help screen highlight code to cloup, as discussed in: janluke/cloup#95

from mail-deduplicate.

kdeldycke avatar kdeldycke commented on August 25, 2024

The issue with help screens has been fixed by migrating to click-extra. The fix is available in the brand new release of mail-deduplicate 7.0.0.

from mail-deduplicate.

github-actions avatar github-actions commented on August 25, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from mail-deduplicate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.