[prev in list] [next in list] [prev in thread] [next in thread]
List: klik-devel
Subject: [klik-devel] [klikclient commit] r1265 -
From: codesite-noreply () google ! com
Date: 2008-02-28 13:07:41
Message-ID: 001636e0a64a0447379b54d2da1bd56 () google ! com
[Download RAW message or body]
Author: razielmine
Date: Thu Feb 28 05:07:08 2008
New Revision: 1265
Modified:
trunk/client/trunk/klikclient/bin/klik
Log:
Usage output fixed
Modified: trunk/client/trunk/klikclient/bin/klik
==============================================================================
--- trunk/client/trunk/klikclient/bin/klik (original)
+++ trunk/client/trunk/klikclient/bin/klik Thu Feb 28 05:07:08 2008
@@ -38,96 +38,80 @@
gettext.install( 'klikclient' )
-help_text = {}
-
-help_text["_default_"] = (0,
- "klik foo [args]",
- "Downloads and executes foo")
-help_text["_cmg_"] = (1,
- "klik /path/to/foo.cmg [args]",
- "Short for \"klik run /path/to/foo.cmg\"")
-help_text["get"] = (2,
- "klik get foo [bar...]",
- "Download a recipe and create a cmg file for the applications foo, bar...")
-help_text["_klik_url_"] = (3,
- "klik klik2://foo",
- "Download a recipe and create a cmg file for the application foo")
-help_text["_recipe_"] = (4,
- "klik /path/to/foo.recipe",
- "Create a cmg file for the application foo from the given recipe")
-
-help_text["run"] = (5,
- "klik run [executable] foo.cmg [args]",
- "Run application foo.cmg, executable is an optional command to start")
-help_text["exec"] = (6,
- "klik exec foo.cmg executable [args]",
- "Run application foo.cmg, executable is NOT optional")
-help_text["jail"] = (7,
- "klik jail [jail_type] foo.cmg [args]",
- "Create a jail folder for foo.cmg",
- ["Types",
- ("data", "<TODO:description>"),
- ("home", "<TODO:description>"),
- ("portable", "<TODO:description>")])
-help_text["prompt"] = (8,
- "klik prompt foo.cmg executable",
- "force a dialogue to select application")
-help_text["shell"] = (9,
- "klik shell foo.cmg",
- "Start a shell with cmg union mounted")
-help_text["unpack"] = (10,
- "klik unpack foo.cmg /foo/",
- "Unpack an application")
-help_text["extract"] = (11,
- "klik extract foo.cmg /foo.cfg foo.cfg",
- "Extract a single file from a cmg")
-help_text["icon"] = (12,
- "klik icon foo.cmg output [size]",
- "Extract the icon for the CMG into output If size is specified,
resizes the icon")
-help_text["pack"] = (13,
- "klik pack /foo/ foo.cmg",
- "Repack an application")
-help_text["merge"] = (14,
- "klik merge main.cmg add.cmg output.cmg",
- "<TODO>")
-help_text["register"] = (15,
- "klik register foo.cmg [bar.cmg...]",
- "Register given CMGs with the desktop",
- ["Options:",
- ("-f", "Force registration")])
-help_text["register"] = (16,
- "klik unregister foo.cmg [bar.cmg...]",
- "Unregister given CMGs with the desktop",
- "Options:\n"+
- "-f - Force registration")
-help_text["sync"] = (17,
- "klik sync dir1 [dir2...]",
- "Synchronize application directories, looking for non-registered
packages and packages registered but no longer existing")
+def get_help(mode):
+ #......... ......... ......... ......... ......... ......... ......... .........#
+ if not mode or mode == "_default_":
+ print " klik foo [args] Downloads and executes foo"
+ if not mode or mode == "_cmg_":
+ print " klik /path/to/foo.cmg [args] Short for \"klik run /path/to/foo.cmg\""
+ if not mode or mode == "get":
+ print " klik get foo [bar...] Download a recipe and create a cmg
file for the"
+ print " applications foo, bar..."
+ if not mode or mode == "_klik_url_":
+ print " klik klik2://foo Download a recipe and create a cmg file
for the"
+ print " application foo"
+ if not mode or mode == "_recipe_":
+ print " klik /path/to/foo.recipe Create a cmg file for the
application foo from"
+ print " the given recipe"
+
+ if not mode or mode == "run":
+ print " klik run [executable] foo.cmg [args] Run application
foo.cmg, executable is an optional"
+ print " command to start"
+ if not mode or mode == "exec":
+ print " klik exec foo.cmg executable [args] Run application
foo.cmg, executable"
+ print " is NOT optional"
+ if not mode or mode == "jail":
+ print " klik jail [jail_type] foo.cmg [args] Create a jail folder
for foo.cmg"
+ print " Types"
+ print " data - <TODO:description>"
+ print " home - <TODO:description>"
+ print " portable - <TODO:description>"
+ if not mode or mode == "prompt":
+ print " klik prompt foo.cmg executable Force a dialogue to select application"
+ if not mode or mode == "shell":
+ print " klik shell foo.cmg Start a shell with cmg union mounted"
+ if not mode or mode == "unpack":
+ print " klik unpack foo.cmg /foo/ Unpack an application"
+ if not mode or mode == "extract":
+ print " klik extract foo.cmg /foo.cfg foo.cfg Extract a single
file from a cmg"
+ if not mode or mode == "icon":
+ print " klik icon foo.cmg output [size] Extract the icon for the
CMG into output"
+ print " If size is specified, resizes the icon"
+ if not mode or mode == "pack":
+ print " klik pack /foo/ foo.cmg Repack an application"
+ if not mode or mode == "merge":
+ print " klik merge main.cmg add.cmg out.cmg <TODO>"
+ if not mode or mode == "register":
+ print " klik register foo.cmg [bar.cmg...] Register given CMGs
with the desktop"
+ print " Options:"
+ print " -f - Force registration"
+ if not mode or mode == "unregister":
+ print " klik unregister foo.cmg [bar.cmg...] Unregister given CMGs
with the desktop"
+ if not mode or mode == "sync":
+ print " klik sync dir1 [dir2...] Synchronize application directories,"
+ print " looking for non-registered packages"
+ print " and packages registered but no longer"
+ print " existing"
+
def usage(mode=None):
-
- if not help_text.has_key(mode):
- mode = None
if not mode:
- print "Klik - Web based software installer"
+ print "Klik %s - Web based software installer" % klik.settings.version
print
print "Usage:"
- if mode:
- print " ", help_text[mode]
- else:
- for mode in help_text.values():
- print " ", mode
+ get_help(mode)
- s = KlikSettings()
-
+ s = KlikSettings()
+
+ if not mode:
print "Documentation by :"
- print "\n".join(s.documenters)
+ print " " + "\n ".join(s.documenters)
print ""
print "Created by :"
- print "\n".join(s.authors)
+ print " " + "\n ".join(s.authors)
print ""
print "Website : " + s.website
_______________________________________________
klik-devel mailing list
klik-devel@kde.org
https://mail.kde.org/mailman/listinfo/klik-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic