All Projects → sbstjn → allot

sbstjn / allot

Licence: MIT License
Parse placeholder and wildcard text commands

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to allot

Slacker
Slack Bot Framework
Stars: ✭ 495 (+870.59%)
Mutual labels:  chatops, command, slackbot
Parjs
JavaScript parser-combinator library
Stars: ✭ 145 (+184.31%)
Mutual labels:  parsing, text
Master Plan
Project Management for Hackers
Stars: ✭ 121 (+137.25%)
Mutual labels:  parsing, text
Hanu
Golang Framework for writing Slack bots
Stars: ✭ 128 (+150.98%)
Mutual labels:  chatops, slackbot
Input Mask Android
User input masking library repo.
Stars: ✭ 1,060 (+1978.43%)
Mutual labels:  text, pattern
Kommander Ios
A lightweight, pure-Swift library for manage the task execution in different threads. Through the definition a simple but powerful concept, Kommand.
Stars: ✭ 167 (+227.45%)
Mutual labels:  command, pattern
Neodoc
Beautiful, hand-crafted commandline interfaces for node.js
Stars: ✭ 221 (+333.33%)
Mutual labels:  parsing, command
Pattern Matching Ts
⚡ Pattern Matching in Typescript
Stars: ✭ 107 (+109.8%)
Mutual labels:  matching, pattern
DotGrok
Parse text with pattern. Inspired by grok filter.
Stars: ✭ 26 (-49.02%)
Mutual labels:  parsing, text
chemin
🥾 A type-safe pattern builder & route matching library written in TypeScript
Stars: ✭ 37 (-27.45%)
Mutual labels:  matching, pattern
pyrser
A PEG Parsing Tool
Stars: ✭ 32 (-37.25%)
Mutual labels:  parsing, matching
Input Mask Ios
User input masking library repo.
Stars: ✭ 494 (+868.63%)
Mutual labels:  text, pattern
Matchzoo Py
Facilitating the design, comparison and sharing of deep text matching models.
Stars: ✭ 362 (+609.8%)
Mutual labels:  text, matching
Sywac
🚫 🐭 Asynchronous, single package CLI framework for Node
Stars: ✭ 109 (+113.73%)
Mutual labels:  parsing, command
Matchzoo
Facilitating the design, comparison and sharing of deep text matching models.
Stars: ✭ 3,568 (+6896.08%)
Mutual labels:  text, matching
dir-glob
Convert directories to glob compatible strings
Stars: ✭ 41 (-19.61%)
Mutual labels:  matching, pattern
Ts Pattern
🎨 A complete Pattern Matching library for TypeScript, with smart type inference.
Stars: ✭ 854 (+1574.51%)
Mutual labels:  matching, pattern
Motif
Recursive, data driven pattern matching for Clojure
Stars: ✭ 63 (+23.53%)
Mutual labels:  matching, pattern
Sactive Bot
😈 An extensible chat bot framework. sactive-bot is an evolution of the open source hubot project. - https://www.shipengqi.top/sactive-bot .
Stars: ✭ 212 (+315.69%)
Mutual labels:  chatops, slackbot
html-comment-regex
Regular expression for matching HTML comments
Stars: ✭ 15 (-70.59%)
Mutual labels:  text, pattern

allot MIT License GoDoc Go Report Card allot - Coverage Status Build Status

allot is a small Golang library to match and parse commands with pre-defined strings. For example use allot to define a list of commands your CLI application or Slackbot supports and check if incoming requests are matching your commands.

The allot library supports placeholders and regular expressions for parameter matching and parsing.

Usage

cmd := allot.NewCommand("revert <commits:integer> commits on <project:string> at (stage|prod)")
match, err := cmd.Match("revert 12 commits on example at prod")

if (err != nil)
  commits, _ = match.Integer("commits")
  project, _ = match.String("project")
  env, _ = match.Match(2)

  fmt.Printf("Revert \"%d\" on \"%s\" at \"%s\"", commits, project, env)
} else {
  fmt.Println("Request did not match command.")
}

Examples

See the hanu Slackbot framework for a usecase for allot:

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].