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::Grammar

From GitHub:

zef isntall https://github.com/antononcube/Raku-Getopt-Long-Grammar.git

Usage 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);

Getopt::Long::Grammar v0.0.1

Parsing getopt and argparser parameter specs.

Authors

  • Anton Antonov

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Getopt::Long::Grammar
  • Getopt::Long::Grammar::Actions

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.