Giter Club home page Giter Club logo

sitcom's Introduction

Signals based console application wrapper

Latest Stable Version License Scrutinizer Code Quality Code Coverage

Quick Install

composer require maslosoft/sitcom

Documentation

Full Sitcom Documentation

Crucial Commands Combined

Sitcom allows you to collect all commands from scatterred application and make them available in common environment.

Sitcom allows you to call commands from many sources from one executable.

Note: Currently this will only work for self-contained commands. If command relies on it's application, it will not be provided to it.

To add command to sitcom add it via signals, here is example from hedron:

// Use statments skipped
class RenderTemplateCommand extends Symfony\Component\Console\Command\Command
{
	protected function configure()
	{
		// irrelevant
	}

	protected function execute(InputInterface $input, OutputInterface $output)
	{
		// irrelevant
	}
	
	/**
	 * @SlotFor(Maslosoft\Sitcom\Command)
	 * @param Maslosoft\Signals\Command $signal
	 */
	public function reactOn(\Maslosoft\Sitcom\Command $signal)
	{
		$signal->add($this, 'hedron');
	}

Call sitcom collect, this will generate command list.

Now call sitcom to list commands, here is the output:

   _____ _ __
  / ___/(_) /__________  ____ ___
  \__ \/ / __/ ___/ __ \/ __ `__ \
 ___/ / / /_/ /__/ /_/ / / / / / /
/____/_/\__/\___/\____/_/ /_/ /_/

Sitcom version 1.0.0

Usage:
 command [options] [arguments]

Options:
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
 --version (-V)        Display this application version
 --ansi                Force ANSI output
 --no-ansi             Disable ANSI output
 --no-interaction (-n) Do not ask any interactive question

Available commands:
 collect          Build a list of commands
 help             Displays help for a command
 list             Lists commands
hedron
 hedron:commit    Apply headers to all php classes
 hedron:preview   Show list of files to which headers will be applied
 hedron:show      Show how current template will look like

sitcom's People

Contributors

pmaselkowski avatar

Watchers

 avatar  avatar  avatar

sitcom's Issues

Add config

Config file .sitcom.yml should contain:

require:
   - _bootstrap.php

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.