jsdelivr / globalping-cli

A simple CLI tool to run networking commands remotely from hundreds of globally distributed servers
Mozilla Public License 2.0
129 stars 14 forks source link

Add --share option #53

Closed jimaek closed 1 year ago

jimaek commented 1 year ago

When enabled at the end of the output also show the website URL https://www.jsdelivr.com/globalping/id=$id (exact format to be updated) that will contain the same results in case the user wants to visualize them on the map.

MartinKolarik commented 1 year ago

Link format: https://www.jsdelivr.com/globalping?measurement=$id

We can probably use a similar style for the message as we have for probe location, e.g.:

> You can also view the results at https://www.jsdelivr.com/globalping?measurement=$id

It should be printed to stderr.

jimaek commented 1 year ago
> You can also view the results at https://www.jsdelivr.com/globalping?measurement=$id

It should be printed to stderr.

Maybe just > https://www.jsdelivr.com/globalping?measurement=$id to make it easier to parse?

Also where do we show that line? At the very end of all output?

MartinKolarik commented 1 year ago

At the very end, in the same color as the location. It isn't meant to be parsed so I suggest keeping the text to make the purpose clear (especially if we decide to show it always but even if not).

jimaek commented 1 year ago

Ok then. I guess if the user wants to get the ID he can use the JSON output.

Link format: https://www.jsdelivr.com/globalping?measurement=$id

We can probably use a similar style for the message as we have for probe location, e.g.:

At the very end, in the same color as the location.

> View the results online: https://www.jsdelivr.com/globalping?measurement=$id

It should be printed to stderr.

didil commented 1 year ago

@jimaek do we need to add an empty line between the results and the > View the results online: https://www.jsdelivr.com/globalping?measurement=$id line ?

jimaek commented 1 year ago

Probably not? Since it has the color difference and prefix

MartinKolarik commented 1 year ago

Yes, let's try without.