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

Fix #2692 -- make nikola plugin --list-installed more readable #2693

Merged
merged 2 commits into from Mar 12, 2017

Conversation

Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Mar 10, 2017

  • Align plugin list
  • Make the plugin name bold

This is #2692 — cc @xuhdev

* Align plugin list
* Make the plugin name bold

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@xuhdev
Copy link
Member

xuhdev commented Mar 11, 2017

👍

@@ -179,9 +179,18 @@ def list_installed(self):
plugins.sort()
print('Installed Plugins:')
print('------------------')
maxlength = max(len(i[0]) for i in plugins)
if self.site.colorful:
formatstring = '\x1b[1m{0:<{2}}\x1b[0m at {1}'
Copy link
Member

@ralsina ralsina Mar 11, 2017

Choose a reason for hiding this comment

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

Does this work on windows?

Copy link
Member Author

@Kwpolska Kwpolska Mar 11, 2017

Choose a reason for hiding this comment

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

On Windows, we just disable the colors everywhere. But Windows 10 does support ANSI escape codes, so we can enable colors if the user is on 10.

Copy link
Contributor

@felixfontein felixfontein left a comment

LGTM

print(formatstring.format(name, path, maxlength))
dp = self.site.config['DISABLED_PLUGINS']
if dp:
print('\n\nAlso, you have disabled these plugins: {}'.format(dp))
Copy link
Contributor

@felixfontein felixfontein Mar 12, 2017

Choose a reason for hiding this comment

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

Why not use ', '.join(dp) to improve readability for the disabled plugin list?

Copy link
Member Author

@Kwpolska Kwpolska Mar 12, 2017

Choose a reason for hiding this comment

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

Will do.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska Kwpolska merged commit 8e867cc into master Mar 12, 2017
5 checks passed
@Kwpolska Kwpolska deleted the nikola-plugin-list-readability branch Mar 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants