GNU Astronomy Utilities - Tasks: task #15138, Color command-line output
You are not allowed to post comments on this tracker with your current authentication level.
task #15138: Color command-line output
Submitter: | Mohammad Akhlaghi <makhlaghi> | ||
Submitted: | Mon 31 Dec 2018 01:09:37 AM UTC | ||
Should Start On: | Mon 31 Dec 2018 12:00:00 AM UTC | Should be Finished on: | Mon 31 Dec 2018 12:00:00 AM UTC |
Category: | All Gnuastro | Priority: | 5 - Normal |
Item Group: | Enhancement | Status: | Postponed |
Privacy: | Public | Assigned to: | None |
Percent Complete: | 0% | Open/Closed: | Open |
Effort: | 0.00 |
Sat 03 Apr 2021 04:51:43 PM UTC, comment #3: |
Mohammad Akhlaghi <makhlaghi> |
Sat 03 Apr 2021 04:16:16 PM UTC, comment #2: Hi! I tried to color code the various outputs by creating functions of different colors that switch the output color.
|
Abhishek Yadav <abhishek_yadav> |
Mon 31 Dec 2018 01:11:04 AM UTC, comment #1: Another situation to check (for removing color) is in more limited terminals like the internal Emacs terminal (when you run `M-x compile'). |
Mohammad Akhlaghi <makhlaghi> |
Mon 31 Dec 2018 01:09:37 AM UTC, original submission:
In many scenarios of Gnuastro's programs, it can be really helpful if the output text (on the command-line) is color coded. For example the new `--verify' option to the Fits program.
|
Mohammad Akhlaghi <makhlaghi> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Powered by Savane 3.13-f8d8.
Corresponding source code
Thanks a lot Abhishek! This seems like a workable solution, nice work! I think you are ready to try it out in practice in your own development branch (if you haven't done so already).
Here are some commands that can help in the test (using one of the FITS images created during 'make check', and the 'astfits' executable that is in the build directory, so you can play with the source):
You can now use the two calls with '--verify' for test-running your implementation.
Have you created a branch and a fork for your development? If not, see Gnuastro's forking tutorial.
I really look forward to see your fork and testing it! We can then find a generalize-able way to put this in the library and use it in many other Gnuastro programs too.
P.S. Savannah's interface is a little old, but it does have a simple Markup that can make your code blocks look more clear (like the case above). The link to this markup page is just on top of the comment-writing box (to the left of the "Preview" button).