Skip to main content

A collection of utilities for CGI-VFX to copy files from one place to another, find out basic stat differences between them and handle file sequences and textures (tx files).

Project description

Synchronizer

Documentation Status Build Status Coverage Status

A collection of utilities for CGI-VFX to copy files from one place to another, find out basic stat differences between them and handle file sequences and textures (tx files).

Documentation

Synchronizer Docs

Basic Usage:

  1. Copies src_path to trg_path. Takes both files and directories as source. If given source is a file and it's part of a sequence it'll find and copy the entire sequence of files.
from synchronizer import copier
copier.process_paths(src_path, trg_path, force_overwrite=True, **kwargs)

kwargs: include_tx = True only_tx = True find_sequence = True

  1. Compares two files or directory paths and return sync status. Sync status refers to name and os.stat() comparisons
from synchronizer import syncstatus
syncstatus.get_sync_status(
            src_path, trg_path,
            ignore_name=False,
            ignore_stats=['st_uid', 'st_gid', 'st_atime',
                    'st_ctime', 'st_ino', 'st_dev'])
  1. Compares two paths and returns whichever has the most recent stat time. Default stat used for comparison is st_mtime which is: Time of most recent content modification.
from synchronizer import syncstatus
syncstatus.get_most_recent(src_path, trg_path, use_stat='st_mtime')
  1. Find and return all files that are part of a sequence matching file_path. If no sequence found, returns None. Two files are enough to make a sequence, even if they're not sequential. This assumes the sequence digits are right beside the file extension. ie: C_myfile_v568.jpg MJ_thisisafileseq_455868.dpx MB_udimsforthewin.1008.tx
from synchronizer import utils
utils.get_sequence_files(file_path)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for synchronizer, version 2.0.0a0
Filename, size File type Python version Upload date Hashes
Filename, size synchronizer-2.0.0a0.tar.gz (9.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page