diff --git a/.gitignore b/.gitignore index 223f674..fbdb91b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -source/script/* -build/* -api/* -.*.swp +# .gitignore template for skeleton-based apps +/compiled +/contrib diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 1429e85..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,38 +0,0 @@ -// requires -var util = require('util'); -var qx = require("../qooxdoo/tool/grunt"); - -// grunt -module.exports = function(grunt) { - var config = { - - generator_config: { - let: { - } - }, - - common: { - "APPLICATION" : "qxfileio", - "QOOXDOO_PATH" : "../qooxdoo", - "LOCALES": ["en"], - "QXTHEME": "qxfileio.theme.Theme" - } - - /* - myTask: { - options: {}, - myTarget: { - options: {} - } - } - */ - }; - - var mergedConf = qx.config.mergeConfig(config); - // console.log(util.inspect(mergedConf, false, null)); - grunt.initConfig(mergedConf); - - qx.task.registerTasks(grunt); - - // grunt.loadNpmTasks('grunt-my-plugin'); -}; diff --git a/Manifest.json b/Manifest.json index 3d1c901..ebc066b 100644 --- a/Manifest.json +++ b/Manifest.json @@ -1,27 +1,32 @@ { - "info" : + "info" : { "name" : "qxfileio", "summary" : "Utilitary class to read and write file client side", "description" : "This application contains classes that allow reading and writing files to user file system using the W3C File API.", - - "homepage" : "http://some.homepage.url/", + + "homepage" : "https://github.com/sgaillard/qxfileio", "license" : "CeCILL", - "authors" : + "authors" : [ { "name" : "Sylvain Gaillard (sgaillard)", - "email" : "sylvain.gaillard@angers.inra.fr" + "email" : "sylvain.gaillard@inra.fr" } ], - "version" : "master", - "qooxdoo-versions": ["5.0"] + "version" : "0.1.0", + "qooxdoo-versions": ["5.0.2", "6.0.0-alpha"] }, - "provides" : + "requires" : { + "qooxdoo-sdk": "^6.0.0-alpha", + "qooxdoo-compiler": "^0.3.0-alpha" + }, + + "provides" : { "namespace" : "qxfileio", "encoding" : "utf-8", @@ -31,4 +36,3 @@ "type" : "application" } } - diff --git a/compile.json b/compile.json new file mode 100644 index 0000000..22f9ebd --- /dev/null +++ b/compile.json @@ -0,0 +1,25 @@ +{ + "targets": [ + { + "type": "source", + "outputPath": "compiled/source", + "bundle": { + "include": "qx.*" + } + }, + { + "type": "build", + "outputPath": "compiled/build" + } + ], + "defaultTarget": "source", + "locales": ["en"], + + "applications": [ + { + "class": "qxfileio.demo.Application", + "theme": "qxfileio.theme.Theme", + "name": "qxfileio" + } + ] +} diff --git a/config.json b/config.json deleted file mode 100644 index f329c0d..0000000 --- a/config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name" : "qxfileio", - - "include" : - [ - { - "path" : "${QOOXDOO_PATH}/tool/data/config/application.json" - } - ], - - "export" : - [ - "api", - "api-data", - "build", - "clean", - "distclean", - "dependencies", - "fix", - "info", - "lint", - "migration", - "pretty", - "profiling", - "source", - "source-all", - "source-hybrid", - "source-server", - "source-server-reload", - "source-httpd-config", - "test", - "test-source", - "translation", - "validate-config", - "validate-manifest", - "watch" - ], - - "default-job" : "source-hybrid", - - "let" : - { - "APPLICATION" : "qxfileio", - "QOOXDOO_PATH" : "../qooxdoo", - "QXTHEME" : "qxfileio.theme.Theme", - "API_EXCLUDE" : ["qx.test.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*"], - "LOCALES" : [ "en" ], - "CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache", - "ROOT" : "." - }, - - // You only need to edit the remainder of this file, if you want to customize - // specific jobs, or add own job definitions. - - "jobs" : - { - // Uncomment the following entry to add a contrib or library to your - // project; make sure to adapt the path to the Manifest.json; if you are - // using a contrib: library, it will be downloaded into the path specified - // by the 'cache/downloads' config key - /* - "libraries" : - { - "library" : - [ - { - "manifest" : "contrib://SkeletonApplication/trunk/Manifest.json" - } - ] - } - */ - - // If you want to tweak a job setting, see the following sample where - // the "format" feature of the "build-script" job is overridden. - // To see a list of available jobs, invoke 'generate.py x'. - /* - ,"build-script" : - { - "compile-options" : - { - "code" : - { - "format" : false - } - } - } - */ - } -} diff --git a/generate.py b/generate.py deleted file mode 100755 index bfb2c90..0000000 --- a/generate.py +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -################################################################################ -# -# qooxdoo - the new era of web development -# -# http://qooxdoo.org -# -# Copyright: -# 2008 - 2012 1&1 Internet AG, Germany, http://www.1und1.de -# -# License: -# LGPL: http://www.gnu.org/licenses/lgpl.html -# EPL: http://www.eclipse.org/org/documents/epl-v10.php -# See the LICENSE file in the project's top-level directory for details. -# -# Authors: -# * Thomas Herchenroeder (thron7) -# -################################################################################ - -## -# This is a stub proxy for the real generator.py -## - -import sys, os, re, subprocess, codecs, optparse - -CMD_PYTHON = sys.executable -QOOXDOO_PATH = '../qooxdoo' -QX_PYLIB = "tool/pylib" - -## -# A derived OptionParser class that ignores unknown options (The parent -# class raises in those cases, and stops further processing). -# We need this, as we are only interested in -c/--config on this level, and -# want to ignore pot. other options. -# -class IgnoringUnknownOptionParser(optparse.OptionParser): - ## - # is the raw argument list. The original _process_args mutates - # rargs, processing options into and copying interspersed args - # into . This overridden version ignores unknown or ambiguous - # options. - def _process_args(self, largs, rargs, values): - while rargs: - try: - optparse.OptionParser._process_args(self, largs, rargs, values) - except (optparse.BadOptionError, optparse.AmbiguousOptionError): - pass - - -def parseArgs(): - parser = IgnoringUnknownOptionParser(add_help_option=False) - parser.add_option( - "-c", "--config", dest="config", metavar="CFGFILE", - default="config.json", help="path to configuration file" - ) - parser.add_option( - "-v", "--verbose", dest="verbose", action="store_true", - default=False, help="run in verbose mode" - ) - (options, args) = parser.parse_args(sys.argv[1:]) - return options, args - -ShellOptions, ShellArgs = parseArgs() - - -# this is from misc.json, duplicated for decoupling -_eolComment = re.compile(r'(?-1: - argList1.append('"%s"' % arg) - else: - argList1.append(arg) - argList = argList1 -else: - argList = ['"%s"' % x for x in argList] # quote argv elements - -cmd = " ".join(argList) -try: - retval = subprocess.call(cmd, shell=True) -except: - retval = 3 -sys.exit(retval) diff --git a/package.json b/package.json deleted file mode 100644 index c3064da..0000000 --- a/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "qxfileio", - "version": "0.1.0", - "repository" : {}, - "devDependencies": { - "grunt": "~0.4.2", - "grunt-contrib-clean": "~0.5.0" - } -} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..7f1e84f --- /dev/null +++ b/readme.md @@ -0,0 +1,6 @@ +# qxfileio + +Utilitary class to read and write client side files + +This contrib contains classes that allow reading and writing files to user file +system using the W3C File API. diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 2b8b073..0000000 --- a/readme.txt +++ /dev/null @@ -1,11 +0,0 @@ -Desktop Skeleton - A qooxdoo Application Template -================================================== - -This is a qooxdoo application skeleton which is used as a template. The -'create-application.py' script (usually under tool/bin/create-application.py) -will use this and expand it into a self-contained qooxdoo application which -can then be further extended. Please refer to the script and other documentation -for further information. - -short:: is a standard qooxdoo GUI application -copy_file:: tool/data/generator/needs_generation.js source/script/custom.js diff --git a/source/class/qxfileio/__init__.js b/source/class/qxfileio/__init__.js index 098d58a..483722e 100644 --- a/source/class/qxfileio/__init__.js +++ b/source/class/qxfileio/__init__.js @@ -1,5 +1,6 @@ /**

qxfileio API Documentation

* - * Provides class to read and write files on the client file system. + * Replace this text with an appropriate overview and introduction to your + * contrib library. * */ diff --git a/source/class/qxfileio/Application.js b/source/class/qxfileio/demo/Application.js similarity index 79% rename from source/class/qxfileio/Application.js rename to source/class/qxfileio/demo/Application.js index 9d4d592..75a703f 100644 --- a/source/class/qxfileio/Application.js +++ b/source/class/qxfileio/demo/Application.js @@ -1,24 +1,20 @@ /* ************************************************************************ - Copyright: Institut de Recherche en Horticulture et Semences + Copyright: 2019 INRA License: CeCILL - Authors: Sylvain Gaillard + Authors: Sylvain Gaillard (sgaillard) sylvain.gaillard@inra.fr ************************************************************************ */ /** - * Demo application class of package "qxfileio" - * - * @asset(qxfileio/*) + * This is the main application class of "qxfileio" */ -qx.Class.define("qxfileio.Application", +qx.Class.define("qxfileio.demo.Application", { extend : qx.application.Standalone, - - /* ***************************************************************************** MEMBERS @@ -28,7 +24,7 @@ qx.Class.define("qxfileio.Application", members : { /** - * This method contains the initial application code and gets called + * This method contains the initial application code and gets called * during startup of the application */ main : function() @@ -46,20 +42,20 @@ qx.Class.define("qxfileio.Application", } /* - ------------------------------------------------------------------------- - Below is your actual application code... - ------------------------------------------------------------------------- - */ + ------------------------------------------------------------------------- + Below is your actual application code... + ------------------------------------------------------------------------- + */ // Document is the application root var doc = this.getRoot(); - // Create a field to put sequence data - var sequenceField = new qx.ui.form.TextArea(); - sequenceField.setWidth(400); - sequenceField.setHeight(300); - sequenceField.setNativeContextMenu(true); - doc.add(sequenceField, {left: 10, top: 10}); + // Create a field to put data + var textField = new qx.ui.form.TextArea(); + textField.setWidth(400); + textField.setHeight(300); + textField.setNativeContextMenu(true); + doc.add(textField, {left: 10, top: 10}); // Create a file chooser object var fileChooser = new qxfileio.FileChooser(); @@ -94,7 +90,7 @@ qx.Class.define("qxfileio.Application", fr.addListener("load", function(e) { this.debug('file load successfully'); - sequenceField.setValue(e.getData()); + textField.setValue(e.getData()); }, this); fr.addListener("loadend", function(e) { @@ -103,7 +99,7 @@ qx.Class.define("qxfileio.Application", }, this); fr.addListener("loadprogress", function(e) { - this.debug('progress: ' + Math.round(e.getLoaded() / e.getTotal() * 100) + '%'); + this.debug('progress: ' + Math.round(e.getLoaded() / e.getTotal() * 100) + '%'); }, this); fr.addListener("loaderror", function(e) { @@ -131,12 +127,12 @@ qx.Class.define("qxfileio.Application", }, this); // Create a button to save text field content to a file - var saveButton = new qx.ui.form.Button(this.tr("Save to...")); + var saveButton = new qx.ui.form.Button(this.tr("Save")); var fw = new qxfileio.FileWriter(); //fw.setType("application/octet-stream"); saveButton.addListener("execute", function() { this.debug("Click save! " + fw.getType()); - fw.saveTextAsFile(sequenceField.getValue(), "sequences.fa"); + fw.saveTextAsFile(textField.getValue(), "data.txt"); }, this); doc.add(saveButton, {left : 20, top : 360}); } diff --git a/source/class/qxfileio/test/DemoTest.js b/source/class/qxfileio/test/DemoTest.js index ebd621d..a259588 100644 --- a/source/class/qxfileio/test/DemoTest.js +++ b/source/class/qxfileio/test/DemoTest.js @@ -1,17 +1,17 @@ /* ************************************************************************ - Copyright: + Copyright: 2019 INRA - License: + License: CeCILL - Authors: + Authors: Sylvain Gaillard (sgaillard) sylvain.gaillard@inra.fr ************************************************************************ */ /** * This class demonstrates how to define unit tests for your application. * - * Execute generate.py test to generate a testrunner application + * Execute qx test to generate a testrunner application * and open it from test/index.html * * The methods that contain the tests are instance methods with a diff --git a/source/class/qxfileio/theme/Appearance.js b/source/class/qxfileio/theme/Appearance.js index ac1dbc3..afe9b15 100644 --- a/source/class/qxfileio/theme/Appearance.js +++ b/source/class/qxfileio/theme/Appearance.js @@ -1,16 +1,16 @@ /* ************************************************************************ - Copyright: + Copyright: 2019 INRA - License: + License: CeCILL - Authors: + Authors: Sylvain Gaillard (sgaillard) sylvain.gaillard@inra.fr ************************************************************************ */ qx.Theme.define("qxfileio.theme.Appearance", { - extend : qx.theme.modern.Appearance, + extend : qx.theme.indigo.Appearance, appearances : { diff --git a/source/class/qxfileio/theme/Color.js b/source/class/qxfileio/theme/Color.js index 8103a38..846c475 100644 --- a/source/class/qxfileio/theme/Color.js +++ b/source/class/qxfileio/theme/Color.js @@ -1,16 +1,16 @@ /* ************************************************************************ - Copyright: + Copyright: 2019 INRA - License: + License: CeCILL - Authors: + Authors: Sylvain Gaillard (sgaillard) sylvain.gaillard@inra.fr ************************************************************************ */ qx.Theme.define("qxfileio.theme.Color", { - extend : qx.theme.modern.Color, + extend : qx.theme.indigo.Color, colors : { diff --git a/source/class/qxfileio/theme/Decoration.js b/source/class/qxfileio/theme/Decoration.js index b99465b..c11be7f 100644 --- a/source/class/qxfileio/theme/Decoration.js +++ b/source/class/qxfileio/theme/Decoration.js @@ -1,16 +1,16 @@ /* ************************************************************************ - Copyright: + Copyright: 2019 INRA - License: + License: CeCILL - Authors: + Authors: Sylvain Gaillard (sgaillard) sylvain.gaillard@inra.fr ************************************************************************ */ qx.Theme.define("qxfileio.theme.Decoration", { - extend : qx.theme.modern.Decoration, + extend : qx.theme.indigo.Decoration, decorations : { diff --git a/source/class/qxfileio/theme/Font.js b/source/class/qxfileio/theme/Font.js index e538db9..8ad5fe3 100644 --- a/source/class/qxfileio/theme/Font.js +++ b/source/class/qxfileio/theme/Font.js @@ -1,16 +1,16 @@ /* ************************************************************************ - Copyright: + Copyright: 2019 INRA - License: + License: CeCILL - Authors: + Authors: Sylvain Gaillard (sgaillard) sylvain.gaillard@inra.fr ************************************************************************ */ qx.Theme.define("qxfileio.theme.Font", { - extend : qx.theme.modern.Font, + extend : qx.theme.indigo.Font, fonts : { diff --git a/source/class/qxfileio/theme/Theme.js b/source/class/qxfileio/theme/Theme.js index 53c9715..279b660 100644 --- a/source/class/qxfileio/theme/Theme.js +++ b/source/class/qxfileio/theme/Theme.js @@ -1,10 +1,10 @@ /* ************************************************************************ - Copyright: + Copyright: 2019 INRA - License: + License: CeCILL - Authors: + Authors: Sylvain Gaillard (sgaillard) sylvain.gaillard@inra.fr ************************************************************************ */ diff --git a/source/index.html b/source/index.html deleted file mode 100644 index 9785f3c..0000000 --- a/source/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - qxFileIO - - - - diff --git a/source/translation/readme.txt b/source/translation/readme.txt index 66975e6..fcd9282 100644 --- a/source/translation/readme.txt +++ b/source/translation/readme.txt @@ -1,3 +1 @@ -This directory will contain translation (.po) files once you run the -'translation' job in your project. - +This directory will contain translation (.po) files once you have compiled your application. \ No newline at end of file