httpref icon indicating copy to clipboard operation
httpref copied to clipboard

Colourised output

Open dnnrly opened this issue 4 years ago • 20 comments

Is your feature request related to a problem? Please describe.

Perhaps we could use a package like https://github.com/muesli/termenv to add colours to our output.

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

dnnrly avatar Jan 23 '20 19:01 dnnrly

Describe alternatives you've considered Chalk is one of the most popular, ans easiest to use package: https://www.npmjs.com/package/chalk

jkarelins avatar Jan 24 '20 14:01 jkarelins

Hi jkarelins, I'm afraid that won't work the way we need it to. As the project is written in Go we won't be able to consume that library.

BUT given this, if you're happy to contribute to the tool, then I'm very happy to guide you through the process!

dnnrly avatar Jan 24 '20 14:01 dnnrly

I'd like to contribute to the tool! Can you please guide me through the process?

KhaledMam avatar Mar 27 '20 02:03 KhaledMam

Of course! I'm going to assume you haven't contributed to open source on Github before so please feel free to correct me if you know this already.

  1. The first step is to fork this repository.
  2. Once you've made your first commit, you can raise a 'Draft Pull Request'
  3. Once we get to that stage, I can add comments to the PR (Pull Request)

Do you have any experience with Go?

dnnrly avatar Mar 27 '20 17:03 dnnrly

Right now i am a complete novice but i am very excited to learn! I'll get to work immediately. Any further advice would be appreciated.

KhaledMam avatar Mar 27 '20 18:03 KhaledMam

For now, just fork the repository: https://help.github.com/en/github/getting-started-with-github/fork-a-repo

Then see if you can create a pull request: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request

How much programming have you done before?

dnnrly avatar Mar 27 '20 19:03 dnnrly

I understand object oriented principles well and wrote your typical college projects (a CE student).

KhaledMam avatar Mar 27 '20 20:03 KhaledMam

That's good. When you have raise the Pull Request, I'll be able to help you there more easily.

dnnrly avatar Mar 28 '20 09:03 dnnrly

Sorry for being a little late i had some minor technical difficulties that hindered me for a bit. Mind my lack of knowledge but what is your idea of coloring the output? What do you want it to look like? And shouldn't i make some changes to the code before raising a pull request?

KhaledMam avatar Mar 28 '20 16:03 KhaledMam

Don't worry about being late, this is supposed to be fun. :)

So if you haven't written Go before, spend a little time reading through some of the beginner tuturials.

After this, think about what you'd like the output to look like. To start off, perhaps you can change the colour of ALL of the text. Take a look at the documentation for termenv and see what you can come up with. If you commit a change that does then you have enough to raise a PR.

Don't worry, I don't want it to be perfect (or even working) to start with. I can talk you through what to do for the next steps.

dnnrly avatar Mar 28 '20 21:03 dnnrly

Hi @dnnrly,

If this isn't already handled, Can I pick it up ?

rRamC avatar Jun 26 '20 18:06 rRamC

No it's not, go for it. Do you have any ideas how you would tackle it?

dnnrly avatar Jun 26 '20 18:06 dnnrly

As you suggested, we can go ahead with termenv.

rRamC avatar Jun 26 '20 20:06 rRamC

I had an interesting thought about this the other day. Would it be easier to make an update to the paragraphical package? Perhaps adding an extra parameter or two for additional formatting?

dnnrly avatar Jun 26 '20 21:06 dnnrly

Yup, That sounds like a nice idea. Add support for colourised para's.

This can use the default colors, or we can have a global config of the color to use.

rRamC avatar Jun 26 '20 22:06 rRamC

Cool, I look forward to seeing what you come up with!

dnnrly avatar Jun 27 '20 22:06 dnnrly

@dnnrly I've described the first level changed to the paragraphical package at https://github.com/dnnrly/paragraphical/issues/4

Let me know what you think.

rRamC avatar Jun 28 '20 20:06 rRamC

Do as you want.

On Fri, Jun 26, 2020, 8:39 PM RamC [email protected] wrote:

Hi @dnnrly https://github.com/dnnrly,

If this isn't already handled, Can I pick it up ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dnnrly/httpref/issues/9#issuecomment-650334582, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRRXWOD5YP5ZJDWSQFYWQDRYTTOTANCNFSM4KK3YG5Q .

KhaledMam avatar Jul 01 '20 16:07 KhaledMam

@dnnrly I find a good utility to colorize terminal output and remembered this issue. linking the repo here for reference incase if it helps https://github.com/pterm/pterm :)

rockey5520 avatar Apr 09 '21 17:04 rockey5520

That's actually pretty neat @rockey5520! I can see how that could work nicely with interfaces. Hmmm....this might be an interesting distraction project.

dnnrly avatar Apr 09 '21 21:04 dnnrly

Hello @dnnrly, Is this issue still up for grabs? If yes, I would like to work on this. I have experience with Python and C#. Would like to work with "Go" too.

Regards Sharad

SharadNair7 avatar Jun 23 '23 13:06 SharadNair7

Sure, go for it. I don't typically reserve issues for people.

dnnrly avatar Jun 23 '23 14:06 dnnrly