From d84045b407da3503e06d763947a88ade9ee6454d Mon Sep 17 00:00:00 2001 From: Andinus Date: Thu, 29 Jul 2021 22:24:48 +0530 Subject: Add proto, make profile-name option named --- lib/Lacerta/CLI.rakumod | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/Lacerta') diff --git a/lib/Lacerta/CLI.rakumod b/lib/Lacerta/CLI.rakumod index cc74879..ad52e0c 100644 --- a/lib/Lacerta/CLI.rakumod +++ b/lib/Lacerta/CLI.rakumod @@ -1,10 +1,13 @@ use Terminal::Spinners; use Text::Table::Simple; +# If no arguments are passed then run USAGE & exit. +proto MAIN(|) is export {unless so @*ARGS {put $*USAGE; exit}; {*}} + #| parses WhatsApp export -multi sub MAIN ( +multi sub MAIN( Str $input where *.IO.f = "input", #= input log file to parse - Str $profile-name = "Andinus", #= your WhatsApp profile name + Str :$profile-name = "Andinus", #= your WhatsApp profile name ) is export { #| Parses the WhatsApp logs. grammar WhatsApp { -- cgit 1.4.1-2-gfad0