Bug 1116176 - RFE: [zanata-client] client should use color output
Summary: RFE: [zanata-client] client should use color output
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Zanata
Classification: Retired
Component: Component-zanata-client
Version: 3.4
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Michelle Kim
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks: 1124615
TreeView+ depends on / blocked
 
Reported: 2014-07-04 01:21 UTC by Patrick Huang
Modified: 2015-07-31 01:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-31 01:50:33 UTC
Embargoed:


Attachments (Terms of Use)

Description Patrick Huang 2014-07-04 01:21:33 UTC
Description of problem:
Zanata client is a command line tool and use console. It should color its output so that important information is easier to catch attention.

Comment 1 Patrick Huang 2014-07-04 01:33:13 UTC
http://jansi.fusesource.org/index.html can be used.
Current impediments:
- unpredictable client console's background color thus hard to pick a foreground color that is contrast enough
- we use resource bundle (ATM only in init command) to store actual messages. The message itself is in printf format which makes it hard to tokenize/color individual parts (i.e. ansi color an argument before passing it to printf may result in exception if the template is %d)
- need to either have all commands done or none. Otherwise will end up with inconsistency.
- some information are passed to user in form of log. Some are in form of console output. May need a way to unify these. NB, log can be turned off.

Comment 2 Patrick Huang 2014-12-01 05:14:32 UTC
Things to consider (quoted from Sean in one of the review comments):
From a scriptability point of view, it is good to output to stdout and stderr, which can be redirected to pipes, grepped, etc.

If this were C, I would suggest using isatty(stdout) to decide whether to use fancy console features or just write to stdout. In Java, it might be better to have a command line option (eg --avoid-console or --plaintext).

Comment 4 Damian Jansen 2015-07-14 00:21:26 UTC
Reassigned to PM

Comment 5 Zanata Migrator 2015-07-31 01:50:33 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-571


Note You need to log in before you can comment on or make changes to this bug.