Module const
[hide private]
[frames] | no frames]

Module const

source code

Global constants.

Variables [hide private]
  z_db_version = u'0.2'
Database version.
  z_db_marker = u'PYBAG DB version = '
Database marker.
  z_db_marker_len = 19
Database marker length.
  z_pbls = u'pybaglink start:'
Symlink emulation start marker.
  z_pble = u':pybaglink end'
Symlink emulation end marker.
  z_pblmaxlen = 4096
Maximum symlink emulation file length.
  P_OUTPUT = u'output'
  P_SHOWTIPS = u'showtips'
  P_WRITECOLSATEXIT = u'writecolsatexit'
  P_TIPSNUMBER = u'tipsnumber'
  P_GUI = u'GUI'
  P_DEBUG = u'debug'
  P_EMUL = u'emulation'
  P_LOGGING = u'logging'
  P_VERB = u'verbosity'
  P_COLORIZE = u'colorize'
  P_OUTFILTER = u'outfilter'
  PYBAG_DEBUG_DEFAULT = u'0'
Default value of cfg.PYBAG_DEBUG.
  PYBAG_LOG_DEFAULT = u'1'
Default value of cfg.PYBAG_LOG.
  PYBAG_EMUL_DEFAULT = u'1'
Default value of cfg.PYBAG_EMUL.
  PYBAG_COLORIZE_DEFAULT = u'1'
Default value of cfg.PYBAG_COLORIZE.
  VERBOSE_DEFAULT = u'3'
Default value of cfg.VERBOSE.
  CRC32BUF = 1048575
CRC32 read buffer (2^20 == 1'048'576).
  DBDUMPMAX = 500
DBDUMP count restrict.
  LOOPN = 10000
Loops in cicles between CANCEL testing.
  TSDIRNONE = 0
No timeshift.
  TSDIRBAG = 1
Timeshift to bag.
  TSDIRORIG = 2
Timeshift to origin
  LI_CANCEL = 0
  LI_ERROR = 1
  LI_PERCENT = 2
Percents of done for current function.
  LI_PERCENT100 = 3
100% percents for current function.
  LI_DESC = 4
Action description.
  LI_PERCENTPART = 5
Percents of global of current function
  LI_PERCENTGLOBAL = 6
Global percents done
  LI_FUN2 = 7
Function which must run after thread exited.
  LI_UPDATEFILTER = 8
True if need update list by filter.
  LI_FILTERRUNNING = 9
True if filter running.
  LI_THREAD = 10
True if thread running.
  LI_LENGTH = 11
  DBPATH = 0
Path as is in DB.
  IBAG = 100
Bag group index.
  ISYNC = 200
Original group index.
  IDB = 300
DB group index.
  IFLAG = 1
Flag subgroup.
  ISIZE = 2
Size subgroup.
  IMDATE = 3
Modify date subgroup.
  ICRC32 = 4
CRC32 subgroup.
  IREAD = 5
Read subgroup.
  IPATH = 6
Path subgroup.
  ILINK = 7
Link point subgroup.
  DBBAGFLAG = 101
  DBBAGSIZE = 102
  DBBAGMDATE = 103
  DBBAGCRC32 = 104
  DBBAGREAD = 105
  DBBAGPATH = 106
  DBBAGLINK = 107
  DBDBFLAG = 301
  DBDBSIZE = 302
  DBDBMDATE = 303
  DBDBCRC32 = 304
  DBDBREAD = 305
  DBDBLINK = 307
  DBDBPATH = 306
  DBORIGFLAG = 201
  DBORIGSIZE = 202
  DBORIGMDATE = 203
  DBORIGCRC32 = 204
  DBORIGREAD = 205
  DBORIGPATH = 206
  DBORIGLINK = 207
  DBDIR = 15
Direction of syncronization.
  DBSYNC = 17
Syncronization status.
  DBCOMPARE = 18
Compare property from config.
  DBSYMLINK = 19
Symlink property from config.
  DBDESC = 20
Description of comparison, syncronization.
  DBDIRMAN = 21
Manual overwrite (GUI).
  DBDESCMAN = 22
Manual description (GUI).
  DBITEMID = 23
ItemId into treeCtrl (GUI).
  DBDIRREADED = 24
As DBDIR, but after reading.
  DBDESCREADED = 25
As DBDESC, but after reading.
  DBSYMLINKEMUL = 26
Emulate symlink or not for current item.
  DBBACKUP = 27
Backuped item.
  DBBACKUPYES = True
Backuped item.
  DBBACKUPNO = False
Not backuped item.
  DBREADYES = True
Item was tried read.
  DBREADNONE = False
Item not tried read.
  DBSYMEMULNONE = False
  DBFLAGNONE = u''
No flag.
  DBFLAGDIR = u'd'
Directory.
  DBFLAGFILE = u'f'
Regular file.
  DBFLAGSYMLINK = u's'
Symlink.
  DBFLAGUNKNOWN = u'u'
Unknown item type.
  DBMDATENONE = 0.0
None modify date.
  DBNONE = 0
Empty/None item.
  DBPATHNONE = u''
Empty path.
  DBDESCNONE = u'Not compared.'
Empty description.
  DBDESCMANNONE = u''
Empty description for manual (GUI).
  DBDESCOK = u'Ok.'
Successfull description.
  DBLINKNONE = u'-'
Fill string for item in DB if it's not a link.
  DBITEMNONE = None
  DBDIRNONE = 0
Direction None.
  DBDIRBAG = 1
Direction left (to bag).
  DBDIRORIG = 2
Direction right (to orig).
  DBDIRDB = 4
Direction to DB.
  DBDIRCOPY = 8
Copy to.
  DBDIRDELETE = 16
Delete.
  DBDIRWARNING = 32
If Warning.
  DBDIRCONFLICT = 64
If conflict.
  DBDIRERROR = 128
If error occur.
  DBDIRNEW = 256
New item.
  DBDIRUNCHANGED = 512
Unchanged item.
  DBDIRFORCED = 1024
Indicate that file action is forced.
  DBDIRIGNORED = 2048
indicate ignored files.
  DBDIRDIFF = 4096
Different direction.
  DBDIROK = 8192
Ok flag.
  DBDIRRESTORE = 16384
Used for restore compared direction.
  DBDIRTS = 32768
Indicate timeshift.
  DBSYNCNONE = 0
Syncronization None.
  DBSYNCERRREADBAG = 1
Error then read from bag.
  DBSYNCERRREADSYNC = 2
Error then read from orig.
  DBSYNCERRREAD = 3
Error then read items.
  DBSYNCERRWRITEBAG = 4
Error then write to bag.
  DBSYNCERRWRITESYNC = 8
Error then write to orig.
  DBSYNCERRWRITE = 12
Error then write items.
  DBSYNCOK = 16
Syncronization saccessfull.
  DBSYNCERROTHER = 32
Other error then sync.
  DBSYNCERRCOMPARE = 64
Error from compare.
  DBSYNCERROR = 111
All errors.
  DBSYNCCOMPARE = 128
Compare and syncronize this record.
  DBSYNCIGNORED = 256
Ignored.
  DBSYNCCONFLICT = 512
Conflict.
  DBFORCEDIRNONE = 0
Do nothing.
  DBFORCEDIRBAG = 1
In all conflicts copy to bag.
  DBFORCEDIRORIGIN = 2
In all conflicts copy to origin.
  DBFORCEDIROLDER = 4
In all conflicts use older.
  DBFORCEDIRNEWER = 8
In all conflicts use newer.
  DBFORCEDIRBAGALL = 16
All changes from origin to bag.
  DBFORCEDIRORIGINALL = 32
All changes from bag to origin.
  DBFORCEDIRORIGINCOPY = 64
Copying changes from bag to origin (do not delete from origin).
  DBFORCEDIRBAGCOPY = 128
Copying changes from origin to bag (do not delete from bag).
  BACKUPDIR = 16
Backup mode direction.
  Z_DBFORCE = {u'bag': 1, u'bagall': 16, u'bagcopy': 128, u'newe...
Direction force array.
  z_action_choise = [(u'No', 0), (u'To bag', 1), (u'To origin', ...
Actions choise for GUI.
  COL_NAME = 0
  COL_HEADING = 1
  COL_VISIBLE = 2
  COL_WIDTH = 3
  COL_FORMAT = 4
  P_IGNORE = u'ignore'
Property ignore.
  P_SYMLINK = u'symlink'
Property symbolic link.
  P_COMPARE = u'compare'
Property compare.
  P_BACKUP = u'backup'
Property backup.
  P_SELECTDEFAULT = u'selectdefault'
Property selectdefault
  P_IGNORENONE = u''
No ignores.
  P_SYMLINKIGNORE = u'ignore'
Ignore symlink.
  P_SYMLINKIGNORENOEMUL = u'ignorenoemul'
Ignore symlink, no emulation.
  P_SYMLINKCOPY = u'copy'
Copy symlink.
  P_SYMLINKCOPYNOEMUL = u'copynoemul'
Copy symlink, no emulation.
  P_COMPARESTAT = u'stat'
Compare by statistic.
  P_COMPARECRC32 = u'crc32'
Compare by CRC32.
  P_BACKUPYES = u'1'
Backup.
  P_BACKUPNO = u'0'
No backup.
  P_SELECTDEFAULTYES = u'1'
Select by default
  P_SELECTDEFAULTNO = u'0'
Unselect by default
  P_SYMLINK_IGNORE = (u'ignore', u'ignorenoemul')
  P_SYMLINK_EMUL = (u'ignore', u'copy')
  z_symlink_choice = [u'ignore', u'ignorenoemul', u'copy', u'cop...
  z_compare_choice = [u'stat', u'crc32']
  P_DEFIGNORE = u''
Default ignores - No ignores.
  P_DEFSYMLINK = u'copy'
Default symlink action - Copy symlinks.
  P_DEFCOMPARE = u'stat'
Default compare method - Compare only by statistic.
  P_DEFBACKUP = u'0'
Default not backup root.
  P_DEFSELECTDEFAULT = u'0'
Default not select for sync
  DBESCAPE = u' %'
Escape symbols.
  DBESCESC = u'#'
Escape symbol/prefix for hex value.
  DBSEP = u'/'
DB path separator.
  P_MDDELTA = u'mddelta'
  MDDELTA_DEFAULT = u'5.0'
  REPORTDIR_DEFAULT = u'bonhdyfwce'
Report direction filter default settings.
  REPORTFORMAT_DEFAULT = u's'
Report format default.
  REPORTPATT_DEFAULT = u'!.*'
Report pattern default.
  REPORTTYPE_DEFAULT = u'1234'
Report type default.
  REPORTPAGE_DEFAULT = u'0'
Report page size default.
  REPORTFILTER_DEFAULT = u'sbonhdyfwce1234'
Report filter default settings.
  O_REPORTFORMAT = {u'l': u'%(forced)s %(dir)s %(err)s [%(path...
Report formats option.
  O_REPORTFILTER = {u'b': 1, u'c': 64, u'd': 16, u'e': 128, u'f'...
Report filter options.
  O_REPORTTYPE = {u'1': u'f', u'2': u'd', u'3': u's', u'4': u'u'}
Report type options.
  z_backupmode = {u'0': 128, u'1': 16}
Backup mode === direction.
  O_ACTION = [u'bag', u'origin', u'delete', u'skip', u'restore',...
Available actions in cli menu.
  O_K_LIST = [u'c', u'i', u'copy', u'ignore', u'cn', u'in', u'co...
  O_K_DICT = {u'c': u'copy', u'cn': u'copynoemul', u'copy': u'co...
  O_S_LIST = [u'stat', u'crc32']
  O_S_DICT = {u'crc32': u'crc32', u'stat': u'stat'}
  z_db_formatlist = [(101, <type 'unicode'>, u'', u'DBBAGFLAG'),...
Format list of tuples (index, type, default) for database.
  __package__ = None
Variables Details [hide private]

DBFORCEDIROLDER

In all conflicts use older. May be used with "NEWER", "OLDER" flags.

Value:
4

DBFORCEDIRNEWER

In all conflicts use newer. May be used with "NEWER", "OLDER" flags.

Value:
8

Z_DBFORCE

Direction force array.

Value:
{u'bag': 1,
 u'bagall': 16,
 u'bagcopy': 128,
 u'newer': 8,
 u'no': 0,
 u'older': 4,
 u'origin': 2,
 u'originall': 32,
...

z_action_choise

Actions choise for GUI.

Value:
[(u'No', 0),
 (u'To bag', 1),
 (u'To origin', 2),
 (u'Newer', 8),
 (u'Older', 4),
 (u'Newer, to bag', 9),
 (u'Newer, to origin', 10),
 (u'Older, to bag', 5),
...

z_symlink_choice

Value:
[u'ignore', u'ignorenoemul', u'copy', u'copynoemul']

DBESCAPE

Escape symbols. DBESCESC and DBSEP is autoadded in start of secuence. Used in previous to 0.2.1 versions. Now used inline symbols = space only.

Value:
u' %'

O_REPORTFORMAT

Report formats option.

  • l - Long format of report.
  • s - Short format of report.
  • p - Old (as in previous version) format.
  • m - Manual specified format.
  • z00 - List report by n items per page.
Value:
{u'l': u'''%(forced)s %(dir)s %(err)s [%(path)s]
	%(desc)s''',
 u'p': u'''	[%(path)s]-->
	  == "%(desc)s".''',
 u's': u'%(forced)s %(dir)s %(err)s [%(path)s]'}

O_REPORTFILTER

Report filter options.

  • b - Operation with direction to bag.
  • o - Operation with direction to origin.
  • n - Operation with new files.
  • h - Operation with changed (copied) files.
  • d - Operation with deleted files.
  • y - Timeshift operations.
  • i - Ignored files.
  • u - Unchanged files.
  • f - Forced action.
  • w - Warnings.
  • c - Conflicts.
  • e - Errors.
Value:
{u'b': 1,
 u'c': 64,
 u'd': 16,
 u'e': 128,
 u'f': 1024,
 u'h': 8,
 u'i': 2048,
 u'n': 256,
...

O_REPORTTYPE

Report type options.

  • 1 - Files.
  • 2 - Directories.
  • 3 - Symlinks.
  • 4 - Unknown.
  • r - Path wilds or regexp filter. If not specified then all paths displayed.
Value:
{u'1': u'f', u'2': u'd', u'3': u's', u'4': u'u'}

O_ACTION

Available actions in cli menu.

Value:
[u'bag',
 u'origin',
 u'delete',
 u'skip',
 u'restore',
 u'tsbag',
 u'tsorigin',
 u'tsreset']

O_K_LIST

Value:
[u'c',
 u'i',
 u'copy',
 u'ignore',
 u'cn',
 u'in',
 u'copynoemul',
 u'ignorenoemul']

O_K_DICT

Value:
{u'c': u'copy',
 u'cn': u'copynoemul',
 u'copy': u'copy',
 u'copynoemul': u'copynoemul',
 u'i': u'ignore',
 u'ignore': u'ignore',
 u'ignorenoemul': u'ignorenoemul',
 u'in': u'ignorenoemul'}

z_db_formatlist

Format list of tuples (index, type, default) for database.

Value:
[(101, <type 'unicode'>, u'', u'DBBAGFLAG'),
 (102, <type 'int'>, 0, u'DBBAGSIZE'),
 (103, <type 'float'>, 0.0, u'DBBAGMDATE'),
 (104, <type 'int'>, 0, u'DBBAGCRC32'),
 (105, <type 'bool'>, False, u'DBBAGREAD'),
 (106, <type 'unicode'>, u'', u'DBBAGPATH'),
 (107, <type 'unicode'>, u'-', u'DBBAGLINK'),
 (301, <type 'unicode'>, u'', u'DBDBFLAG'),
...