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

Output table in Markdown #29

Merged
merged 2 commits into from Nov 9, 2017
Merged

Output table in Markdown #29

merged 2 commits into from Nov 9, 2017

Conversation

hugovk
Copy link
Collaborator

@hugovk hugovk commented Nov 9, 2017

A common use-case for me is using the stats in issues and PRs on GitHub. I've been pasting using code formatting, but it's straightforward to output using Markdown: it looks about the same on the console and much better in GitHub.

Here are examples using pypinfo --percent --pip -d 1 pypinfo system.

Before (with code formatting):

system_name percent download_count
----------- ------- --------------
Linux         50.0%              2
Darwin        25.0%              1
Windows       25.0%              1

Before (with GitHub Markdown):

system_name percent download_count


Linux 50.0% 2
Darwin 25.0% 1
Windows 25.0% 1

After (with code formatting):

| system_name | percent | download_count |
| ----------- | ------- | -------------- |
| Linux       |   50.0% |              2 |
| Windows     |   25.0% |              1 |
| Darwin      |   25.0% |              1 |

After (with GitHub Markdown):

system_name percent download_count
Linux 50.0% 2
Windows 25.0% 1
Darwin 25.0% 1

@ofek ofek merged commit 2e85665 into ofek:master Nov 9, 2017
@ofek
Copy link
Owner

ofek commented Nov 9, 2017

Thank you!

@ofek
Copy link
Owner

ofek commented Nov 9, 2017

7.0.0 on PyPI

@hugovk hugovk deleted the markdown-table branch November 9, 2017 07:50
suv27 pushed a commit to suv27/pypinfo that referenced this pull request Oct 5, 2019
REestwick pushed a commit to REestwick/pypinfo that referenced this pull request Apr 1, 2024
* Output in Markdown

* Update core.py
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

2 participants