All Projects → matejak → Argbash

matejak / Argbash

Licence: other
Bash argument parsing code generator

Projects that are alternatives of or similar to Argbash

React View
React View is an interactive playground, documentation and code generator for your components.
Stars: ✭ 544 (-37.69%)
Mutual labels:  code-generator
Clipp
easy to use, powerful & expressive command line argument parsing for modern C++ / single header / usage & doc generation
Stars: ✭ 687 (-21.31%)
Mutual labels:  argument-parsing
Graphql Code Generator
A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
Stars: ✭ 7,993 (+815.58%)
Mutual labels:  code-generator
Easycode
基于IntelliJ IDEA开发的代码生成插件,支持自定义任意模板(Java,html,js,xml)。只要是与数据库相关的代码都可以通过自定义模板来生成。支持数据库类型与java类型映射关系配置。支持同时生成生成多张表的代码。每张表有独立的配置信息。完全的个性化定义,规则由你设置。
Stars: ✭ 552 (-36.77%)
Mutual labels:  code-generator
Freezed
Code generation for immutable classes that has a simple syntax/API without compromising on the features.
Stars: ✭ 667 (-23.6%)
Mutual labels:  code-generator
Swiftinitializergenerator
Xcode Source Code Extension to Generate Swift Initializers
Stars: ✭ 718 (-17.75%)
Mutual labels:  code-generator
Hsweb3 Demo
hsweb 3.0版本演示,ui基于miniui,集成hsweb全家桶的web端演示,集成代码生成器
Stars: ✭ 490 (-43.87%)
Mutual labels:  code-generator
Janett
Java to C#.Net Translator
Stars: ✭ 8 (-99.08%)
Mutual labels:  code-generator
Clap
Create your command-line parser, with all of the bells and whistles, declaratively or procedurally.
Stars: ✭ 7,174 (+721.76%)
Mutual labels:  argument-parsing
Freebuilder
Automatic generation of the Builder pattern for Java
Stars: ✭ 772 (-11.57%)
Mutual labels:  code-generator
Flutter gen
The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
Stars: ✭ 583 (-33.22%)
Mutual labels:  code-generator
Felix
The Felix Programming Language
Stars: ✭ 609 (-30.24%)
Mutual labels:  code-generator
Go Swagger
Swagger 2.0 implementation for go
Stars: ✭ 7,058 (+708.48%)
Mutual labels:  code-generator
Rust Embed
Rust Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
Stars: ✭ 548 (-37.23%)
Mutual labels:  code-generator
Springbootcodegenerator
又名大狼狗代码生成器,基于SpringBoot2+Freemarker的JAVA代码生成器,以释放双手为目的,支持mysql/oracle/pgsql三大数据库, 用DDL-SQL语句生成JPA/JdbcTemplate/Mybatis/MybatisPlus/BeetlSQL等相关代码.
Stars: ✭ 810 (-7.22%)
Mutual labels:  code-generator
Generator
A code generator for MyBatis.
Stars: ✭ 4,847 (+455.21%)
Mutual labels:  code-generator
Zxw.framework.netcore
基于EF Core的Code First模式的DotNetCore快速开发框架,其中包括DBContext、IOC组件autofac和AspectCore.Injector、代码生成器(也支持DB First)、基于AspectCore的memcache和Redis缓存组件,以及基于ICanPay的支付库和一些日常用的方法和扩展,比如批量插入、更新、删除以及触发器支持,当然还有demo。欢迎提交各种建议、意见和pr~
Stars: ✭ 691 (-20.85%)
Mutual labels:  code-generator
Taco
The Tensor Algebra Compiler (taco) computes sparse tensor expressions on CPUs and GPUs
Stars: ✭ 846 (-3.09%)
Mutual labels:  code-generator
Hel
Hel rules over Helheim, where the souls unworthy of Valhalla reside. It's also a mock generator for Go.
Stars: ✭ 16 (-98.17%)
Mutual labels:  code-generator
Astring
🌳 Tiny and fast JavaScript code generator from an ESTree-compliant AST.
Stars: ✭ 757 (-13.29%)
Mutual labels:  code-generator

argbash

Build Status Documentation Status

argbash logo

  • Do you write Bash scripts that should accept arguments?
  • But they don't since arguments support is a daunting task, because ...
  • getopt is discouraged, getopts doesn't support long options, there is no widely-accepted Bash module to do the task and some solutions don't work on all platforms (Linux, OSX, MSW)...

Give Argbash a try and stop being terrorized by those pesky arguments! With Argbash, you will get:

  • Fast, minimalistic declaration of arguments your script expects (see below for supported argument types).
  • Scripts generated from definitions once that can be used on all platforms that have bash.
  • Definitions embedded in few lines of the script itself (so you can use Argbash to regenerate the parsing part of your script easily).
  • Ability to re-use low-level Argbash-aware scripts by wrapping them by higher-level Argbash-aware ones conveniently, without duplicating code.
  • Easy installation (optional). Just grab a release, unzip it, go inside and run cd resources && make install (you may want to run sudo make install PREFIX=/usr for a system-wide installation).
  • Documentation and examples.

Make your existing script powered by Argbash in a couple of minutes. Explore various Argbash flavours:

Flavour Target group
Argbash online Use it if you want to try Argbash without installing it and you have permanent access to the Internet.
Argbash CLI Install the package to have argbash ready locally all the time.
Argbash Docker Pretty much like Argbash CLI, but you don't have to install it, you just download the image.

What it is

Argbash is not a parsing library, but it is rather a code generator that generates a bash library tailor-made for your script. It lets you to describe arguments your script should take and then, you can generate the bash parsing code. It stays in your script by default, but you can have it generated to a separate file and let Argbash to include it in your script for you. In any case, you won't need Argbash to run the script.

Argbash is very simple to use and the generated code is relatively nice to read. Moreover, argument definitions stay embedded in the script, so when you need to update the parsing logic, you just re-run the argbash script on the already generated script.

So by writing few comments to your script and running the Argbash's bin/argbash over it, you will get a bash script with argument parsing. See the simple example source template and simple example script for the result. If you are not into long reading, let bin/argbash-init generate the template for you.

Following argument types are supported:

  • Positional arguments (defaults supported, possibility of fixed, variable or infinite number of arguments),
  • optional arguments that take one value,
  • boolean optional arguments,
  • repeated (i.e. non-overwriting) optional arguments,
  • incrementing (such as --verbose) optional arguments and
  • action optional arguments (such as --version, --help).

Following outputs are available:

  • Bash scripts, tailor-made bash parsing libraries.
  • POSIX scripts that use getopts, also tailor-made.
  • Bash completion.
  • docopt-compliant usage message.
  • Manpage output using rst2man.

The utility has been inspired by Python's argparse and the shflags project.

Read the docs (latest stable version) for more info

Requirements

  • bash that can work with arrays (most likely bash >= 3.0) (the only requirement for users - i.e. people that only execute scripts and don't make them)
  • autom4te utility that can work with sets (part of autoconf >= 2.63 suite)
  • basic utilities s.a. sed, grep, cat, test.
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].