Skip to content

Commit 5e21849

Browse files
committed
Base
0 parents  commit 5e21849

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2118
-0
lines changed

LICENSE

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Copyright (c) 2014-2016, Humberto Lourenço <betto@m3uzz.com>.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions
6+
are met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions and the following disclaimer in
13+
the documentation and/or other materials provided with the
14+
distribution.
15+
16+
* Neither the name of Humberto Lourenço nor the names of his
17+
contributors may be used to endorse or promote products derived
18+
from this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24+
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31+
POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Onion Tool

bin/cmstool.php

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env php
2+
<?php
3+
/**
4+
* This file is part of Onion Tool
5+
*
6+
* Copyright (c) 2014-2016, Humberto Lourenço <betto@m3uzz.com>.
7+
* All rights reserved.
8+
*
9+
* Redistribution and use in source and binary forms, with or without
10+
* modification, are permitted provided that the following conditions
11+
* are met:
12+
*
13+
* * Redistributions of source code must retain the above copyright
14+
* notice, this list of conditions and the following disclaimer.
15+
*
16+
* * Redistributions in binary form must reproduce the above copyright
17+
* notice, this list of conditions and the following disclaimer in
18+
* the documentation and/or other materials provided with the
19+
* distribution.
20+
*
21+
* * Neither the name of Humberto Lourenço nor the names of his
22+
* contributors may be used to endorse or promote products derived
23+
* from this software without specific prior written permission.
24+
*
25+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36+
* POSSIBILITY OF SUCH DAMAGE.
37+
*
38+
* @category PHP
39+
* @package OnionTool
40+
* @author Humberto Lourenço <betto@m3uzz.com>
41+
* @copyright 2014-2016 Humberto Lourenço <betto@m3uzz.com>
42+
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
43+
* @link http://github.com/m3uzz/oniontool
44+
*/
45+
46+
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
47+
defined('PS') || define('PS', PATH_SEPARATOR);
48+
defined('EOF') || define('EOF', chr(13).chr(10));
49+
defined('BASE_DIR') || define('BASE_DIR', realpath(dirname(dirname(dirname(dirname(__DIR__))))));
50+
defined('VENDOR_DIR') || define('VENDOR_DIR', BASE_DIR . DS . 'vendor');
51+
defined('CLIENT_DIR') || define('CLIENT_DIR', BASE_DIR . DS . 'client');
52+
defined('MODULE_DIR') || define('MODULE_DIR', VENDOR_DIR . DS . 'm3uzz');
53+
defined('CONFIG_DIR') || define('CONFIG_DIR', MODULE_DIR . DS . 'oniontool' . DS . 'src' . DS . 'OnionTool' . DS . 'config');
54+
55+
$_SERVER['argv'][] = "--m=onionTool";
56+
$_SERVER['argv'][] = "--c=cms";
57+
58+
include VENDOR_DIR . DS . 'm3uzz' . DS . 'onionsrv' . DS . 'onionInit.php';

bin/oniontool.php

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env php
2+
<?php
3+
/**
4+
* This file is part of Onion Tool
5+
*
6+
* Copyright (c) 2014-2016, Humberto Lourenço <betto@m3uzz.com>.
7+
* All rights reserved.
8+
*
9+
* Redistribution and use in source and binary forms, with or without
10+
* modification, are permitted provided that the following conditions
11+
* are met:
12+
*
13+
* * Redistributions of source code must retain the above copyright
14+
* notice, this list of conditions and the following disclaimer.
15+
*
16+
* * Redistributions in binary form must reproduce the above copyright
17+
* notice, this list of conditions and the following disclaimer in
18+
* the documentation and/or other materials provided with the
19+
* distribution.
20+
*
21+
* * Neither the name of Humberto Lourenço nor the names of his
22+
* contributors may be used to endorse or promote products derived
23+
* from this software without specific prior written permission.
24+
*
25+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36+
* POSSIBILITY OF SUCH DAMAGE.
37+
*
38+
* @category PHP
39+
* @package OnionTool
40+
* @author Humberto Lourenço <betto@m3uzz.com>
41+
* @copyright 2014-2016 Humberto Lourenço <betto@m3uzz.com>
42+
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
43+
* @link http://github.com/m3uzz/oniontool
44+
*/
45+
46+
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
47+
defined('PS') || define('PS', PATH_SEPARATOR);
48+
defined('EOF') || define('EOF', chr(13).chr(10));
49+
defined('BASE_DIR') || define('BASE_DIR', realpath(dirname(dirname(dirname(dirname(__DIR__))))));
50+
defined('VENDOR_DIR') || define('VENDOR_DIR', BASE_DIR . DS . 'vendor');
51+
defined('CLIENT_DIR') || define('CLIENT_DIR', BASE_DIR . DS . 'client');
52+
defined('MODULE_DIR') || define('MODULE_DIR', VENDOR_DIR . DS . 'm3uzz');
53+
defined('CONFIG_DIR') || define('CONFIG_DIR', MODULE_DIR . DS . 'oniontool' . DS . 'src' . DS . 'OnionTool' . DS . 'config');
54+
55+
$_SERVER['argv'][] = "--m=onionTool";
56+
57+
include VENDOR_DIR . DS . 'm3uzz' . DS . 'onionsrv' . DS . 'onionInit.php';

bin/srvtool.php

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env php
2+
<?php
3+
/**
4+
* This file is part of Onion Tool
5+
*
6+
* Copyright (c) 2014-2016, Humberto Lourenço <betto@m3uzz.com>.
7+
* All rights reserved.
8+
*
9+
* Redistribution and use in source and binary forms, with or without
10+
* modification, are permitted provided that the following conditions
11+
* are met:
12+
*
13+
* * Redistributions of source code must retain the above copyright
14+
* notice, this list of conditions and the following disclaimer.
15+
*
16+
* * Redistributions in binary form must reproduce the above copyright
17+
* notice, this list of conditions and the following disclaimer in
18+
* the documentation and/or other materials provided with the
19+
* distribution.
20+
*
21+
* * Neither the name of Humberto Lourenço nor the names of his
22+
* contributors may be used to endorse or promote products derived
23+
* from this software without specific prior written permission.
24+
*
25+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36+
* POSSIBILITY OF SUCH DAMAGE.
37+
*
38+
* @category PHP
39+
* @package OnionTool
40+
* @author Humberto Lourenço <betto@m3uzz.com>
41+
* @copyright 2014-2016 Humberto Lourenço <betto@m3uzz.com>
42+
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
43+
* @link http://github.com/m3uzz/oniontool
44+
*/
45+
46+
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
47+
defined('PS') || define('PS', PATH_SEPARATOR);
48+
defined('EOF') || define('EOF', chr(13).chr(10));
49+
defined('BASE_DIR') || define('BASE_DIR', realpath(dirname(dirname(dirname(dirname(__DIR__))))));
50+
defined('VENDOR_DIR') || define('VENDOR_DIR', BASE_DIR . DS . 'vendor');
51+
defined('CLIENT_DIR') || define('CLIENT_DIR', BASE_DIR . DS . 'client');
52+
defined('MODULE_DIR') || define('MODULE_DIR', VENDOR_DIR . DS . 'm3uzz');
53+
defined('CONFIG_DIR') || define('CONFIG_DIR', MODULE_DIR . DS . 'oniontool' . DS . 'src' . DS . 'OnionTool' . DS . 'config');
54+
55+
$_SERVER['argv'][] = "--m=onionTool";
56+
$_SERVER['argv'][] = "--c=srv";
57+
58+
include VENDOR_DIR . DS . 'm3uzz' . DS . 'onionsrv' . DS . 'onionInit.php';

composer.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "m3uzz/oniontool",
3+
"description": "Onion Tool",
4+
"homepage": "http://onion.m3uzz.com/",
5+
"license": "BSD-3-Clause",
6+
"authors": [
7+
{
8+
"name": "Humberto S Lourenco",
9+
"email": "betto@m3uzz.com"
10+
}
11+
],
12+
"keywords": [
13+
"m3uzz",
14+
"onion",
15+
"onionsrv",
16+
"service",
17+
"framework",
18+
"lite"
19+
],
20+
"type": "library",
21+
"repositories": [
22+
{
23+
"type": "library",
24+
"library": {
25+
"name": "m3uzz/oniontool",
26+
"version": "master",
27+
"dist": {
28+
"url": "https://github.com/m3uzz/oniontool/archive/master.zip",
29+
"type": "zip"
30+
},
31+
"source": {
32+
"url": "https://github.com/m3uzz/oniontool.git",
33+
"type": "git",
34+
"reference": "master"
35+
}
36+
}
37+
}
38+
],
39+
"require": {
40+
"php": ">=5.4",
41+
"m3uzz/onionsrv": "master"
42+
},
43+
"autoload": {
44+
"psr-0": {
45+
"OnionTool\\": "src/"
46+
}
47+
}
48+
}

src/OnionTool/config/help.php

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?php
2+
/**
3+
* This file is part of Onion Tool
4+
*
5+
* Copyright (c) 2014-2016, Humberto Lourenço <betto@m3uzz.com>.
6+
* All rights reserved.
7+
*
8+
* Redistribution and use in source and binary forms, with or without
9+
* modification, are permitted provided that the following conditions
10+
* are met:
11+
*
12+
* * Redistributions of source code must retain the above copyright
13+
* notice, this list of conditions and the following disclaimer.
14+
*
15+
* * Redistributions in binary form must reproduce the above copyright
16+
* notice, this list of conditions and the following disclaimer in
17+
* the documentation and/or other materials provided with the
18+
* distribution.
19+
*
20+
* * Neither the name of Humberto Lourenço nor the names of his
21+
* contributors may be used to endorse or promote products derived
22+
* from this software without specific prior written permission.
23+
*
24+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35+
* POSSIBILITY OF SUCH DAMAGE.
36+
*
37+
* @category PHP
38+
* @package OnionTool
39+
* @author Humberto Lourenço <betto@m3uzz.com>
40+
* @copyright 2014-2016 Humberto Lourenço <betto@m3uzz.com>
41+
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
42+
* @link http://github.com/m3uzz/oniontool
43+
*/
44+
45+
return array(
46+
"onionTool" => array(
47+
"srv" => array(
48+
"newClient" => array(
49+
"desc" => "Create a new client structure folder",
50+
"params" => array(
51+
"client" => "Client folder name, eg.: onionapp.com [required]",
52+
"module" => "Module name, eg.: OnionApp [optional]",
53+
"name" => "Author name [optional]",
54+
"email" => "Author e-mail [optional]",
55+
"link" => "Project link or repository [optional]",
56+
"cinit" => "Copyrigth year [optional]",
57+
),
58+
),
59+
"newModule" => array(
60+
"desc" => "Create a new module for a existent client",
61+
"params" => array(
62+
"client" => "Client folder name, eg.: onionapp.com [required]",
63+
"module" => "Module name, eg.: OnionApp [required]",
64+
"name" => "Author name [optional]",
65+
"email" => "Author e-mail [optional]",
66+
"link" => "Project link or repository [optional]",
67+
"cinit" => "Copyrigth year [optional]",
68+
),
69+
),
70+
),
71+
"cms" => array(
72+
"newClient" => array(
73+
"desc" => "Create a new client structure folder",
74+
"params" => array(
75+
"client" => "Client folder name, eg.: onionapp.com [required]",
76+
"module" => "Module name, eg.: OnionApp [optional]",
77+
"name" => "Author name [optional]",
78+
"email" => "Author e-mail [optional]",
79+
"link" => "Project link or repository [optional]",
80+
"cinit" => "Copyrigth year [optional]",
81+
),
82+
),
83+
"newModule" => array(
84+
"desc" => "Create a new module for a existent client",
85+
"params" => array(
86+
"client" => "Client folder name, eg.: onionapp.com [required]",
87+
"module" => "Module name, eg.: OnionApp [required]",
88+
"name" => "Author name [optional]",
89+
"email" => "Author e-mail [optional]",
90+
"link" => "Project link or repository [optional]",
91+
"cinit" => "Copyrigth year [optional]",
92+
),
93+
),
94+
),
95+
),
96+
);

0 commit comments

Comments
 (0)