README-work
Getopt::Long::Grammar
Raku package for parsing Getopt specs and Python CLI specs.
Motivation
Given a Jupyter chatbook made with the Python kernel I want to be able to switch to a Raku kernel for that chatbook and use the chat cells as they are, without changing the "magic specs." This means, being able to parse the magic argument specs in the way the Jupyter Python Kernel uses them. (See "IPython extensions" and "argparse".)
Installation
From Zef ecosystem:
zef install Getopt::Long::GrammarFrom GitHub:
zef isntall https://github.com/antononcube/Raku-Getopt-Long-Grammar.gitUsage examples
Load the package and parse a typical magic command:
use Getopt::Long::Grammar;
my $cmd = '%%chat_meta cw1 --api_key=cd77fdfw1 --prompt';
getopt-parse($cmd);Interpret:
getopt-interpret($cmd);