Changeset 4414:f6f311c187ea in livinglogic.python.xist for src/ll/scripts/ucat.py

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

Add documentation for ucat.

Files:
1 modified

Legend:

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

    r4409 r4414  
    99## 
    1010## See ll/__init__.py for the license 
     11 
     12 
     13""" 
     14``ucat`` is a script for printing files. It is an URL-enabled version of the 
     15``cat`` system command. Via :mod:`ll.url` and :mod:`ll.orasql` ``ucat`` supports 
     16``ssh`` and ``oracle`` URLs too. 
     17 
     18 
     19Options 
     20------- 
     21 
     22``ucat`` supports the following options: 
     23 
     24    ``urls`` 
     25        One or more URLs to be printed. 
     26 
     27    ``-r``, ``--recursive`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     28        Prints directory content recursively. 
     29 
     30    ``-x``, ``--ignoreerrors`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     31        Ignores errors occuring during the copy process. (Otherwise the copy 
     32        process is aborted.) 
     33 
     34    ``-i``, ``--include`` : regular expression 
     35        Only copy files that contain the regular expression. 
     36 
     37    ``-e``, ``--exclude`` : regular expression 
     38        Don't copy files that contain the regular expression. 
     39 
     40    ``-a``, ``--all`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     41        Include dot files (i.e. files whose name starts with a ``.``). Not that 
     42        the content of directories whose name starts with a dot will still be 
     43        printed. 
     44 
     45 
     46Examples 
     47-------- 
     48Print a file:: 
     49 
     50    $ ucat foo.txt 
     51 
     52Print a remote file:: 
     53 
     54    $ ucat ssh://user@www.example.org/~/foo.txt 
     55 
     56Print the SQL source code of a procedure in an Oracle database:: 
     57 
     58    $ ucat oracle://user:pwd@oracle.example.org/procedure/foo 
     59 
     60""" 
    1161 
    1262 
     
    2474except ImportError: 
    2575    pass 
     76 
     77 
     78__docformat__ = "reStructuredText" 
    2679 
    2780