[KSS-checkins] r51984 - kukit/kss.base/trunk/src/kss/base

gotcha at codespeak.net gotcha at codespeak.net
Sat Mar 1 12:32:11 CET 2008


Author: gotcha
Date: Sat Mar  1 12:32:10 2008
New Revision: 51984

Modified:
   kukit/kss.base/trunk/src/kss/base/utils.txt
Log:
Some hopefully better wording.

Some suggestions to improve the usage; test is broken.


Modified: kukit/kss.base/trunk/src/kss/base/utils.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/utils.txt	(original)
+++ kukit/kss.base/trunk/src/kss/base/utils.txt	Sat Mar  1 12:32:10 2008
@@ -2,31 +2,32 @@
 Utilities
 =========
 
-KSS ships with various utilties. When you install `kss.base` these get
-installed as executables.
+KSS ships with various utilities. When you install `kss.base`, they get
+installed as executable scripts.
 
 
 Create a standalone package
 ===========================
 
-Since the whole KSS framework is pluggable the amount of Javascript
-that ends up being used depends a lot on the plugins. To make it easy
-to create static files from a know plugin configuration we have the
-`ksspackage`. This creates a directory with all the Javascripts needed
+Since the whole KSS framework is pluggable, the Javascript that ends up 
+being used depends a lot on the plugins. 
+
+The `ksspackage` makes it easy to create static files from a known plugin configuration.
+It creates a directory with all the Javascripts needed
 to run the set of plugins.
 
   >>> from pkg_resources import load_entry_point
   >>> ksspackage = load_entry_point(
   ...     'kss.base', 'console_scripts', 'ksspackage')
 
-We will first setup a temp directory to contain our stuff.
+Let us setup a temporary directory that will contain our stuff.
 
   >>> import os
   >>> from tempfile import mktemp
   >>> temp = mktemp()
   >>> static_dump = os.path.join(temp, 'static-dump')
 
-Executing the script without any arguments will raise an error.
+Executing the script without any arguments raises an error.
 
   >>> import sys
   >>> old_argv = sys.argv
@@ -36,24 +37,16 @@
   Usage: ksspackage OUTPUTDIR [OPTIONS]
   Try `ksspackage --help` for more information.
 
-It needs at least one argument, the path for the output.
-
-  >>> sys.argv = ['ksspackage', static_dump]
-  >>> ksspackage()
-  Creating `kss.js` script: DONE
-
-If we look into the export we will see only the `kss.js` file.
-
-  >>> os.listdir(static_dump)
-  ['kss.js']
+It needs at least two arguments, the path for the output and a plugin.
 
-In this case it is empty since we did not give it any plugins to
-extract the Javascript from.
+To find out which plugin we can use, let us ask for the available plugins.
 
-  >>> open(os.path.join(static_dump, 'kss.js')).read()
-  ''
+//  >>> sys.argv = ['ksspackage', '--list']
+//  >>> ksspackage()
+//  Available plugins:
+//    kss-core
 
-Now if we give it a plugin it will put the files into the dir.
+Now that we provide a plugin, its files are put into the dir.
 
   >>> sys.argv = ['ksspackage', static_dump, '--plugin=kss-core']
   >>> ksspackage()
@@ -66,10 +59,10 @@
 
   >>> sys.argv = old_argv
 
-Besides creating the scripts the utility can also list the available
-plugins.
+The code hereunder should be removed : strangely, it only works after the code
+above.
 
   >>> sys.argv = ['ksspackage', '--list']
   >>> ksspackage()
   Available plugins:
-    kss-core
\ No newline at end of file
+    kss-core


More information about the Kukit-checkins mailing list