2017 © Pedro Peláez
 

library codebuilder

Execute JSON defined user scripts

image

keboola/codebuilder

Execute JSON defined user scripts

  • Wednesday, March 14, 2018
  • by kachnitel
  • Repository
  • 8 Watchers
  • 1 Stars
  • 3,139 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 17 Versions
  • 1 % Grown

The README.md

Keboola CodeBuilder

Description

Execute user scripts defined in a JSON, (*1)

Allowed functions

  • md5: Generate a md5 key from its argument value
  • sha1: Generate a sha1 key from its argument value
  • time: Return time from the beginning of the unix epoch in seconds (1.1.1970)
  • date: Return date in a specified format
  • strtotime: Convert a date string to number of seconds from the beginning of the unix epoch
  • base64_encode
  • hash_hmac: See PHP documentation
  • sprintf: See PHP documentation
  • concat: Concatenate its arguments into a single string
  • ifempty: Return first argument if is not empty, otherwise return second argument
  • implode: Concatenate an array from the second argument, using glue string from the first arg
  • hash: See PHP documentation

Syntax

The function must be specified in a JSON format, which may contain one of the following 4 objects:, (*2)

  • String: { "something" }
  • Function: One of the allowed functions above, (*3)

    • Example (this will return current date in this format: 2014-12-08+09:38:, (*4)

      {
          "function": "date",
          "args": [
              "Y-m-d+H:i"
          ]
      }
      
    • Example with a nested function (will return a date in the same format from 3 days ago):, (*5)

      {
          "function": "date",
          "args": [
              "Y-m-d+H:i",
              {
                  "function": "strtotime",
                  "args": ["3 days ago"]
              }
          ]
      }
      
  • A key from the parameters array:
    • { "attr": "attributeName" } for $params['attr']['attributeName']
    • or { "param": "nested.attribute.name" } for $params['param']['nested']['attribute']['name']
    • The first level is always used as the key to determine the "type"

License

MIT licensed, see LICENSE file., (*6)

The Versions

14/03 2018

dev-master

9999999-dev

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana
by Avatar Keboola

user script user-script

14/03 2018

0.5.1

0.5.1.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Keboola

user script user-script

14/03 2018

0.5.0

0.5.0.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Keboola

user script user-script

20/12 2017

0.4.0

0.4.0.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Keboola

user script user-script

18/06 2017

0.3.0

0.3.0.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Keboola

user script user-script

18/06 2017

dev-cleanup

dev-cleanup

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Keboola

user script user-script

06/06 2017

0.2.2

0.2.2.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

03/08 2016

0.2.1

0.2.1.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

02/08 2016

dev-erik

dev-erik

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

09/03 2016

0.2.0

0.2.0.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

29/08 2015

0.1.6

0.1.6.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

29/08 2015

0.1.5

0.1.5.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

16/02 2015

0.1.4

0.1.4.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

16/02 2015

0.1.3

0.1.3.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

09/12 2014

0.1.2

0.1.2.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

09/12 2014

0.1.1

0.1.1.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script

09/12 2014

0.1.0

0.1.0.0

Execute JSON defined user scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ondrej Vana

user script user-script