GithubHelp home page GithubHelp logo

hiddewie / template Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 1.0 365 KB

CLI for templating based on JSON, YAML or HCL configuration

License: MIT License

Rust 98.67% HCL 0.08% Dockerfile 1.25%
cli hcl json rust template yaml

template's People

Contributors

dependabot[bot] avatar hiddewie avatar szabgab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ivanitskiy

template's Issues

Error and logging function

Error for asserting requirements
Logging function for outputting things to the standard error, but without template output.

Implementation of function library

general

  • default
  • null - coalesce
  • to / from JSON
  • to pretty JSON
  • type of value

Strings

  • length
  • substring (take, drop, shrink, pad)
  • capitalize (first character and all characters)
  • PascalCase
  • camelCase
  • snake_case
  • kebab-case
  • environment
  • split
  • reverse
  • match regex
  • replace
  • regexReplace
  • contains
  • startsWith / endsWith
  • trim
  • abbreviate
  • empty
  • escape (HTML, JSON, JS, CSS, SQL, URL/query)
  • indent
  • to array of bytes

Boolean

  • negate

Numbers

  • -
  • format to base, parse from base
  • arithmetic
  • constants
  • exp, log
  • formatting, also locale (config), percentage
  • sum / avg (only number arrays)
  • min / max
  • binary operations (and, or, xor, nand, nor, invert, shifts)
  • (ints) until to make array range

Crypto, encoding

  • hashing
  • encryption
  • base64, base48, base32
  • hex encoding

Array

  • sort for some key
  • reverse
  • join
  • length
  • first
  • last
  • take / drop
  • contains
  • empty
  • unique
  • containsAll, containsAny, containsNone
  • chunked
  • first / last, and other array methods
  • lines (split by \n, \r\n or \r)
  • zip
  • any / all / none / some

Object

  • keys
  • values
  • invert
  • length
  • containsKey
  • containsValue
  • empty
  • loop over key/value pairs

Formats

  • to/from JSON

Date/time/timezone

  • timezone
  • current time
  • current date
  • current unix epoch / timestamp
  • date/time formatting
  • duration strings & conversion

Random

  • UUID
  • integer in range
  • string with chars

URL support

  • parse / format / extract parts of URLs

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.