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

View File

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