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 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}'

This comment has been minimized.

@ralsina

ralsina Mar 11, 2017
Member

Does this work on windows?

This comment has been minimized.

@Kwpolska

Kwpolska Mar 11, 2017
Author Member

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))

This comment has been minimized.

@felixfontein

felixfontein Mar 12, 2017
Contributor

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

This comment has been minimized.

@Kwpolska

Kwpolska Mar 12, 2017
Author Member

Will do.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska Kwpolska merged commit 8e867cc into master Mar 12, 2017
5 checks passed
5 checks passed
codacy/pr Good work! A positive pull request.
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants