diff --git a/tren.rst b/tren.rst index 57b33b5..3c2448b 100644 --- a/tren.rst +++ b/tren.rst @@ -1930,11 +1930,11 @@ the file, who owns it, and so on. That's the idea behind the attribute renaming tokens described in the previous sections. -An extension of this idea is to *order all the files being renamed* -based on one of these parameters. For instance, instead of actually -embedding the date and time of creation in a file or directory name, -you might want to order the files from oldest to newest with a naming -convention like:: +But another really interesting use of renaming tokens is to *order all +the files being renamed* based on one of these parameters. For +instance, instead of actually embedding the date and time of creation +in a file or directory name, you might want to order the files from +oldest to newest with a naming convention like:: file-1.txt file-2.txt @@ -1968,28 +1968,67 @@ General Format Of Sequence Renaming Tokens ========================================== -Sequence renaming tokens consist of three descriptive components and +Sequence renaming tokens consist of four descriptive components and have the following general format:: - /:alphabet:/ + /OrderingType:Counting Alphabet:Counting Pattern/ where, - ordering flag: + Ordering (Required): + ascending - descending - type: + Type (Required): - FIX THISSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS + The attribute to use to create the ordering. + + Counting Alphabet (Optional): + + The name of the counting system to use. + + Counting Pattern (Optional): + + Establishes the first value in the counting + sequence and/or provides a string to format + the count. + +Note that there is no space between the Ordering flag and Type. + +An *Ordering* flag is mandatory. It will either be ``+`` to indicate +an ascending count or ``-`` to indicate a descending count. + +The *Type* is mandatory. All available types are described in the +section below entitled, `Types Of Sequence Renaming Tokens`_. + +The *Counting Alphabet* is optional. Counting alphabets are ways to +count in different bases and even to use something other than just +numbers to represent the count. These are described in the section +below entitled, `Let's Learn The Alphabet`_. + +If you omit naming a specific alphabet, **tren** will default to +counting in Decimal. Note that you *cannot* omit the alphabet +delimiters, so the correct form of a sequence renaming token then +becomes:: + + /Ordering FlagType::Counting Pattern/ + +A *Counting Pattern* is optional. Counting patterns are used to do +two things: Set the initial value for the count and Describe the +layout of how the count should look. This is described in the section +below entitled, `Counting Pattern Format`_. + +If you omit a counting pattern, **tren** will start counting from the +zero-th "number" in your chosen alphabet, producing a counting pattern +as "wide" as necessary to count all the items being renamed. Let's Learn The Alphabet ======================== -Count Pattern Format -==================== +Counting Pattern Format +======================= The counting pattern is used to specify two things: The width of the sequence string, and the starting value for the sequence. Examples:: @@ -2183,7 +2222,7 @@ :: - $Id: tren.rst,v 1.174 2010/04/05 19:54:03 tundra Exp $ + $Id: tren.rst,v 1.175 2010/04/05 20:33:20 tundra Exp $ You can find the latest version of this program at: