CLI Features

Epyk library will provide CLI features to assist in doing standard events:

  1. epyk

Those CLI will provide features to transpile a script to different framework. Multiple entry points are available to allow the transpiling to different format. Functions to create new reports are also available here.

  1. epyk_npm

Those CLI features will provide helper to deal with packages. It will allow to:

  • check packages in a or multiple reports.

  • Install external packages locally

  1. epyk_project

Those CLI features will help in creating the right folder structure for projects. This will ensure an easy integration with the Studio.

Export (core) features

epyk_export.exe

epyk.core.cli.cli_export.angular(args)

Generate an Angular Application from the Epyk page

epyk.core.cli.cli_export.demo(args)

Create a page to demonstrate a example of report.

Parameters

args

epyk.core.cli.cli_export.html(args)

Transpile a specific report.

Parameters
  • path – -p, The path where the new environment will be created: -p /foo/bar

  • name – -n, The name of the page to be transpiled: -n home

  • split – -split, Y / N Flag to specify if the result should be splitting in several files

epyk.core.cli.cli_export.main()

The main function for all the export CLI entry points.

epyk.core.cli.cli_export.page(args)

Create a new page.

Parameters

args

epyk.core.cli.cli_export.transpile(args)

Transpile a specific report

Parameters
  • name – -p, The path where the new environment will be created: -p /foo/bar

  • path – -n, The name of the page to be transpiled: -n home.

  • split – -s, Y / N Flag, to specify if the files should be split input 3 modules.

  • output – -0. String. Optional. The output destination path.

  • output – -0. String. Optional. The output destination path.

  • colors – String. Optional. The list of colors as string commas delimited.

NPM Wrappers

Dedicated CLI for the External packages management.

epyk_npm.exe

epyk.core.cli.cli_npm.angular(args)

Create an Angular application derived from the main NodeJs server. Then Angular CLI must be available on the NodeJs server.

Parameters
  • parser – -s, The nodeJs server path

  • parser – -n, The Angular application name

epyk.core.cli.cli_npm.angular_parser(parser)

Paser for the angular CLI

Parameters

subparser – subparser

epyk.core.cli.cli_npm.install(args)

Install only the defined packages locally. Those packages can be only the ones that the React or Vue scripters will be using.

The install will rely on the version and configuration in the Imports module

Usage:

print(",".join(list(page.imports.requirements)))

epyk_npm.exe install -pkg=promise-polyfill,@popperjs/core,bootstrap,showdown,jquery,accounting,tabulator-tables,moment,chart.js
Parameters
  • packages – -pkg. The packages list comma separated.

  • path – -p. Optional. The project path. Default current path.

  • force – -f. Optional. Force the update of the already installed packages. Default N.

epyk.core.cli.cli_npm.install_all(args)

Install all the internally defined packages locally. This will mimic the structure of NPM in order to facilitate the links.

Parameters

parser – -p, The project path

epyk.core.cli.cli_npm.main()
epyk.core.cli.cli_npm.npm(args)

Install the external packages relying on the NPM Javascript command line availabke on the NodeJs server. This will not install the packages using the definition in Imports but on the ones in the NPM configuration.

Parameters
  • parser – -pkg, String, The packages list comma separated

  • parser – -s, Path of the NodeJs server

epyk.core.cli.cli_npm.react(args)

Create the React application

Parameters
  • parser – -s, The nodeJs server path

  • parser – -n, The Angular application name

epyk.core.cli.cli_npm.react_parser(parser)

Paser for the vue CLI

Parameters

subparser – subparser

epyk.core.cli.cli_npm.requirements(args)

Get the list of external modules required for a script.

Parameters
  • path – -p, the workspace path (Optional if run directly in the project root)

  • exception – -e, Y/N flag

  • page – -r, The page name (without the .py extension)

epyk.core.cli.cli_npm.update(args)

Install only the defined packages locally.

The install will rely on the version and configuration in the Imports module.

See also

This is equivalent to epyk_npm.exe install -f=Y

Usage:

print(",".join(list(page.imports.requirements)))

epyk_npm.exe update -pkg=promise-polyfill,@popperjs/core,bootstrap,showdown,jquery,accounting,tabulator-tables,moment,chart.js
param packages

-pkg. The packages list comma separated.

param path

-p. Optional. The project path. Default current path.

epyk.core.cli.cli_npm.vue(args)

Create the VueJs application

Parameters
  • parser – -s, The nodeJs server path

  • parser – -n, The Angular application name

epyk.core.cli.cli_npm.vue_parser(parser)

Paser for the vue CLI

Parameters

subparser – subparser

Project features

Main command lines for Epyk

epyk.exe

epyk.core.cli.cli_project.add(args)

Add the UI structure to an existing project. This will not create a new workspace it will only add the mandatory structure for a valid UI project.

The project structure is as below: /ui

ui end points definition and data structures communication with the backend

/reports

Folder with all the Python scripts

/templates

Folder with the shared report structure

/views

Folder with the transpiled scripts

ui_settings.py, configuration module for the UI framework

Parameters

parser – -p, The path where the new environment will be created: -p /foo/bar

epyk.core.cli.cli_project.app(args)
Parameters

args

epyk.core.cli.cli_project.compile(args)

Compile a markdown file to a valid HTML page.

Parameters

args

epyk.core.cli.cli_project.main()

Main entry point for the various project command lines.

epyk.core.cli.cli_project.new(args)

Create a new Epyk Structure.

The project structure is as below: /ui

/reports

Folder with all the Python scripts

/templates

Folder with the shared report structure

/views

Folder with the transpiled scripts

ui_settings.py, configuration module for the UI framework

Parameters
  • parser – -p, The path where the new environment will be created: -p /foo/bar

  • parser – -n, The name of the new environment: -n MyEnv

epyk.core.cli.cli_project.page(args)

Create a new page in the current project.

Parameters
  • parser – -p, The page / report name to be created (without the extension)

  • parser – -n, The path where the new environment will be created: -p /foo/bar

epyk.core.cli.cli_project.translate(args)

Translate a markdown file to a valid Epyk python page.

Parameters

args

epyk.core.cli.cli_project.transpile_all(args)

Transpile to HTML all the reports in the project Views are generated by default at the same level than the ui_setting file

Parameters

args