Fixed the documentation.

This commit is contained in:
依瑪貓 2016-12-25 09:12:20 +08:00
parent e352882acc
commit 5ae41d2fc5
2 changed files with 31 additions and 33 deletions

View File

@ -84,45 +84,43 @@ OPTIONS
::
obasync [options] [directory [library]]
obasync [options] [DIRECTORY [LIBRARY]]
directory
The project source directory. Default to the current working
directory.
DIRECTORY The project source directory. Default to the current
working directory.
library
The name of the Basic library. Default to the same name as the
project source directory.
LIBRARY The name of the Basic library. Default to the same
name as the project source directory.
-g, --get
Download (check out) the macros from the OpenOffice/LibreOffice
Basic storage to the source files, instead of upload (check in).
By default it uploads the source files onto the
--get Download (check out) the macros from the
OpenOffice/LibreOffice Basic storage to the source
files, instead of upload (check in). By default it
uploads the source files onto the
OpenOffice/LibreOffice Basic storage.
-p, --port N
The TCP port to communicate with OpenOffice/LibreOffice. The
default is 2002. You can change it if port 2002 is already in use.
-p, --port N The TCP port to communicate with
OpenOffice/LibreOffice. The default is 2002. You can
change it if port 2002 is already in use.
-x, --ext .EXT
The file name extension of the source files. The default is
``.vb``. This may be used for your convenience of editor syntax
highlighting.
-x, --ext .EXT The file name extension of the source files. The
default is ``.vb``. This may be used for your
convenience of editor syntax highlighting.
-e, --encoding CS
The encoding of the source files. The default is system-dependent.
For example, on Traditional Chinese MS-Windows, this will be
CP950 (Big5). You can change this to UTF-8 for convenience if you
obtain/synchronize your source code from other sources.
The encoding of the source files. The default is
system-dependent. For example, on Traditional Chinese
MS-Windows, this will be CP950 (Big5). You can change
this to UTF-8 for convenience if you
obtain/synchronize your source code from other
sources.
-r, --run Module.Macro
Run he specific macro after synchronization, for convenience.
-r, --run MODULE.MACRO
Run he specific macro after synchronization, for
convenience.
-h, --help
Show the help message and exit
-h, --help Show the help message and exit
-v,--version
Show program's version number and exit
-v, --version Show program's version number and exit
COPYRIGHT

View File

@ -62,15 +62,15 @@ def parse_args():
description=("Synchronize the local Basic scripts"
" with OpenOffice/LibreOffice Basic."))
parser.add_argument(
"projdir", metavar="dir", nargs="?", default=os.getcwd(),
"projdir", metavar="DIR", nargs="?", default=os.getcwd(),
help=("The project source directory"
" (default to the current directory)."))
parser.add_argument(
"library", metavar="Library", nargs="?",
"library", metavar="LIBRARY", nargs="?",
help=("The Library to upload/download the macros"
" (default to the name of the directory)."))
parser.add_argument(
"-g", "--get", action="store_true",
"--get", action="store_true",
help="Downloads the macros instead of upload.")
parser.add_argument(
"-p", "--port", metavar="N", type=int, default=2002,
@ -86,7 +86,7 @@ def parse_args():
help=("The encoding of the source files. "
"(default: %(default)s)"))
parser.add_argument(
"-r", "--run", metavar="Module.Macro",
"-r", "--run", metavar="MODULE.MACRO",
help="The macro to run after the upload, if any.")
parser.add_argument(
"-v", "--version", action="version", version="%(prog)s 0.2")