nclf

nclf-python is an implementation of the New Command Line Format (NCLF) in python


License
Unlicense
Install
pip install nclf==0.4.0

Documentation

nclf-python

Development status: proposal

nclf-python is an implementation of the New Command Line Format (NCLF) in python.

Example

import sys
from nclf import nclf

args = nclf(sys.argv[1:])
print(args)

Python API

nclf

nclf(args)

Arguments:

  • args - command line arguments such as sys.argv[1:]

Decode NCLF arguments and return array of two elements representing NCLF (see NCLF specification for details).

Command line API

nclf

nclf [arg...]

nclf is a command line program which decodes its NCLF command line arguments and prints them as JSON to standard output.

as_s

as_s [arg...]

as_s is a command line program which prints its arguments to standard output as JSON strings separated by space. The only non-alphanumeric characters in the output are ", and \.

Install

  • Install with pip:
    pip install nclf
  • or use the file nclf.py directly in your program,
  • or use the code in nclf.py directly in your program.

License

Public domain.

Release notes

0.2.0 (2018-05-02)

  • Add as_s.
  • Change decoding of string arguments.

0.1.0 (2018-05-02)

  • Initial release (beta).