diff --git a/tren.rst b/tren.rst index 2d5d8a9..d33d984 100644 --- a/tren.rst +++ b/tren.rst @@ -919,13 +919,13 @@ tren.py -i: -re=E abcdef.text # -> abcdEf.tExt -So, ``-T`` lets you specify what substring of the full name -is a candidate for renaming. All other renaming operations -like ``-i``, ``-r``, and so on operate *only upon the substring -specified by* ``-T``. +So, ``-T`` lets you specify what substring of the full name is a +candidate for renaming. All other renaming operations like ``-i``, +``-r``, and so on operate *only upon the substring specified by* +``-T``. -If you specify multiple renaming operations on the command line, -any ``-T`` targeting will remain in effect *for each renaming request*. +If you specify multiple renaming operations on the command line, any +``-T`` targeting will remain in effect *for each renaming request*. For instance:: tren.py -T -1 -r=OO -r=x foo @@ -935,11 +935,11 @@ foo -> foOO foOO -> foOx # Final name -In other words, each incremental renaming request honors the -current state of the ``-T`` option. To turn off targeted -renaming - that is, make the whole file name the target again - -simply include ``-T :`` on the command line. All renaming requests -to the right of it will then target the whole name:: +In other words, each incremental renaming request honors the current +state of the ``-T`` option. To turn off targeted renaming - that is, +make the whole file name the target again - simply include ``-T :`` on +the command line. All renaming requests to the right of it will then +target the whole name:: tren.py -T -1 -r=OO -T: -rO=x foo # Yields: foxO @@ -991,15 +991,17 @@ Notice that left-relative indexes are positive numbers beginning with -0, but right-relative indexes are are negative numbers beginning at -1. +0, but right-relative indexes are are negative numbers beginning at +-1. -So, what's a slice? A slice is a way of specifying *a range of one or more values*. -In the case of the ``-T`` option, "values" means "positions in the name string -targeted for renaming." In the case of the ``-i`` option, "values" means -*which instances of a given string should be renamed*. +So, what's a slice? A slice is a way of specifying *a range of one or +more values*. In the case of the ``-T`` option, "values" means +"positions in the name string targeted for renaming." In the case of +the ``-i`` option, "values" means *which instances of a given string +should be renamed*. -In our example above, the ``bcd`` portion of the name could be -defined several different ways:: +In our example above, the ``bcd`` portion of the name could be defined +several different ways:: 1:4 -9:-6 @@ -1308,8 +1310,8 @@ upper case ``A`` in the target file names. -Forcing Case Transformation -=========================== +Case Transformation +=================== Sometimes you want to actually force the case of the characters in a filename to change. You do this with the ``-e`` option. @@ -1332,14 +1334,20 @@ an "old" string like the ``-r`` renaming option, but rather operates on the file name as a whole. +You can, however, limit what portion of the filename is "targeted" +for case conversion via the ``-T`` option:: + + tren.py -T 4:6 -et fee_fi_fo # -> fee_Fi_fo + + As with all renaming requests, ``-e`` is just another *incremental* renaming operation on the command line:: tren.py -rfi=fud -et fee_fi_fo # -> fee_fud_fo -> Fee_Fud_Fo -You can actually watch these increments happen by using the ``-d`` -command line option. +You can actually see these incremental transformations by specifying +the ``-d`` option on the command line. The Strange Case Of Mac OS X And Windows @@ -3065,7 +3073,7 @@ :: - $Id: tren.rst,v 1.197 2010/11/16 20:49:40 tundra Exp $ + $Id: tren.rst,v 1.198 2010/11/16 20:59:31 tundra Exp $ You can find the latest version of this program at: