Adding a working README.md.

This commit is contained in:
sergiotarxz 2022-03-04 23:42:36 +01:00
parent 9f02978d4f
commit d0fb720669
3 changed files with 50 additions and 3 deletions

View File

@ -9,6 +9,8 @@ my $build = Module::Build->new(
'Mojolicious' => 0,
'JSON' => 0,
'Const::Fast' => 0,
'IO::Socket::SSL' => 0,
'Net::SSLeay' => 0,
},
);
$build->create_build_script;

View File

@ -1,3 +1,48 @@
# TDTCli
A cli program written in Perl to watch the TDT.
A cli program written in Perl to watch the TDT.
## How to install
Clone this repository and `cd` into the new directory.
Install the program using cpan:
```shell
cpan .
```
If you get prompted by questions press intro to
use the defaults and run: (Supposing your are
using bash.)
```shell
. ~/.bashrc
echo $PERL5LIB
```
If you don't get an output that looks like
```
/home/sergio/perl5/lib/perl5:/home/sergio/perl5/lib/perl5
```
Run `perl -I${HOME}/perl5/lib/ -Mlocal::lib` to
see what enviroment variables you will have to set in your .profile, .shellrc or whatever
file your shell sources.
Once you have a working local::lib you will
be able to run:
```shell
tdtcli.pl
```
It should get you into a new command line that
looks like:
```
tdtcli ~>
```
Now type `help` to get further instructions of usage.

View File

@ -32,7 +32,7 @@ const my $COMMANDS => {
description => 'Select a ambit.',
action => \&select_ambit
},
channnels => {
channels => {
description => 'List available channels.',
action => \&show_channels
},
@ -60,7 +60,7 @@ my $attribs = $term->Attribs;
$attribs->{completion_entry_function} = $attribs->{list_completion_function};
$attribs->{completion_word} = [ keys %$COMMANDS ];
while ( defined( my $line = $term->readline('~> ') ) ) {
while ( defined( my $line = $term->readline('tdtcli ~> ') ) ) {
process_line($line);
$term->addhistory($line);