Changeset 4413:552ac478b308 in livinglogic.python.xist

Show
Ignore:
Timestamp:
03/08/11 16:46:09 (9 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Documentation for ucp. Enhance --all description for uls.

Location:
src/ll/scripts
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/ll/scripts/ucp.py

    r4409 r4413  
    1111 
    1212 
     13""" 
     14``ucp`` is a script that copies files/directory contents. It is an URL-enabled 
     15version of the ``cp`` system command. Via :mod:`ll.url` and :mod:`ll.orasql` 
     16``ucp`` supports ``ssh`` and ``oracle`` URLs too. 
     17 
     18 
     19Options 
     20------- 
     21 
     22``ucp`` supports the following options: 
     23 
     24    ``urls`` 
     25        Two or more URLs. If more than two URLs are given or if the last URL refers 
     26        to a directory, the last URL is the target directory. All other sources 
     27        are copied into this target directory. Else one file is copied to another 
     28        file. 
     29 
     30    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     31        Give a report during the copy process about the files copied and their sizes. 
     32 
     33    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
     34        Should the ouput be colored. If ``auto`` is specified (the default) then 
     35        the output is colored if stdout is a terminal. 
     36 
     37    ``-u``, ``--user`` 
     38        A user id or name. If given ``ucp`` will change the owner of the 
     39        target files. 
     40 
     41    ``-g``, ``--group`` 
     42        A group id or name. If given ``ucp`` will change the group of the 
     43        target files. 
     44 
     45    ``-r``, ``--recursive`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     46        Copies files recursively. 
     47 
     48    ``-x``, ``--ignoreerrors`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     49        Ignores errors occuring during the copy process. (Otherwise the copy 
     50        process is aborted.) 
     51 
     52    ``-i``, ``--include`` : regular expression 
     53        Only copy files that contain the regular expression. 
     54 
     55    ``-e``, ``--exclude`` : regular expression 
     56        Don't copy files that contain the regular expression. 
     57 
     58    ``-a``, ``--all`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     59        Include dot files (i.e. files whose name starts with a ``.``). Not that 
     60        the content of directories whose name starts with a dot will still be 
     61        copied. 
     62 
     63 
     64Examples 
     65-------- 
     66 
     67Copy one file to another:: 
     68 
     69    $ ucp foo.txt bar.txt 
     70 
     71Copy a file into an existing directory:: 
     72 
     73    $ ucp foo.txt dir/ 
     74 
     75Copy multiple files into a new or existing directory (and give a progress 
     76report):: 
     77 
     78    $ ucp foo.txt bar.txt baz.txt dir/ -v 
     79    ucp: foo.txt -> dir/foo.txt (1114 bytes) 
     80    ucp: bar.txt -> dir/bar.txt (2916 bytes) 
     81    ucp: baz.txt -> dir/baz.txt (35812 bytes) 
     82 
     83Recursively copy the schema objects in an Oracle database to a local directory:: 
     84 
     85    ucp oracle://user:pwd@oracle.example.org/ db/ -r 
     86 
     87Recursively copy the schema objects in an Oracle database to a remote directory:: 
     88 
     89    ucp oracle://user:pwd@oracle.example.org/ ssh://user@www.example.org/~/db/ -r 
     90""" 
     91 
     92 
    1393import sys, re, argparse, contextlib 
    1494 
     
    24104except ImportError: 
    25105    pass 
     106 
     107 
     108__docformat__ = "reStructuredText" 
    26109 
    27110 
  • src/ll/scripts/uls.py

    r4412 r4413  
    6161 
    6262    ``-a``, ``--all`` :  ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    63         Output files whose name starts with a dot? 
     63        Output dot files (i.e. files and directories whose name starts with a 
     64        ``.``). Not that the content of directories whose name start with a dot 
     65        will still be listed. 
    6466 
    6567