From 6487214968cd2972169db934b539db631fa065f3 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Sat, 4 Sep 2021 16:02:46 +0200 Subject: [PATCH] nom: basic refactoring --- infra/nom/LICENSE | 1 + infra/nom/bin/nom-split | 5 ++++ infra/nom/clap/README.md | 13 ---------- infra/nom/clap/lib/Clap/Clap.rakumod | 39 ---------------------------- infra/nom/clap/test.raku | 11 -------- infra/nom/main.raku | 7 ----- 6 files changed, 6 insertions(+), 70 deletions(-) create mode 120000 infra/nom/LICENSE create mode 100644 infra/nom/bin/nom-split delete mode 100644 infra/nom/clap/README.md delete mode 100644 infra/nom/clap/lib/Clap/Clap.rakumod delete mode 100644 infra/nom/clap/test.raku delete mode 100644 infra/nom/main.raku diff --git a/infra/nom/LICENSE b/infra/nom/LICENSE new file mode 120000 index 00000000000..9092f006857 --- /dev/null +++ b/infra/nom/LICENSE @@ -0,0 +1 @@ +/home/Projects/kookienomicon/licenses/GPL-3.0 \ No newline at end of file diff --git a/infra/nom/bin/nom-split b/infra/nom/bin/nom-split new file mode 100644 index 00000000000..222d31b9be3 --- /dev/null +++ b/infra/nom/bin/nom-split @@ -0,0 +1,5 @@ +#!/usr/bin/env raku + +sub MAIN() { + +} diff --git a/infra/nom/clap/README.md b/infra/nom/clap/README.md deleted file mode 100644 index 61721277766..00000000000 --- a/infra/nom/clap/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Command Line Argument Parser - -A flexible CLI parser for raku. Inspired by -[clap.rs](https://clap.rs)! - - -## Usage - -Install clap with zef! - -```console -$ zip install clap -``` diff --git a/infra/nom/clap/lib/Clap/Clap.rakumod b/infra/nom/clap/lib/Clap/Clap.rakumod deleted file mode 100644 index 04d56192ad0..00000000000 --- a/infra/nom/clap/lib/Clap/Clap.rakumod +++ /dev/null @@ -1,39 +0,0 @@ -unit module Clap; - -say "Loading clap..."; - -class Subcommand is export { - has Str $.name; - has Str $.about is rw; - - method with_name(Str $name) returns Subcommand { - return self.bless(:$name); - } - - method about(Str $about) returns Subcommand { - $!about = $about; - return self; - } -} - -class App is export { - has Str $.about is rw; - has Str $.author is rw; - has @.subs is rw = Array.new(); - - method about(Str $about) returns App { - $!about = $about; - return self; - } - - method author(Str $author) returns App { - $!author = $author; - return self; - } - - method subcommand(Subcommand $cmd) returns App { - @.subs.push($cmd); - return self; - } -} - diff --git a/infra/nom/clap/test.raku b/infra/nom/clap/test.raku deleted file mode 100644 index 4dbe56d907e..00000000000 --- a/infra/nom/clap/test.raku +++ /dev/null @@ -1,11 +0,0 @@ -use lib 'lib/Clap'; -use Clap; - -my $app = App.new() - .about("This is some about text") - .author("Katharina Fey ") - .subcommand(Subcommand - .with_name("build") - .about("Do some thing")); - -say $app; diff --git a/infra/nom/main.raku b/infra/nom/main.raku deleted file mode 100644 index a4275284a05..00000000000 --- a/infra/nom/main.raku +++ /dev/null @@ -1,7 +0,0 @@ -## kookieNOMicon manager -# -# - -sub MAIN() { - -}