Dear Craig, dear Stéphane,

accessibility is an important topic.

bug reports #813614 and #1059828 (the present one) can be fixed either
by adding yet another feature to crontab, or by following the Unix way:
make small excellent commands, each one in charge of a complementary
action, and let them interact.

In my opinion, Craig's proposition to use supercat is the right method
to fix both bug reports; so, I propose to:

- remove the file
  debian/patches/features/Coloring_the_ouput_of_crontab_l.patch, which
  will restore the previous (non colourised) output of `crontab -l`
- modify the manpage crontab.1 to explain how to colourise the output of
  `crontab -l`; typically by issuing `crontab -l | spc -t crontab`,
  and explain shortly how one can customize at will the file which defines
  the coulourisation.
- let the package cron install one file for supercat,
  /etc/supercat/spcrc-crontab; I attach such a file to this e-mail, so
  Stéphane can copy it as ".spcrc-crontab", in order to see how the
  output of `crontab -l | spc -t crontab` looks like.
- add a recommendation from package cron to package supercat.

Thank you in advance for your opinions about it.

@Craig: if you are keen to provide an accessible version of the file
spcrc-crontab, for example made only with high contrast, colourless,
direct/reverse video, normal/bold variants, I would welcome your
contribution and intergrate it, for example as file spcrc-crontabHC, so
one can issue `crontab -l | spc -t crontabHC` to view a crontab with
highly contrasted highlighted elements.

Best regards,                   Georges.

Craig Sanders a écrit :
> Package: cron
> Version: 3.0pl1-182
> 
> Please don't force colourised tty output by default. It makes the output
> unreadable.
> 
> Forcing one person's colour preferences on everyone is a vision impairment /
> accessibility problem for everyone who doesn't have the same visual capability
> as that one individual. Some of us have to very carefully adjust the colors
> (and fonts and sizes etc) used by our terminals so we can read the text -
> and it is very frustrating to have some program over-ride our settings just
> because one person happens to like blue on yellow text, or prefers that
> commented lines be highlighted.
> 
> It's not even necessary for crontab to have special-case code just to
> colourise comments - there are several tools for colourising program output
> and other text, including colorize, highlight, supercat and others already
> packaged for Debian.  If some people want garish bling in their terminals,
> they can use the tools that provide that. That's what they're for.
> 
> At the very least, there should be a way to disable it.
> 
> Or better yet, an option to *enable* colorised output (say, -c or
> --colour/--color) for those who want it. Or an environment variable
> e.g. 'CRONTAB_COLOR=Y' or (borrowing from GREP_COLOR and LS_COLORS etc)
> CRONTAB_COLOR='43;34' to both enable and configure the colourisation.

-- 
Georges KHAZNADAR et Jocelyne FOURNIER
22 rue des mouettes, 59240 Dunkerque France.
Téléphone +33 (0)3 28 29 17 70

# ============ this file is to colorize crontabs ==========
#        1         2         3         4         5
#2345678901234567890123456789012345678901234567890123456789
# HTML COLOR         COL A N T STRING or REGULAR EXPRESSION
#################### ### # # # ############################
#Where:
#  HTML COLOR - Standard HTML Color name for HTML output
#  COL        - Console color name from the list
#                 red, yel, cya, grn, mag, blk, whi, blu
#  A          - Attribute from the list
#                 ' ' : normal
#                 'b' : bold
#                 'u' : underline
#                 'r' : reverse video
#                 'k' : blink
#  N          - number of matches
#                 ' ' : all
#                 '0' : all
#                 '1' - '9' : number of matches
#  T          - type of matching to perform
#                 'c' : characters
#                 's' : string
#                 'r' : regex - case   sensitive
#                 'R' : regex - case insensitive
#                 't' : regex with Unix time conversion
#                 ' ' : default ('r' regex)
#        1         2         3         4         5
#2345678901234567890123456789012345678901234567890123456789
# HTML COLOR         COL A N T STRING or REGULAR EXPRESSION
#################### ### # # # ############################
#                                          default is black
Black                blk       (.*)
#                                        dom is blue + bold
Blue                 blu b 5   \s+(\S+)
#                                     month is green + bold
Green                grn b 4   \s+(\S+)
#                              dow is green + reverse video
Green                grn r 3   \s+(\S+)
#                                        hour is red + bold
Red                  red b 2   \s+(\S+)
#                             minute is red + reverse video
Red                  red r 1   \s*(\S+)
#                                      comments are magenta
Magenta              mag       (^#.*)

Attachment: signature.asc
Description: PGP signature

Reply via email to