Skip to content

s/files_external_script/workflow_script/g #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline:
syntax-php7.0:
image: nextcloudci/php7.0:php7.0-19
environment:
- APP_NAME=files_external_script
- APP_NAME=workflow_script
- CORE_BRANCH=master
- DB=sqlite
commands:
Expand All @@ -23,7 +23,7 @@ pipeline:
signed-off-check:
image: nextcloudci/php7.0:php7.0-19
environment:
- APP_NAME=files_external_script
- APP_NAME=workflow_script
- CORE_BRANCH=master
- DB=sqlite
commands:
Expand Down
8 changes: 4 additions & 4 deletions .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

### Short version

* The [**issue template can be found here**](https://raw.github.com/nextcloud/files_external_script/master/.github/issue_template.md) but be aware of the different repositories! See list below. Please always use the issue template when reporting issues.
* The [**issue template can be found here**](https://raw.github.com/nextcloud/workflow_script/master/.github/issue_template.md) but be aware of the different repositories! See list below. Please always use the issue template when reporting issues.

### Guidelines
* Please search the existing issues first, it's likely that your issue was already reported or even fixed.
- Go to one of the repositories, click "issues" and type any word in the top search/command bar.
- You can also filter by appending e. g. "state:open" to the search string.
- More info on [search syntax within github](https://help.github.com/articles/searching-issues)
* Report the issue using our [template](https://raw.github.com/nextcloud/files_external_script/master/.github/issue_template.md), it includes all the informations we need to track down the issue.
* Report the issue using our [template](https://raw.github.com/nextcloud/workflow_script/master/.github/issue_template.md), it includes all the informations we need to track down the issue.

If your issue appears to be a bug, and hasn't been reported, open a new issue.

Expand All @@ -18,7 +18,7 @@ Help us to maximize the effort we can spend fixing issues and adding new feature

## Contributing to Source Code

Thanks for wanting to contribute source code to the Files External Script app. That's great!
Thanks for wanting to contribute source code to the Workflow Script app. That's great!

## Translations
Please submit translations via [Transifex](https://www.transifex.com/nextcloud/nextcloud/files_external_script/).
Please submit translations via [Transifex](https://www.transifex.com/nextcloud/nextcloud/workflow_script/).
4 changes: 2 additions & 2 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Tell us what should happen
### Actual behaviour
Tell us what happens instead

## Files External Script app
## Workflow Script app

**Files External Script app version:** (see apps admin page: `/index.php/settings/apps`)
**Workflow Script app version:** (see apps admin page: `/index.php/settings/apps`)

## Server configuration
<!--
Expand Down
6 changes: 3 additions & 3 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
host = https://www.transifex.com
lang_map = bg_BG: bg, cs_CZ: cs, fi_FI: fi, hu_HU: hu, nb_NO: nb, sk_SK: sk, th_TH: th, ja_JP: ja

[nextcloud.files_external_script]
file_filter = translationfiles/<lang>/files_external_script.po
source_file = translationfiles/templates/files_external_script.pot
[nextcloud.workflow_script]
file_filter = translationfiles/<lang>/workflow_script.po
source_file = translationfiles/templates/workflow_script.pot
source_lang = en
type = PO
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Nextcloud Files External Script app
# Nextcloud Workflow Script app

This app enables Nextcloud to pass on files to external scripts when they were created or changed. By utilizing the workflow engine it allows Nextcloud administrators to define rules upon which matching files are enqueued to be run against a specified script. Eventually, the command is executed in a background job.

Expand Down
2 changes: 1 addition & 1 deletion appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
*
*/

$app = new \OCA\FilesExternalScript\AppInfo\Application();
$app = new \OCA\WorkflowScript\AppInfo\Application();
$app->registerHooksAndListeners();
20 changes: 10 additions & 10 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>files_external_script</id>
<name>Files against External Scripts</name>
<id>workflow_script</id>
<name>Workflow external scripts</name>
<summary>Rule based processing of files through specified external scripts</summary>
<description>Pass files on to external scripts depending on a defined set of rules.</description>
<version>1.0.0</version>
<licence>agpl</licence>
<author mail="blizzz@arthur-schiwon.de">Arthur Schiwon</author>
<namespace>FilesExternalScript</namespace>
<namespace>WorkflowScript</namespace>
<category>files</category>
<category>tools</category>
<category>organization</category>
<website>https://github.com/nextcloud/files_external_script</website>
<bugs>https://github.com/nextcloud/files_external_script/issues</bugs>
<repository type="git">https://github.com/nextcloud/files_external_script.git</repository>
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/files_external_script/master/screenshots/settings.png">https://raw.githubusercontent.com/nextcloud/files_external_script/master/screenshots/settings-small.png</screenshot>
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/files_external_script/master/screenshots/example_rule-small.png">https://raw.githubusercontent.com/nextcloud/files_external_script/master/screenshots/example_rule.png</screenshot>
<website>https://github.com/nextcloud/workflow_script</website>
<bugs>https://github.com/nextcloud/workflow_script/issues</bugs>
<repository type="git">https://github.com/nextcloud/workflow_script.git</repository>
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/settings.png">https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/settings-small.png</screenshot>
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/example_rule-small.png">https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/example_rule.png</screenshot>
<dependencies>
<nextcloud min-version="15" max-version="15" />
</dependencies>
<settings>
<admin>OCA\FilesExternalScript\Settings\Admin</admin>
<admin-section>OCA\FilesExternalScript\Settings\Section</admin-section>
<admin>OCA\WorkflowScript\Settings\Admin</admin>
<admin-section>OCA\WorkflowScript\Settings\Section</admin-section>
</settings>
</info>
36 changes: 18 additions & 18 deletions js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,61 +19,61 @@
*/

(function() {
OCA.FilesExternalScript = OCA.FilesExternalScript || {};
OCA.WorkflowScript = OCA.WorkflowScript || {};

/**
* @class OCA.FilesExternalScript.Operation
* @class OCA.WorkflowScript.Operation
*/
OCA.FilesExternalScript.Operation =
OCA.WorkflowScript.Operation =
OCA.WorkflowEngine.Operation.extend({
defaults: {
'class': 'OCA\\FilesExternalScript\\Operation',
'class': 'OCA\\WorkflowScript\\Operation',
'name': '',
'checks': [],
'operation': ''
}
});

/**
* @class OCA.FilesExternalScript.OperationsCollection
* @class OCA.WorkflowScript.OperationsCollection
*
* collection for all configured operations
*/
OCA.FilesExternalScript.OperationsCollection =
OCA.WorkflowScript.OperationsCollection =
OCA.WorkflowEngine.OperationsCollection.extend({
model: OCA.FilesExternalScript.Operation
model: OCA.WorkflowScript.Operation
});

/**
* @class OCA.FilesExternalScript.OperationView
* @class OCA.WorkflowScript.OperationView
*
* this creates the view for a single operation
*/
OCA.FilesExternalScript.OperationView =
OCA.WorkflowScript.OperationView =
OCA.WorkflowEngine.OperationView.extend({
model: OCA.FilesExternalScript.Operation,
model: OCA.WorkflowScript.Operation,
render: function() {
var $el = OCA.WorkflowEngine.OperationView.prototype.render.apply(this);
$el.find('input.operation-operation')
.css('width', '400px')
.attr("placeholder", t('files_external_script', 'command to execute'))
.attr("placeholder", t('workflow_script', 'command to execute'))
}
});

/**
* @class OCA.FilesExternalScript.OperationsView
* @class OCA.WorkflowScript.OperationsView
*
* this creates the view for configured operations
*/
OCA.FilesExternalScript.OperationsView =
OCA.WorkflowScript.OperationsView =
OCA.WorkflowEngine.OperationsView.extend({
initialize: function() {
OCA.WorkflowEngine.OperationsView.prototype.initialize.apply(this, [
'OCA\\FilesExternalScript\\Operation'
'OCA\\WorkflowScript\\Operation'
]);
},
renderOperation: function(operation) {
var subView = new OCA.FilesExternalScript.OperationView({
var subView = new OCA.WorkflowScript.OperationView({
model: operation
});

Expand All @@ -88,9 +88,9 @@
$(document).ready(function() {
OC.SystemTags.collection.fetch({
success: function() {
new OCA.FilesExternalScript.OperationsView({
el: '#files_external_script .rules',
collection: new OCA.FilesExternalScript.OperationsCollection()
new OCA.WorkflowScript.OperationsView({
el: '#workflow_script .rules',
collection: new OCA.WorkflowScript.OperationsCollection()
});
}
});
Expand Down
8 changes: 4 additions & 4 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
*
*/

namespace OCA\FilesExternalScript\AppInfo;
namespace OCA\WorkflowScript\AppInfo;

use OCA\FilesExternalScript\Operation;
use OCA\WorkflowScript\Operation;
use OCP\AppFramework\QueryException;
use OCP\Files\Folder;
use OCP\Files\Node;
Expand All @@ -35,7 +35,7 @@ class Application extends \OCP\AppFramework\App {
* Application constructor.
*/
public function __construct() {
parent::__construct('files_external_script');
parent::__construct('workflow_script');
}

protected function handleEvent(Node $node, string $eventName, array $extra = []) {
Expand All @@ -51,7 +51,7 @@ protected function handleEvent(Node $node, string $eventName, array $extra = [])
$operation->considerScript($node, $eventName, $extra);
} catch (QueryException $e) {
$logger = $this->getContainer()->getServer()->getLogger();
$logger->logException($e, ['app' => 'files_external_script', 'level' => ILogger::ERROR]);
$logger->logException($e, ['app' => 'workflow_script', 'level' => ILogger::ERROR]);
}
}

Expand Down
6 changes: 3 additions & 3 deletions lib/BackgroundJobs/Launcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
*/

namespace OCA\FilesExternalScript\BackgroundJobs;
namespace OCA\WorkflowScript\BackgroundJobs;

use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
Expand Down Expand Up @@ -60,7 +60,7 @@ protected function run($argument) {
$view = new \OC\Files\View(dirname($path));
$tmpFile = $view->toTmpFile(basename($path));
} catch (\Exception $e) {
$this->logger->logException($e, ['level' => ILogger::WARN, 'app' => 'files_external_script']);
$this->logger->logException($e, ['level' => ILogger::WARN, 'app' => 'workflow_script']);
return;
}
$command = str_replace('%f', escapeshellarg($tmpFile), $command);
Expand All @@ -71,7 +71,7 @@ protected function run($argument) {
$wrapper = 'sh -c ' . escapeshellarg($command) . ' >/dev/null &';
$this->logger->info(
'executing {script}',
['app' => 'files_external_script', 'script' => $wrapper]
['app' => 'workflow_script', 'script' => $wrapper]
);
shell_exec($wrapper);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
*
*/

namespace OCA\FilesExternalScript;
namespace OCA\WorkflowScript;

use OC\Files\Node\File;
use OC\Files\Node\Folder;
use OCA\FilesExternalScript\BackgroundJobs\Launcher;
use OCA\WorkflowScript\BackgroundJobs\Launcher;
use OCP\BackgroundJob\IJobList;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
Expand Down
6 changes: 3 additions & 3 deletions lib/Settings/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
*
*/

namespace OCA\FilesExternalScript\Settings;
namespace OCA\WorkflowScript\Settings;

use OCA\FilesExternalScript\AppInfo\Application;
use OCA\WorkflowScript\AppInfo\Application;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IL10N;
use OCP\Settings\ISettings;
Expand Down Expand Up @@ -68,7 +68,7 @@ public function getForm() {
* @return string the section ID, e.g. 'sharing'
*/
public function getSection() {
return 'files_external_script';
return 'workflow_script';
}

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/Settings/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
*/

namespace OCA\FilesExternalScript\Settings;
namespace OCA\WorkflowScript\Settings;

use OCP\IL10N;
use OCP\IURLGenerator;
Expand All @@ -45,7 +45,7 @@ public function __construct(IL10N $l, IURLGenerator $url) {
* @returns string
*/
public function getID() {
return 'files_external_script';
return 'workflow_script';
}

/**
Expand Down Expand Up @@ -73,6 +73,6 @@ public function getPriority() {
* {@inheritdoc}
*/
public function getIcon() {
return $this->url->imagePath('files_external_script', 'app-dark.svg');
return $this->url->imagePath('workflow_script', 'app-dark.svg');
}
}