ribice / glice

Go license and dependency checker

Home Page:https://www.ribice.ba/glice/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: export markdown table

sandrom opened this issue · comments

I would really like the dependency, repourl and licence columns exported as a markdown table (can be just output, exporting on command line is easy enough through pipes) as this is great info to show for a repo in an md file when browsing on github

Technically this isn't a problem to make. I'm curious about the use-case, is it 'hard' to simply copy the output from stdout? Do you have any issues when you do that?

ah right maybe not the right explanation. i need it in another format cause you write it similar to markdown, but i would like to have it in real markdown format, so you can simply copy paste

current:

+-------------------------------------------------------------+-------+--------------------------------+------------+
|                         DEPENDENCY                          | COUNT |            REPOURL             |  LICENSE   |
+-------------------------------------------------------------+-------+--------------------------------+------------+
| github.com/ory/common/env                                   |     1 | https://github.com/ory/common  | Apache-2.0 |
| github.com/ory/hydra/sdk/go/hydra                           |     1 | https://github.com/ory/hydra   | Apache-2.0 |
+-------------------------------------------------------------+-------+--------------------------------+------------+

preferred:

|                         DEPENDENCY                          | COUNT |            REPOURL             |  LICENSE   |
|-------------------------------------------------------------|-------|--------------------------------|------------|
| github.com/ory/common/env                                   |     1 | https://github.com/ory/common  | Apache-2.0 |
| github.com/ory/hydra/sdk/go/hydra                           |     1 | https://github.com/ory/hydra   | Apache-2.0 |

the preferred version is directly markdown.

use case is really that its always visible easily what licenses and dependencies are there for projects without checking them out, but directly on github (enterprise) here. we kinda need that visibility, but doing that manually is annoying, so automation would be fantastic and your tool otherwise does a great job! :)

I'll see whether I'll include this change in code.

For now, you can just add on main.go:216:

table.SetCenterSeparator("|")

Let me know whether this solves your issue.