From 6ecb6ed8768cc663ac7e2681e1e64e695f2b6235 Mon Sep 17 00:00:00 2001 From: mrbn Date: Fri, 27 Jan 2017 16:36:21 +0100 Subject: [PATCH] add wodotexteditor --- wodotexteditor/__init__.py | 0 wodotexteditor/backup.py | 21 ++++++++++ .../genesis/app/templates/wodotexteditor.hbs | 0 wodotexteditor/genesis/index.js | 3 ++ wodotexteditor/genesis/package.json | 6 +++ wodotexteditor/manifest.json | 31 +++++++++++++++ wodotexteditor/website.py | 39 +++++++++++++++++++ 7 files changed, 100 insertions(+) create mode 100644 wodotexteditor/__init__.py create mode 100644 wodotexteditor/backup.py create mode 100644 wodotexteditor/genesis/app/templates/wodotexteditor.hbs create mode 100644 wodotexteditor/genesis/index.js create mode 100644 wodotexteditor/genesis/package.json create mode 100644 wodotexteditor/manifest.json create mode 100644 wodotexteditor/website.py diff --git a/wodotexteditor/__init__.py b/wodotexteditor/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/wodotexteditor/backup.py b/wodotexteditor/backup.py new file mode 100644 index 0000000..2552088 --- /dev/null +++ b/wodotexteditor/backup.py @@ -0,0 +1,21 @@ +from arkos.backup import BackupController + + +class WodoTextEditorBackup(BackupController): + def get_config(self, site): + return [] + + def get_data(self, site): + return [] + + def pre_backup(self, site): + pass + + def post_backup(self, site): + pass + + def pre_restore(self): + pass + + def post_restore(self, site, dbpasswd): + pass diff --git a/wodotexteditor/genesis/app/templates/wodotexteditor.hbs b/wodotexteditor/genesis/app/templates/wodotexteditor.hbs new file mode 100644 index 0000000..e69de29 diff --git a/wodotexteditor/genesis/index.js b/wodotexteditor/genesis/index.js new file mode 100644 index 0000000..c047939 --- /dev/null +++ b/wodotexteditor/genesis/index.js @@ -0,0 +1,3 @@ +module.exports = { + name: 'wodotexteditor' +}; diff --git a/wodotexteditor/genesis/package.json b/wodotexteditor/genesis/package.json new file mode 100644 index 0000000..26125b1 --- /dev/null +++ b/wodotexteditor/genesis/package.json @@ -0,0 +1,6 @@ +{ + "name": "wodotexteditor", + "keywords": [ + "ember-addon" + ] +} diff --git a/wodotexteditor/manifest.json b/wodotexteditor/manifest.json new file mode 100644 index 0000000..9967e15 --- /dev/null +++ b/wodotexteditor/manifest.json @@ -0,0 +1,31 @@ +{ + "id": "wodotexteditor", + "name": "Wodo.TextEditor", + "type": "website", + "icon": "fa fa-pencil-square-o", + "description": { + "short": "Wodo.TextEditor: OpenDocument Text Documents Editor.", + "long": "Wodo.TextEditor is an HTML5 Editor component for text documents in the OpenDocument format (ODT)." + }, + "categories": [ + { + "primary": "Websites", + "secondary": ["Collaboration", "Writing"] + } + ], + "version": "0.5.9-1", + "author": "matrob", + "homepage": "https://github.com/matrob/", + "app_author": "KO GmbH", + "app_homepage": "http://www.webodf.org/", + "logo": false, + "screenshots": [], + "services": [], + "modules": ["website", "backup"], + "dependencies": [], + "generation": 1, + "website_updates": false, + "download_url": "https://github.com/kogmbh/Wodo.TextEditor_release/archive/v0.5.9.tar.gz", + "database_engines": [], + "uses_php": false +} diff --git a/wodotexteditor/website.py b/wodotexteditor/website.py new file mode 100644 index 0000000..56dcfce --- /dev/null +++ b/wodotexteditor/website.py @@ -0,0 +1,39 @@ +import nginx +import os + +from arkos.system import users, groups +from arkos.websites import Site + + +class WodoTextEditor(Site): + addtoblock = [] + + def pre_install(self, vars): + pass + + def post_install(self, vars, dbpasswd=""): + # Rename Wodo.TextEditor localeditor.html to index.html to make it work with our default nginx config + os.rename(os.path.join(self.path, "localeditor.html"), os.path.join(self.path, "index.html")) + + # Give access to httpd + uid, gid = users.get_system("http").uid, groups.get_system("http").gid + for r, d, f in os.walk(self.path): + for x in d: + os.chown(os.path.join(r, x), uid, gid) + for x in f: + os.chown(os.path.join(r, x), uid, gid) + + def pre_remove(self): + pass + + def post_remove(self): + pass + + def enable_ssl(self, cfile, kfile): + pass + + def disable_ssl(self): + pass + + def update(self, pkg, ver): + pass