PYBAG - Crossplatform files synchronization and backup portable
tools.
GUI implementation.
License:
Copyright (c) 2007 ... 2019, Mazhugin Aleksey
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above
copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice,
this list of conditions and the following disclaimer in the
documentation
and/or other materials provided with the distribution.
* Neither the name of the Mazhugin Aleksey nor the names of its
contributors may be
used to endorse or promote products derived from this
software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
catalog = {}
Icons catalog.
|
|
|
index = []
Icons index.
|
|
|
SELSTATEALL = 1
|
|
|
SELSTATEDEFAULT = 0
|
|
|
SELSTATECLEAR = 2
|
|
|
btnSelectRoots_state = 0
Current state of button.
|
|
|
AppState = {'ff_bag': True, 'ff_ch': True, 'ff_conf': True, 'f...
Application state for GUI UI update.
|
|
|
_filter = {u'ff_bag': u'filter_bag', u'ff_ch': u'filter_change...
|
|
|
_outlock = threading.Lock()
Lock object for gui print.
|
|
|
_outtxt = u''
Text printed from GUI.
|
|
|
_column_choise_dict = {u'actionicon': (u'actionicon', u'Action...
|
|
|
BACKUPDIR = 16
|
|
|
COL_FORMAT = 4
|
|
|
COL_HEADING = 1
|
|
|
COL_NAME = 0
|
|
|
COL_VISIBLE = 2
|
|
|
COL_WIDTH = 3
|
|
|
CRC32BUF = 1048575
|
|
|
DBBACKUP = 27
|
|
|
DBBACKUPNO = False
|
|
|
DBBACKUPYES = True
|
|
|
DBBAGCRC32 = 104
|
|
|
DBBAGFLAG = 101
|
|
|
DBBAGLINK = 107
|
|
|
DBBAGMDATE = 103
|
|
|
DBBAGPATH = 106
|
|
|
DBBAGREAD = 105
|
|
|
DBBAGSIZE = 102
|
|
|
DBCOMPARE = 18
|
|
|
DBDBCRC32 = 304
|
|
|
DBDBFLAG = 301
|
|
|
DBDBLINK = 307
|
|
|
DBDBMDATE = 303
|
|
|
DBDBPATH = 306
|
|
|
DBDBREAD = 305
|
|
|
DBDBSIZE = 302
|
|
|
DBDESC = 20
|
|
|
DBDESCMAN = 22
|
|
|
DBDESCMANNONE = u''
|
|
|
DBDESCNONE = u'Not compared.'
|
|
|
DBDESCOK = u'Ok.'
|
|
|
DBDESCREADED = 25
|
|
|
DBDIR = 15
|
|
|
DBDIRBAG = 1
|
|
|
DBDIRCONFLICT = 64
|
|
|
DBDIRCOPY = 8
|
|
|
DBDIRDB = 4
|
|
|
DBDIRDELETE = 16
|
|
|
DBDIRDIFF = 4096
|
|
|
DBDIRERROR = 128
|
|
|
DBDIRFORCED = 1024
|
|
|
DBDIRIGNORED = 2048
|
|
|
DBDIRMAN = 21
|
|
|
DBDIRNEW = 256
|
|
|
DBDIRNONE = 0
|
|
|
DBDIROK = 8192
|
|
|
DBDIRORIG = 2
|
|
|
DBDIRREADED = 24
|
|
|
DBDIRRESTORE = 16384
|
|
|
DBDIRTS = 32768
|
|
|
DBDIRUNCHANGED = 512
|
|
|
DBDIRWARNING = 32
|
|
|
DBDUMPMAX = 500
|
|
|
DBESCAPE = u' %'
|
|
|
DBESCESC = u'#'
|
|
|
DBFLAGDIR = u'd'
|
|
|
DBFLAGFILE = u'f'
|
|
|
DBFLAGNONE = u''
|
|
|
DBFLAGSYMLINK = u's'
|
|
|
DBFLAGUNKNOWN = u'u'
|
|
|
DBFORCEDIRBAG = 1
|
|
|
DBFORCEDIRBAGALL = 16
|
|
|
DBFORCEDIRBAGCOPY = 128
|
|
|
DBFORCEDIRNEWER = 8
|
|
|
DBFORCEDIRNONE = 0
|
|
|
DBFORCEDIROLDER = 4
|
|
|
DBFORCEDIRORIGIN = 2
|
|
|
DBFORCEDIRORIGINALL = 32
|
|
|
DBFORCEDIRORIGINCOPY = 64
|
|
|
DBITEMID = 23
|
|
|
DBITEMNONE = None
|
|
|
DBLINKNONE = u'-'
|
|
|
DBMDATENONE = 0.0
|
|
|
DBNONE = 0
|
|
|
DBORIGCRC32 = 204
|
|
|
DBORIGFLAG = 201
|
|
|
DBORIGLINK = 207
|
|
|
DBORIGMDATE = 203
|
|
|
DBORIGPATH = 206
|
|
|
DBORIGREAD = 205
|
|
|
DBORIGSIZE = 202
|
|
|
DBPATH = 0
|
|
|
DBPATHNONE = u''
|
|
|
DBREADNONE = False
|
|
|
DBREADYES = True
|
|
|
DBSEP = u'/'
|
|
|
DBSYMEMULNONE = False
|
|
|
DBSYMLINK = 19
|
|
|
DBSYMLINKEMUL = 26
|
|
|
DBSYNC = 17
|
|
|
DBSYNCCOMPARE = 128
|
|
|
DBSYNCCONFLICT = 512
|
|
|
DBSYNCERRCOMPARE = 64
|
|
|
DBSYNCERROR = 111
|
|
|
DBSYNCERROTHER = 32
|
|
|
DBSYNCERRREAD = 3
|
|
|
DBSYNCERRREADBAG = 1
|
|
|
DBSYNCERRREADSYNC = 2
|
|
|
DBSYNCERRWRITE = 12
|
|
|
DBSYNCERRWRITEBAG = 4
|
|
|
DBSYNCERRWRITESYNC = 8
|
|
|
DBSYNCIGNORED = 256
|
|
|
DBSYNCNONE = 0
|
|
|
DBSYNCOK = 16
|
|
|
IBAG = 100
|
|
|
ICRC32 = 4
|
|
|
IDB = 300
|
|
|
IFLAG = 1
|
|
|
ILINK = 7
|
|
|
IMDATE = 3
|
|
|
IPATH = 6
|
|
|
IREAD = 5
|
|
|
ISIZE = 2
|
|
|
ISYNC = 200
|
|
|
LI_CANCEL = 0
|
|
|
LI_DESC = 4
|
|
|
LI_ERROR = 1
|
|
|
LI_FILTERRUNNING = 9
|
|
|
LI_FUN2 = 7
|
|
|
LI_LENGTH = 11
|
|
|
LI_PERCENT = 2
|
|
|
LI_PERCENT100 = 3
|
|
|
LI_PERCENTGLOBAL = 6
|
|
|
LI_PERCENTPART = 5
|
|
|
LI_THREAD = 10
|
|
|
LI_UPDATEFILTER = 8
|
|
|
LOOPN = 10000
|
|
|
MDDELTA_DEFAULT = u'5.0'
|
|
|
O_ACTION = [u'bag', u'origin', u'delete', u'skip', u'restore',...
|
|
|
O_K_DICT = {u'c': u'copy', u'cn': u'copynoemul', u'copy': u'co...
|
|
|
O_K_LIST = [u'c', u'i', u'copy', u'ignore', u'cn', u'in', u'co...
|
|
|
O_REPORTFILTER = {u'b': 1, u'c': 64, u'd': 16, u'e': 128, u'f'...
|
|
|
O_REPORTFORMAT = {u'l': u'%(forced)s %(dir)s %(err)s [%(path...
|
|
|
O_REPORTTYPE = {u'1': u'f', u'2': u'd', u'3': u's', u'4': u'u'}
|
|
|
O_S_DICT = {u'crc32': u'crc32', u'stat': u'stat'}
|
|
|
O_S_LIST = [u'stat', u'crc32']
|
|
|
PYBAG_COLORIZE_DEFAULT = u'1'
|
|
|
PYBAG_DEBUG_DEFAULT = u'0'
|
|
|
PYBAG_EMUL_DEFAULT = u'1'
|
|
|
PYBAG_LOG_DEFAULT = u'1'
|
|
|
P_BACKUP = u'backup'
|
|
|
P_BACKUPNO = u'0'
|
|
|
P_BACKUPYES = u'1'
|
|
|
P_COLORIZE = u'colorize'
|
|
|
P_COMPARE = u'compare'
|
|
|
P_COMPARECRC32 = u'crc32'
|
|
|
P_COMPARESTAT = u'stat'
|
|
|
P_DEBUG = u'debug'
|
|
|
P_DEFBACKUP = u'0'
|
|
|
P_DEFCOMPARE = u'stat'
|
|
|
P_DEFIGNORE = u''
|
|
|
P_DEFSELECTDEFAULT = u'0'
|
|
|
P_DEFSYMLINK = u'copy'
|
|
|
P_EMUL = u'emulation'
|
|
|
P_GUI = u'GUI'
|
|
|
P_IGNORE = u'ignore'
|
|
|
P_IGNORENONE = u''
|
|
|
P_LOGGING = u'logging'
|
|
|
P_MDDELTA = u'mddelta'
|
|
|
P_OUTFILTER = u'outfilter'
|
|
|
P_OUTPUT = u'output'
|
|
|
P_SELECTDEFAULT = u'selectdefault'
|
|
|
P_SELECTDEFAULTNO = u'0'
|
|
|
P_SELECTDEFAULTYES = u'1'
|
|
|
P_SHOWTIPS = u'showtips'
|
|
|
P_SYMLINK = u'symlink'
|
|
|
P_SYMLINKCOPY = u'copy'
|
|
|
P_SYMLINKCOPYNOEMUL = u'copynoemul'
|
|
|
P_SYMLINKIGNORE = u'ignore'
|
|
|
P_SYMLINKIGNORENOEMUL = u'ignorenoemul'
|
|
|
P_SYMLINK_EMUL = (u'ignore', u'copy')
|
|
|
P_SYMLINK_IGNORE = (u'ignore', u'ignorenoemul')
|
|
|
P_TIPSNUMBER = u'tipsnumber'
|
|
|
P_VERB = u'verbosity'
|
|
|
P_WRITECOLSATEXIT = u'writecolsatexit'
|
|
|
REPORTDIR_DEFAULT = u'bonhdyfwce'
|
|
|
REPORTFILTER_DEFAULT = u'sbonhdyfwce1234'
|
|
|
REPORTFORMAT_DEFAULT = u's'
|
|
|
REPORTPAGE_DEFAULT = u'0'
|
|
|
REPORTPATT_DEFAULT = u'!.*'
|
|
|
REPORTTYPE_DEFAULT = u'1234'
|
|
|
TSDIRBAG = 1
|
|
|
TSDIRNONE = 0
|
|
|
TSDIRORIG = 2
|
|
|
VERBOSE_DEFAULT = u'3'
|
|
|
Z_DBFORCE = {u'bag': 1, u'bagall': 16, u'bagcopy': 128, u'newe...
|
|
|
__package__ = None
|
|
|
i = (u'timeshift', u'TS', 0, 16, 2)
|
|
|
z_action_choise = [(u'No', 0), (u'To bag', 1), (u'To origin', ...
|
|
|
z_backupmode = {u'0': 128, u'1': 16}
|
|
|
z_compare_choice = [u'stat', u'crc32']
|
|
|
z_db_formatlist = [(101, <type 'unicode'>, u'', u'DBBAGFLAG'),...
|
|
|
z_db_marker = u'PYBAG DB version = '
|
|
|
z_db_marker_len = 19
|
|
|
z_db_version = u'0.2'
|
|
|
z_pble = u':pybaglink end'
|
|
|
z_pblmaxlen = 4096
|
|
|
z_pbls = u'pybaglink start:'
|
|
|
z_symlink_choice = [u'ignore', u'ignorenoemul', u'copy', u'cop...
|