{"id":15051407,"url":"https://github.com/nextcloud/workflow_script","last_synced_at":"2025-04-06T09:07:04.646Z","repository":{"id":42004084,"uuid":"155606902","full_name":"nextcloud/workflow_script","owner":"nextcloud","description":"Rule based processing of files through specified external scripts","archived":false,"fork":false,"pushed_at":"2025-02-13T23:18:50.000Z","size":857,"stargazers_count":75,"open_issues_count":27,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T08:09:10.329Z","etag":null,"topics":["nextcloud","nextcloud-app"],"latest_commit_sha":null,"homepage":"https://apps.nextcloud.com/apps/workflow_script","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextcloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-31T18:41:16.000Z","updated_at":"2025-03-24T17:02:00.000Z","dependencies_parsed_at":"2023-10-29T03:22:11.042Z","dependency_job_id":"bf4b83d3-f41c-485b-b926-9a10a3beaba4","html_url":"https://github.com/nextcloud/workflow_script","commit_stats":{"total_commits":176,"total_committers":18,"mean_commits":9.777777777777779,"dds":0.6534090909090908,"last_synced_commit":"6ed282b056e1db44c139b79bda94e46b71275d5f"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fworkflow_script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fworkflow_script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fworkflow_script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fworkflow_script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextcloud","download_url":"https://codeload.github.com/nextcloud/workflow_script/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457799,"owners_count":20941906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextcloud","nextcloud-app"],"created_at":"2024-09-24T21:34:34.837Z","updated_at":"2025-04-06T09:07:04.626Z","avatar_url":"https://github.com/nextcloud.png","language":"PHP","readme":"\u003c!--\n  - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n--\u003e\n# Nextcloud Workflow Script app\n\n[![REUSE status](https://api.reuse.software/badge/github.com/nextcloud/workflow_script)](https://api.reuse.software/info/github.com/nextcloud/workflow_script)\n\nThis 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. \n\nLearn more about workflows on https://nextcloud.com/workflow\n\n![The settings screen](./screenshots/flow-ui.png)\n\n## Placeholders\n\nAfter enabling this app, rules can be defined in the admin settings, \"External scripts\" section.\n\nWhen defining the script, you can specify one of the following placeholders that will be replaced with the appropriate value:\n\n| Placeholder | Description | example value\n--- | --- | ---\n%e | the event type | *\\OCP\\Files::postCreate*, *\\OCP\\Files::postWrite* or *\\OCP\\Files::postRename*\n%i | file id | *142430*\n%a | actor's user id | *bob*\n%o | owner's user id | *alice*\n%n | nextcloud-relative path | *alice/files/Pictures/Wonderland/20180717_192103.jpg*\n%f | locally available file | */tmp/oc_tmp_m6E6OO-.jpg*\n%x | old nextcloud-relative file path (only on *rename* and *copy*) | *alice/files/Workbench/20180717_192103.jpg*\n\nWhen no placeholder was specified, then the exact command as given is being executed.\n\n### Hints\n\nEvents for files and folders are triggered by file system operations. An operation like\n\\OCP\\Files::postCopy is read, create and write a file. \n\n| Action | Events |\n| --- | --- |\n| Copy file | \\OCP\\Files::postCopy\u003cbr /\u003e\\OCP\\Files::postCreate\u003cbr /\u003e\\OCP\\Files::postWrite\n| Create file | \\OCP\\Files::postTouch\u003cbr /\u003e\\OCP\\Files::postCreate\u003cbr /\u003e \\OCP\\Files::postWrite\n| Delete file | \\OCP\\Files::postDelete\n| Move file | \\OCP\\Files::postRename\n| Rename file | \\OCP\\Files::postRename\n| Update file | \\OCP\\Files::postWrite\n\n### Example\n\nAll plain text files should be passed to a tool that collects statistics of the writing style of a document and writes them back to a specified mount on the host, in a subfolder that matches the actor's ID, and filename consisting of the basename plus \".style\" appended:\n\n![pass a file to style and write back the results](./screenshots/flow_ui.png)  \n\n```\nstyle -L de %f \u003e /Lektorat/%a/$(basename %n).style\n```\n\nAnd after the cron job was run, you'll find the results on the expected place: \n\n```\n$ cat /Lektorat/bob/Sanin\\ -\\ Artsybashev.txt.style\nreadability grades:\n        Kincaid: 10.2\n        ARI: 10.4\n        Coleman-Liau: 10.6\n        Flesch Index: 55.7/100\n        Fog Index: 12.5\n        Lix: 39.0 = school year 6\n        SMOG-Grading: 6.4\nsentence info:\n        684404 characters\n        143798 words, average length 4.76 characters = 1.56 syllables\n        7606 sentences, average length 18.9 words\n        47% (3591) short sentences (at most 14 words)\n        18% (1390) long sentences (at least 29 words)\n        1 paragraphs, average length 7606.0 sentences\n        4% (378) questions\n        24% (1849) passive sentences\n        longest sent 164 wds at sent 339; shortest sent 1 wds at sent 4\nword usage:\n        verb types:\n        to be (2154) auxiliary (1581) \n        types as % of total:\n        conjunctions 7% (10560) pronouns 9% (12733) prepositions 8% (10894)\n        nominalizations 1% (1638)\nsentence beginnings:\n        pronoun (1209) interrogative pronoun (306) article (795)\n        subordinating conjunction (275) conjunction (701) preposition (529)\n\n```\n## Limitations\n\nThis app does not work with either encryption method.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud%2Fworkflow_script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextcloud%2Fworkflow_script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud%2Fworkflow_script/lists"}