From 5ae41d2fc5cc9971997ad9658f1c3e28067fe829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sun, 25 Dec 2016 09:12:20 +0800 Subject: [PATCH] Fixed the documentation. --- README.rst | 56 ++++++++++++++++++++++++++--------------------------- bin/obasync | 8 ++++---- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/README.rst b/README.rst index ac80790..879f558 100644 --- a/README.rst +++ b/README.rst @@ -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 - OpenOffice/LibreOffice Basic storage. +--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 diff --git a/bin/obasync b/bin/obasync index eafcf8e..f5f513d 100755 --- a/bin/obasync +++ b/bin/obasync @@ -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")