richcat package

Subpackages

Submodules

richcat.richcat module

richcat.richcat.check_input_error(args)[source]

The function check input error

Parameters

args (argparse.Namespace) – command line arguments

richcat.richcat.infer_filetype(filepath, filetype)[source]

The function which infer file type

Parameters
  • filepath (str) – command line argument of filepath

  • filetype (str) – command line argument of filetype

Returns

  • filepath (str) – filepath

  • filetype (str) – filetype

richcat.richcat.interpret_style(style)[source]

The function interpret style

Parameters

style (str) – command line argument of style

Returns

dic_style – style dict - structure:

  • ’header’: True/False

  • ’pager’: True/False

Return type

dict

richcat.richcat.main()[source]
richcat.richcat.print_rich(filetype, target_width, color_system, style, filepath=None, file_contents=None)[source]

The function which make rich text

Parameters
  • filepath (str) – filepath

  • filetype (str) – filetype

  • target_width (float) – target_width

  • color_system (str) – color system

  • style (str) – command line argument of style

richcat.richcat.richcat(args)[source]

Module contents

richcat.richcat(filepath=None, file_contents=None, **args)[source]

The richcat function called from Python script

Parameters
  • filepath (str) – filepath

  • **args (args) – filetype : str width : int or float color_system : str style : str

  • Returns – None

  • -------