Giter Club home page Giter Club logo

octopower's Introduction

OctoPower - Easy JCB Powers to Composer PHP package

With this script we can easily package multiple power classes in an automated way from a json configuration file, and environment variables into a composer package.

program only for ubuntu/debian and Gitea systems at this time (should you like to use it on other OS's please open and issue...)


Install

$ sudo curl -L "https://git.vdm.dev/api/v1/repos/octoleo/octopower/raw/src/octopower" -o /usr/local/bin/octopower
$ sudo chmod +x /usr/local/bin/octopower

Usage

To see the help menu

$ octopower -h

Help Menu (octopower)

Usage: octopower [OPTION...]
	Options
	======================================================
   -p | --packager=<packager Name>
    Packager name
    example: octopower -p="Vast Development Method"
    ======================================================
   -pu | --packager-url=<//packager.url>
    Packager url
    example: octopower -pu="https://git.vdm.dev/"
    ======================================================
   -md | --main-dir=<path>
    load the main working directory
    example: octopower --main-dir=/src
    ======================================================
   -e | --env=<file>
    load the environment variables file
    example: octopower --env=/src/.env
    ======================================================
   --conf | --config=<path/url>
    load the configuration for the package in json format
       file-example: src/example.json
    example: octopower --config=config.json
    ======================================================
   -ld | --licence-dir=<path>
    load the licence directory
    example: octopower --licence-dir=/src/licence
    ======================================================
   -t | --token=<access_token>
    load the global token
    example: octopower --token=xxxxxxxxxxxxxxxxxxxxxxxxx
    ======================================================
   -u | --url=<gitea>
    Global url of the Gitea instance
    example: octopower --url="git.vdm.dev"
    ======================================================
   -a | --api=<//gitea.api>
    Global api of the Gitea instance
    example: octopower --api="https://git.vdm.dev/api/v1"
    ======================================================
   -q | --quiet
    mute all output messages
    example: octopower --quiet
    ======================================================
   --update
    to update your install
    example: octopower --update
    ======================================================
   --uninstall
    to uninstall this script
    example: octopower --uninstall
    ======================================================
   -h|--help
    display this help menu
    example: octopower -h
    example: octopower --help
    ======================================================
                    OctoPower v1.0.0
    ======================================================

Local Environment Variables File

Give the path to your .env file to the program like this:

$ octopower --env="/home/username/.config/octopower/custom.env"

Or with an environment variable you set before using the program like this:

$ export VDM_ENV_FILE_PATH="/home/username/.config/octopower/custom.env"

Default path is: /home/$USER/.config/octopower/.env

API ACCESS TOKEN (never share your token)

You can set your API access token for Gitea via the .env file like this:

VDM_GLOBAL_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxx"

Or you can pass the token directly to the script like this:

$ octopower --token="xxxxxxxxxxxxxxxxxxxxxxxxx"

Or with an environment variable you set before using the program like this:

$ export VDM_GLOBAL_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxx"

Configuration File

To see the example of the json configuration options check out config/octopower.json.

You can set your configuration file path via the .env file like this:

VDM_PACKAGE_CONF_FILE="/home/username/.config/octopower/package_name_config.json"

Or you can pass it to the program by URL:

$ octopower --conf="https://git.vdm.dev/api/v1/repos/octoleo/octopower/raw/config/octopower.json"

Or via a local file path:

$ octopower --conf="/home/username/.config/octopower/package_name_config.json"

Or with an environment variable you set before using the program like this:

$ export VDM_PACKAGE_CONF_FILE="/home/username/.config/octopower/package_name_config.json"

Uninstall

$ octopower --uninstall

Free Software License

@copyright  Copyright (C) 2021 Llewellyn van der Merwe. All rights reserved.
@license    GNU General Public License version 2; see LICENSE

octopower's People

Contributors

llewellynvdm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.