App-week
view release on metacpan or search on metacpan
script/week view on Meta::CPAN
#!/usr/bin/env perl
use v5.14;
use warnings;
use App::week;
exit App::week->new->run(@ARGV);
__END__
=encoding utf8
=head1 NAME
week - colorful calendar command for ANSI terminal
=head1 SYNOPSIS
B<week> [ -MI<module> ] [ option ] [ date ]
Options:
-#,-m# # months surrounding today (default 3)
-A # after current month
-B # before current month
-C[#] before and after current month (default 4)
-y year calendar
-Y[#] # years of calendar
-c # number of columns (default 3)
-p # print year on month-# (default current, 0 for none)
-P print year on all months
-W print week number
--theme theme
apply color theme
Color options:
--colormap specify colormap
--rgb24 use 24bit RGB color ANSI sequence
i18n options:
-l list i18n options
--i18n enable i18n options
--i18n-v display with Territory/Lange information
Color modules:
-Mcolors
-Mnpb
-Molympic
=head1 VERSION
Version 1.0303
=head1 DESCRIPTION
By default, B<week> command display the previous, current and next
month surrounding today, just like B<-3> option of L<cal(1)> command.
Number of month can be given with dash, or B<-m> option which can be
mixed up with other parameters. B<-c> option specifies number of
columns.
$ week -12
$ week -m21c7
Before and after months can be specified with B<-B> and B<-A> option,
and B<-C> for both.
$ week -B4 -A4
$ week -C4
Date can given like:
$ week 2019/9/23
$ week 9/23 # 9/23 of current year
$ week 23 # 23rd of current month
And also in Japanese format and era:
$ week 2019å¹´9æ23æ¥
$ week å¹³æ31å¹´9æ23æ¥
$ week H31.9.23
$ week å¹³æ31
$ week å¹³31
$ week H31
Greater number is handled as a year. Next command displays the
calendar of the year 1752.
$ week 1752
Use option B<-y> to show one year calendar. The number of years can
be specified by the B<-Y> option (must <= 100), which will implicitly
set the B<-y> option.
$ week -y # display this year's calendar
$ week -Y2c6 # display 2 years calendar in 6 column
=head1 INTERNATIONAL SUPPORT
It is possible display calendar in various language by setting C<LANG>
environment.
LANG=et_EE week
This command come with B<-Mi18n> module which provides easy way to
specify language by command option. Option B<-l> displays option list
provided by B<-Mi18n> module and option B<--i18n> and B<--i18n-v>
enables them. See L<Getopt::EX::i18n>.
$ week --i18n-v --et
=head1 JAPANESE ERA
By default, chronological year is shown on current month and every
January. When used in Japanese locale environment, right side year is
displayed in Japanese era (wareki: 忦) format.
=head1 WEEK NUMBER
Using option B<-W> or B<--weeknumber>, week number is printed at the
end of every week line. Week number 1 is a week which include January
1st and count up on every Sunday.
Experimentally option B<-W2> print the I<standard week number> which
start with the first Sunday of the year, and B<-W3> print ISO 8601
style week number. Because ISO week start on Monday, and the command
shows a number of Sunday of the week, the result is not intuitive and
therefore, I guess, useless. This option requires L<gcal(1)> command
installed.
=head1 COLORMAP
Each field is labeled by names.
FRAME Enclosing frame
MONTH Month name
WEEK Day of the week
DAYS Calendar
THISMONTH Target month name
THISWEEK Target day of the week
THISDAYS Target calendar
THISDAY Target date
Color for each field can be specified by B<--colormap> (B<--cm>)
option with B<LABEL>=I<colorspec> syntax. Default color is:
--colormap DAYS=L05/335 \
--colormap WEEK=L05/445 \
--colormap FRAME=L05/445 \
--colormap MONTH=L05/335 \
--colormap THISDAY=522/113 \
--colormap THISDAYS=555/113 \
--colormap THISWEEK=L05/445 \
--colormap THISMONTH=555/113
Besides above, color for day-of-week names (and week number) can be
specified individually by following labels. No color is assigned to
these labels by default.
DOW_SU Sunday
DOW_MO Monday
DOW_TU Tuesday
DOW_WE Wednesday
DOW_TH Thursday
DOW_FR Friday
DOW_SA Saturday
DOW_CW Week Number
Three digit means 216 RGB values from C<000> to C<555>, and C<L01>
.. C<L24> mean 24 gray scales. Colormap is handled by
L<Getopt::EX::Colormap> module; use `perldoc Getopt::EX::Colormap` for
detail.
You can add special effect afterward. For example, put next line in
your F<~/.weekrc> to blink today. C<< $<move> >> indicates to move
all following arguments here, so that insert this option at the end.
option default $<move> --cm 'THISDAY=+F'
=head1 I18N
=over 4
=item B<--i18n>
=item B<--i18n-v>
Both of these enables I18N options and Territory/Language information
will be shown if used B<--i18n-v>.
=back
=head1 MODULES
Some modules are included in the distribution. These options can be
used without any special action, because they are defined to load
appropriate module automatically in default start up module
(L<App::week::default>).
=over 4
( run in 1.953 second using v1.01-cache-2.11-cpan-39bf76dae61 )