Giter VIP home page Giter VIP logo

context-mapper-cli's Introduction

Context Mapper

Context Mapper CLI

Build (master) codecov License Maven Central

This repository contains the Context Mapper CLI - a command line interface to validate CML files and call generators (currently PlantUML, Context Map, and generic text files via Freemarker template).

Download

The CLI can be downloaded under the following links:

  • TAR (Linux, Mac)
  • ZIP (Windows)

In case you want to include Context Mapper in your Maven or Gradle build, you can use the CLI to call generators (for example with Maven exec plugin).

Gradle:

implementation 'org.contextmapper:context-mapper-cli:6.9.0'

Maven:

<dependency>
  <groupId>org.contextmapper</groupId>
  <artifactId>context-mapper-cli</artifactId>
  <version>6.9.0</version>
</dependency>

Validate Command Usage

$ ./cm validate -h
Context Mapper CLI
usage: cm validate
 -h,--help          Prints this message.
 -i,--input <arg>   Path to the CML file which you want to validate.

Generate Command Usage

$ ./cm generate -h
Context Mapper CLI
usage: cm generate
 -f,--outputFile <arg>   The name of the file that shall be generated
                         (only used by Freemarker generator, as we cannot
                         know the file extension).
 -g,--generator <arg>    The generator you want to call. Use one of the
                         following values: context-map (Graphical DDD
                         Context Map), plantuml (PlantUML class-,
                         component-, and state diagrams.), generic
                         (Generate generic text with Freemarker template)
 -h,--help               Prints this message.
 -i,--input <arg>        Path to the CML file for which you want to
                         generate output.
 -o,--outputDir <arg>    Path to the directory into which you want to
                         generate.
 -t,--template <arg>     Path to the Freemarker template you want to use.
                         This parameter is only used if you pass 'generic'
                         to the 'generator' (-g) parameter.

Usage examples

The following examples illustrate the CLI usage.

Validate *.cml File

./cm validate -i DDD-Sample.cml

Generate PlantUML

./cm generate -i DDD-Sample.cml -g plantuml -o ./output-directory

Generate Context Map

./cm generate -i DDD-Sample.cml -g context-map -o ./output-directory

Generate Arbitrary Text File with Freemarker Template

./cm generate -i DDD-Sample.cml -g generic -o ./output-directory -t template.md.ftl -f glossary.md

Development / Build

If you want to contribute to this project you can create a fork and a pull request. The project is built with Gradle, so you can import it as Gradle project within Eclipse or IntelliJ IDEA (or any other IDE supporting Gradle).

Contributing

Contribution is always welcome! Here are some ways how you can contribute:

Licence

ContextMapper is released under the Apache License, Version 2.0.

context-mapper-cli's People

Contributors

stefan-ka avatar rhoriguchi avatar binkley avatar socadk 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.