Got rid of TOKFILALPHA and SORTBYALPHA. Replaced with SORTBYFNAME to make file- and sequence renaming token names consistent.
1 parent 4edf3d6 commit 3987e1d02822f7998fbc9a154c3fb0bb9004c28c
@tundra tundra authored on 16 Mar 2010
Showing 1 changed file
View
34
tren.py
 
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.