| |
---|
| | |
---|
| | PROGNAME = "tren.py" |
---|
| | BASENAME = PROGNAME.split(".py")[0] |
---|
| | PROGENV = BASENAME.upper() |
---|
| | RCSID = "$Id: tren.py,v 1.195 2010/03/16 21:00:20 tundra Exp $" |
---|
| | RCSID = "$Id: tren.py,v 1.196 2010/03/16 21:28:12 tundra Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| |
---|
| | TOKDELIM = "/" # Delimiter for all renaming tokens |
---|
| | |
---|
| | # Shared File Attribute And Sequence Renaming Tokens |
---|
| | |
---|
| | TOKFILALPHA = "ALPHA" |
---|
| | TOKFILATIME = "ATIME" |
---|
| | TOKFILCMD = "CMDLINE" |
---|
| | TOKFILCTIME = "CTIME" |
---|
| | TOKFILDEV = "DEV" |
---|
| |
---|
| | # |
---|
| | # 1) They are used as the type indicator in a Sequence Renaming Token |
---|
| | # 2) They are keys to the SortViews dictionary that stores the prestorted views |
---|
| | |
---|
| | ORDERBYALPHA = TOKFILALPHA |
---|
| | ORDERBYATIME = TOKFILATIME |
---|
| | ORDERBYCMDLINE = TOKFILCMD |
---|
| | ORDERBYCTIME = TOKFILCTIME |
---|
| | ORDERBYDEV = TOKFILDEV |
---|
| | ORDERBYFNAME = TOKFILFNAME |
---|
| | ORDERBYGID = TOKFILGID |
---|
| | ORDERBYINODE = TOKFILINODE |
---|
| | ORDERBYMODE = TOKFILMODE |
---|
| | ORDERBYMTIME = TOKFILMTIME |
---|
| |
---|
| | } |
---|
| | |
---|
| | self.SortViews = { |
---|
| | |
---|
| | ORDERBYATIME : [fullnames in atimes order], |
---|
| | ORDERBYCMDLINE : [fullnames in command line order], |
---|
| | ORDERBYALPHA : [fullnames in alphabetic order], |
---|
| | ORDERBYCTIME : [fullnames in ctimes order], |
---|
| | ORDERBYDEV : [fullnames in devs order], |
---|
| | ORDERBYFNAME : [fullnames in alphabetic order], |
---|
| | ORDERBYGID : [fullnames in gids order], |
---|
| | ORDERBYINODE : [fullnames in inode order], |
---|
| | ORDERBYMODE : [fullnames in mode order], |
---|
| | ORDERBYINODE : [fullnames in inode order], |
---|
| | ORDERBYDEV : [fullnames in devs order], |
---|
| | ORDERBYMTIME : [fullnames in mtimes order], |
---|
| | ORDERBYNLINK : [fullnames in nlinks order], |
---|
| | ORDERBYUID : [fullnames in uids order], |
---|
| | ORDERBYGID : [fullnames in gids order], |
---|
| | ORDERBYATIME : [fullnames in atimes order], |
---|
| | ORDERBYCTIME : [fullnames in ctimes order], |
---|
| | ORDERBYMTIME : [fullnames in mtimes order], |
---|
| | ORDERBYSIZE : [fullnames in size order] |
---|
| | ORDERBYSIZE : [fullnames in size order], |
---|
| | ORDERBYUID : [fullnames in uids order] |
---|
| | } |
---|
| | |
---|
| | self.RenRequests = [ |
---|
| | { |
---|
| |
---|
| | i += 1 |
---|
| | |
---|
| | alpha = targs[:] |
---|
| | alpha.sort() |
---|
| | self.SortViews = {ORDERBYCMDLINE : targs, ORDERBYALPHA : alpha} |
---|
| | self.SortViews = {ORDERBYCMDLINE : targs, ORDERBYFNAME : alpha} |
---|
| | del alpha |
---|
| | |
---|
| | # Dictionary of all the renaming requests - will be filled in |
---|
| | # by -r command line parsing. |
---|
| |
---|
| | |