Skip to content

Pipeline

Samuel302 edited this page Apr 30, 2023 · 4 revisions

Introduction

The Pipeline is a collection of helpful commands for contributers bundled inside a single script for Linux, MacOS and Windows.
There are no hard dependencies but python is required for the sort and serve commands.

Usage

Methods to access the Pipeline:

  • Using the bash script (MacOS/Linux) (./weblnp)
  • Using the batch script (Windows/DOS) (.\weblnp.bat)
  • Using the bash script with enviroment mode enabled (MacOS/Linux) (weblnp)

To view a list with available commands, just run the help command using your preferred method.

Example
Running help using the enviroment mode inside bash:

# The "enviroment-format" is the default format used in documentation.
# Just replace `weblnp` with the right command specified for your operating system.
$ weblnp help

Commands

Even considering there's already the Help Command, here's a list with all commands supported by the WebLNP Pipeline. Not all commands might work on all scripts the same or even at all, so this list tries to specify differences and details about them.

Help

  • Syntax: weblnp help
  • Displays a list with commands supported by the pipeline-script used.
  • Works everywhere.
  • Only requires /meta/header.txt to work.

License

  • Syntax: weblnp license
  • Displays the license of WebLNP
  • Works everywhere.
  • Only requires /LICENSE to work.

Serve

  • Syntax: weblnp serve
  • Starts a HTTP server running on localhost:8000 used to test WebLNP locally.
  • Works everywhere.
  • The Batch script asks for a python binary to use. This might get implemented on the remaining scripts.
  • Requires Python 3 and the Python Module http.server

Sort

  • Syntax: weblnp sort
  • Runs the script /kml/sort.py.
    It creates for every *.kml-File inside the /kml/-Directory a folder with the file's name
    and moves the to main.kml renamed file into it.
  • Works everywhere.
  • The Batch script asks for a python binary to use. This might get implemented on the remaining scripts.
  • Requires Python 3.

Reload

  • Syntax: weblnp reload
  • When run with Enviroment mode, it rebinds the command. When run using the Bash script it enables Enviroment mode.
  • Only works with the Bash script and the Enviroment mode. It's not implemented in the Batch script.

Exit

  • Syntax: weblnp exit
  • Tries to exit the Enviroment mode. Works via the Bash script and the Enviroment mode.
  • Does not work with the Batch script.

Enviroment mode

Warning
The enviroment mode is currently only supported on Linux or MacOS.

Enabling Enviroment mode

To enable the Enviroment mode, you need to run following command:

$ ./weblnp_env

After that, you can call the weblnp command.

Disabling Enviroment mode

To exit the Enviroment mode, you just need to run weblnp exit.

Alternatively you can also run unset -f weblnp, which unbinds the weblnp function, which was defined by the weblnp_env script.

Important links

Clone this wiki locally