Skip to content

Commit 9b9cfb7

Browse files
committed
Initial commit
0 parents  commit 9b9cfb7

File tree

9 files changed

+653
-0
lines changed

9 files changed

+653
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dialogflow-merged/
2+
vendor/

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Jaco van den Bosch
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Dialogflow Agent Merger
2+
3+
This command helps you merge two dialogflow agents together. If you have multiple agents you are working one and you are actively training on one of them, it can be hard to get the trained agent into the development agent. With this command you can keep your training that you did on the production version, but also keep the new/modified intents that you were working on.
4+
5+
## Usage
6+
7+
```
8+
dfmerger merge <path-to-production-zip> <path-to-development-zip>
9+
```
10+
11+
This will create a new zip in your directory called `dialogflow-merged`

composer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "Rosterbuster/dialogflow-conversion",
3+
"description": "Merge a production (with training) and development agent (with older training/no training) together",
4+
"keywords": ["Dialogflow", "Merge", "Agents"],
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Jaco van den Bosch",
9+
"email": "[email protected]"
10+
}
11+
],
12+
"require": {
13+
"ext-zip": "*",
14+
"symfony/console": "~3.0|~4.0"
15+
},
16+
"autoload": {
17+
"psr-4": {
18+
"Rosterbuster\\Dialogflow\\": "src/"
19+
}
20+
},
21+
"bin": [
22+
"dfmerger"
23+
]
24+
}

composer.lock

Lines changed: 249 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dfmerger

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use Rosterbuster\Dialogflow\MergeCommand;
5+
use Symfony\Component\Console\Application;
6+
7+
if (file_exists(__DIR__.'/../../autoload.php')) {
8+
require __DIR__ . '/../../autoload.php';
9+
} else {
10+
require __DIR__ . '/vendor/autoload.php';
11+
}
12+
13+
$app = new Application();
14+
15+
$app->add(new MergeCommand());
16+
17+
$app->run();

0 commit comments

Comments
 (0)