civicrm / civicrm/cv

APIv4 --out=table prints a non-markdown-compatible table

Open
#182 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
45
Forks
36
Avg merge
17h 54m
Merged PRs (30d)
3

Description

What would it take for the table output to be compatible with markdown? That seems like a more useful format?

Currently the table output looks like this:

```
+-------+----------------+----------------+
| value | name | label |
+-------+----------------+----------------+
| 1 | Completed | Completed |
| 2 | Pending | Pending |
| 3 | Cancelled | Cancelled |
| 4 | Failed | Failed |
| 7 | Refunded | Refunded |
| 8 | Partially paid | Partially paid |
| 9 | Pending refund | Pending refund |
| 10 | Chargeback | Chargeback |
| 11 | Template | Template |
+-------+----------------+----------------+
```

Which is nice-looking ascii art, but when you paste it into GitLab, GitHub or any other type of markdown document, it looks like this:

+-------+----------------+----------------+
| value | name | label |
+-------+----------------+----------------+
| 1 | Completed | Completed |
| 2 | Pending | Pending |
| 3 | Cancelled | Cancelled |
| 4 | Failed | Failed |
| 7 | Refunded | Refunded |
| 8 | Partially paid | Partially paid |
| 9 | Pending refund | Pending refund |
| 10 | Chargeback | Chargeback |
| 11 | Template | Template |
+-------+----------------+----------------+

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the APIv4 `--out=table` output path and inspect how the current ASCII table is assembled, along with any existing CLI output tests. The work is done when table output uses Markdown-compatible formatting and the behavior is covered by a test for the shown data.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.