New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dirsync

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dirsync - pypi Package Compare versions

Comparing version
2.2.5
to
2.2.6
+7
-0
CHANGES.rst

@@ -52,3 +52,10 @@ dirsync - Changes

2.2.6 (24/05/2025)
..................
Fixed:
- remove orphan directory when it contains read-only files (#49)
- prevents error if target dir cannot be created
2.1 (08-09-2014)

@@ -55,0 +62,0 @@ ----------------

+0
-1
[console_scripts]
dirsync = dirsync.run:from_cmdline

@@ -1,4 +0,4 @@

Metadata-Version: 1.1
Metadata-Version: 2.2
Name: dirsync
Version: 2.2.5
Version: 2.2.6
Summary: Advanced directory tree synchronisation tool

@@ -8,123 +8,3 @@ Home-page: https://github.com/tkhyn/dirsync/

Author-email: thomas@ksytek.com
License: UNKNOWN
Description: dirsync
=======
|copyright| 2014-2019 Thomas Khyn
|copyright| 2003-2015 Anand B Pillai
Advanced directory tree synchronisation tool
based on `Python robocopier`_ by Anand B Pillai
If you like dirsync and are looking for a way to thank me and/or encourage
future development, here is my BTC or BCH donation address:
``1EwENyR8RV6tMc1hsLTkPURtn5wJgaBfG9``.
Usage
-----
From the command line::
dirsync <sourcedir> <targetdir> [options]
From python::
from dirsync import sync
sync(sourcedir, targetdir, action, **options)
Main Options
------------
Chosing one option among the following ones is mandatory
--diff, -d Only report difference between sourcedir and targetdir
--sync, -s Synchronize content between sourcedir and targetdir
--update, -u Update existing content between sourcedir and targetdir
If you use one of the above options (e.g. ``sync``) most of the time, you
may consider defining the ``action`` option in a `Configuration file`_ parsed
by dirsync.
Additional Options
------------------
--verbose, -v Provide verbose output
--purge, -p Purge files when synchronizing (does not purge by
default)
--force, -f Force copying of files, by trying to change file
permissions
--twoway, -2 Update files in source directory from target
directory (only updates target from source by default)
--create, -c Create target directory if it does not exist (By
default, target directory should exist.)
--ctime Also takes into account the source file\'s creation
time (Windows) or the source file\'s last metadata
change (Unix)
--content Takes into account ONLY content of files.
Synchronize ONLY different files.
At two-way synchronization source files content
have priority if destination and source are existed
--ignore, -x patterns Regex patterns to ignore
--only, -o patterns Regex patterns to include (exclude every other)
--exclude, -e patterns Regex patterns to exclude
--include, -i patterns Regex patterns to include (with precedence over
excludes)
Configuration file
------------------
.. note::
Configuration files are only used when using the command line, and ignored
when dirsync is called from within Python.
If you want to use predefined options all the time, or if you need specific
options when 'dirsyncing' a specific source directory, dirsync looks for
two configuration files, by order or priority (the last takes precedence)::
~/.dirsync
source/directory/.dirsync
.. note::
A ~/.dirsync configuration file is automatically created the first time
dirsync is ran from the command line. It enables ``sync`` mode by default.
.. warning::
Any ``source/directory/.dirsync`` file is automatically excluded from the
files to compare. You have to explicitly include using the ``--include``
option it if you want it to be covered by the comparison.
The command line options always override the values defined in the
configuration files.
The configuration files must have a ``defaults`` section, and the options are
as defined above. The only exception is for the option ``action``, which can
take 3 values ``diff``, ``sync`` or ``update``.
Example config file::
[defaults]
action = sync
create = True
Custom logger
-------------
From python, you may not want to have the output sent to ``stdout``. To do so,
you can simply pass your custom logger via the ``logger`` keyword argument of
the ``sync`` function::
sync(sourcedir, targetdir, action, logger=my_logger, **options)
.. |copyright| unicode:: 0xA9
.. _`Python robocopier`: http://code.activestate.com/recipes/231501-python-robocopier-advanced-directory-synchronizati/
Keywords: directory,folder,update,synchronisation
Platform: UNKNOWN
Classifier: Programming Language :: Python

@@ -143,1 +23,136 @@ Classifier: Programming Language :: Python :: 2

Classifier: Topic :: System :: Archiving :: Mirroring
License-File: LICENSE.txt
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: summary
dirsync
=======
|copyright| 2014+ Thomas Khyn
|copyright| 2003-2015 Anand B Pillai
Advanced directory tree synchronisation tool
based on `Python robocopier`_ by Anand B Pillai
If you like dirsync and find it useful, you may want to thank me and
encourage future development by sending a few mBTC / mBCH / mBSV at this address:
``1EwENyR8RV6tMc1hsLTkPURtn5wJgaBfG9``.
Usage
-----
From the command line::
dirsync <sourcedir> <targetdir> [options]
From python::
from dirsync import sync
sync(sourcedir, targetdir, action, **options)
Main Options
------------
Chosing one option among the following ones is mandatory
--diff, -d Only report difference between sourcedir and targetdir
--sync, -s Synchronize content between sourcedir and targetdir
--update, -u Update existing content between sourcedir and targetdir
If you use one of the above options (e.g. ``sync``) most of the time, you
may consider defining the ``action`` option in a `Configuration file`_ parsed
by dirsync.
Additional Options
------------------
--verbose, -v Provide verbose output
--purge, -p Purge files when synchronizing (does not purge by
default)
--force, -f Force copying of files, by trying to change file
permissions
--twoway, -2 Update files in source directory from target
directory (only updates target from source by default)
--create, -c Create target directory if it does not exist (By
default, target directory should exist.)
--ctime Also takes into account the source file\'s creation
time (Windows) or the source file\'s last metadata
change (Unix)
--content Takes into account ONLY content of files.
Synchronize ONLY different files.
At two-way synchronization source files content
have priority if destination and source are existed
--ignore, -x patterns Regex patterns to ignore
--only, -o patterns Regex patterns to include (exclude every other)
--exclude, -e patterns Regex patterns to exclude
--include, -i patterns Regex patterns to include (with precedence over
excludes)
.. note::
The regex options are matches, which means they need to match the whole paths from the beginning.
From the command line, the ``ignore``, ``only``, ``exclude`` and ``include`` options can be
followed by one or several regex pattern(s).
When using the python API, these options are to be specified as lists of regex strings.
Configuration file
------------------
.. note::
Configuration files are only used when using the command line, and ignored
when dirsync is called from within Python.
If you want to use predefined options all the time, or if you need specific
options when 'dirsyncing' a specific source directory, dirsync looks for
two configuration files, by order or priority (the last takes precedence)::
~/.dirsync
source/directory/.dirsync
.. note::
A ~/.dirsync configuration file is automatically created the first time
dirsync is ran from the command line. It enables ``sync`` mode by default.
.. warning::
Any ``source/directory/.dirsync`` file is automatically excluded from the
files to compare. You have to explicitly include using the ``--include``
option it if you want it to be covered by the comparison.
The command line options always override the values defined in the
configuration files.
The configuration files must have a ``defaults`` section, and the options are
as defined above. The only exception is for the option ``action``, which can
take 3 values ``diff``, ``sync`` or ``update``.
Example config file::
[defaults]
action = sync
create = True
Custom logger
-------------
From python, you may not want to have the output sent to ``stdout``. To do so,
you can simply pass your custom logger via the ``logger`` keyword argument of
the ``sync`` function::
sync(sourcedir, targetdir, action, logger=my_logger, **options)
.. |copyright| unicode:: 0xA9
.. _`Python robocopier`: http://code.activestate.com/recipes/231501-python-robocopier-advanced-directory-synchronizati/

@@ -15,3 +15,2 @@ CHANGES.rst

dirsync.egg-info/entry_points.txt
dirsync.egg-info/requires.txt
dirsync.egg-info/top_level.txt

@@ -8,16 +8,6 @@ """

from argparse import ArgumentParser
from collections import OrderedDict
from configparser import ConfigParser
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
try:
from ConfigParser import ConfigParser # python 2
except ImportError:
from configparser import ConfigParser # python 3
from six import string_types
from .version import __pkg_name__

@@ -185,3 +175,3 @@

newdef = val not in ('0', 'False', 'false')
elif isinstance(curdef, string_types):
elif isinstance(curdef, str):
newdef = val

@@ -188,0 +178,0 @@ else:

@@ -224,9 +224,15 @@ """

try:
if os.path.isfile(fullf2):
if os.path.exists(fullf2):
try:
try:
os.remove(fullf2)
if os.path.isfile(fullf2):
os.remove(fullf2)
elif os.path.isdir(fullf2):
shutil.rmtree(fullf2)
except PermissionError as e:
os.chmod(fullf2, stat.S_IWRITE)
os.remove(fullf2)
if os.path.isfile(fullf2):
os.remove(fullf2)
elif os.path.isdir(fullf2):
shutil.rmtree(fullf2)
self._deleted.append(fullf2)

@@ -264,5 +270,8 @@ self._numdelfiles += 1

if not os.path.exists(to_make):
os.makedirs(to_make)
self._numnewdirs += 1
self._added.append(to_make)
try:
os.makedirs(to_make)
self._numnewdirs += 1
self._added.append(to_make)
except FileNotFoundError as e:
self.log(str(e))

@@ -269,0 +278,0 @@ # common files/directories

@@ -9,3 +9,3 @@ """

__version_info__ = (2, 2, 5, 'final', 0)
__version_info__ = (2, 2, 6, 'final', 0)

@@ -12,0 +12,0 @@

The MIT License (MIT)
Copyright (c) 2014-2019 Thomas Khyn
Copyright (c) 2014+ Thomas Khyn
Copyright (c) 2003-2015 Anand B Pillai

@@ -5,0 +5,0 @@

+137
-122

@@ -1,4 +0,4 @@

Metadata-Version: 1.1
Metadata-Version: 2.2
Name: dirsync
Version: 2.2.5
Version: 2.2.6
Summary: Advanced directory tree synchronisation tool

@@ -8,123 +8,3 @@ Home-page: https://github.com/tkhyn/dirsync/

Author-email: thomas@ksytek.com
License: UNKNOWN
Description: dirsync
=======
|copyright| 2014-2019 Thomas Khyn
|copyright| 2003-2015 Anand B Pillai
Advanced directory tree synchronisation tool
based on `Python robocopier`_ by Anand B Pillai
If you like dirsync and are looking for a way to thank me and/or encourage
future development, here is my BTC or BCH donation address:
``1EwENyR8RV6tMc1hsLTkPURtn5wJgaBfG9``.
Usage
-----
From the command line::
dirsync <sourcedir> <targetdir> [options]
From python::
from dirsync import sync
sync(sourcedir, targetdir, action, **options)
Main Options
------------
Chosing one option among the following ones is mandatory
--diff, -d Only report difference between sourcedir and targetdir
--sync, -s Synchronize content between sourcedir and targetdir
--update, -u Update existing content between sourcedir and targetdir
If you use one of the above options (e.g. ``sync``) most of the time, you
may consider defining the ``action`` option in a `Configuration file`_ parsed
by dirsync.
Additional Options
------------------
--verbose, -v Provide verbose output
--purge, -p Purge files when synchronizing (does not purge by
default)
--force, -f Force copying of files, by trying to change file
permissions
--twoway, -2 Update files in source directory from target
directory (only updates target from source by default)
--create, -c Create target directory if it does not exist (By
default, target directory should exist.)
--ctime Also takes into account the source file\'s creation
time (Windows) or the source file\'s last metadata
change (Unix)
--content Takes into account ONLY content of files.
Synchronize ONLY different files.
At two-way synchronization source files content
have priority if destination and source are existed
--ignore, -x patterns Regex patterns to ignore
--only, -o patterns Regex patterns to include (exclude every other)
--exclude, -e patterns Regex patterns to exclude
--include, -i patterns Regex patterns to include (with precedence over
excludes)
Configuration file
------------------
.. note::
Configuration files are only used when using the command line, and ignored
when dirsync is called from within Python.
If you want to use predefined options all the time, or if you need specific
options when 'dirsyncing' a specific source directory, dirsync looks for
two configuration files, by order or priority (the last takes precedence)::
~/.dirsync
source/directory/.dirsync
.. note::
A ~/.dirsync configuration file is automatically created the first time
dirsync is ran from the command line. It enables ``sync`` mode by default.
.. warning::
Any ``source/directory/.dirsync`` file is automatically excluded from the
files to compare. You have to explicitly include using the ``--include``
option it if you want it to be covered by the comparison.
The command line options always override the values defined in the
configuration files.
The configuration files must have a ``defaults`` section, and the options are
as defined above. The only exception is for the option ``action``, which can
take 3 values ``diff``, ``sync`` or ``update``.
Example config file::
[defaults]
action = sync
create = True
Custom logger
-------------
From python, you may not want to have the output sent to ``stdout``. To do so,
you can simply pass your custom logger via the ``logger`` keyword argument of
the ``sync`` function::
sync(sourcedir, targetdir, action, logger=my_logger, **options)
.. |copyright| unicode:: 0xA9
.. _`Python robocopier`: http://code.activestate.com/recipes/231501-python-robocopier-advanced-directory-synchronizati/
Keywords: directory,folder,update,synchronisation
Platform: UNKNOWN
Classifier: Programming Language :: Python

@@ -143,1 +23,136 @@ Classifier: Programming Language :: Python :: 2

Classifier: Topic :: System :: Archiving :: Mirroring
License-File: LICENSE.txt
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: summary
dirsync
=======
|copyright| 2014+ Thomas Khyn
|copyright| 2003-2015 Anand B Pillai
Advanced directory tree synchronisation tool
based on `Python robocopier`_ by Anand B Pillai
If you like dirsync and find it useful, you may want to thank me and
encourage future development by sending a few mBTC / mBCH / mBSV at this address:
``1EwENyR8RV6tMc1hsLTkPURtn5wJgaBfG9``.
Usage
-----
From the command line::
dirsync <sourcedir> <targetdir> [options]
From python::
from dirsync import sync
sync(sourcedir, targetdir, action, **options)
Main Options
------------
Chosing one option among the following ones is mandatory
--diff, -d Only report difference between sourcedir and targetdir
--sync, -s Synchronize content between sourcedir and targetdir
--update, -u Update existing content between sourcedir and targetdir
If you use one of the above options (e.g. ``sync``) most of the time, you
may consider defining the ``action`` option in a `Configuration file`_ parsed
by dirsync.
Additional Options
------------------
--verbose, -v Provide verbose output
--purge, -p Purge files when synchronizing (does not purge by
default)
--force, -f Force copying of files, by trying to change file
permissions
--twoway, -2 Update files in source directory from target
directory (only updates target from source by default)
--create, -c Create target directory if it does not exist (By
default, target directory should exist.)
--ctime Also takes into account the source file\'s creation
time (Windows) or the source file\'s last metadata
change (Unix)
--content Takes into account ONLY content of files.
Synchronize ONLY different files.
At two-way synchronization source files content
have priority if destination and source are existed
--ignore, -x patterns Regex patterns to ignore
--only, -o patterns Regex patterns to include (exclude every other)
--exclude, -e patterns Regex patterns to exclude
--include, -i patterns Regex patterns to include (with precedence over
excludes)
.. note::
The regex options are matches, which means they need to match the whole paths from the beginning.
From the command line, the ``ignore``, ``only``, ``exclude`` and ``include`` options can be
followed by one or several regex pattern(s).
When using the python API, these options are to be specified as lists of regex strings.
Configuration file
------------------
.. note::
Configuration files are only used when using the command line, and ignored
when dirsync is called from within Python.
If you want to use predefined options all the time, or if you need specific
options when 'dirsyncing' a specific source directory, dirsync looks for
two configuration files, by order or priority (the last takes precedence)::
~/.dirsync
source/directory/.dirsync
.. note::
A ~/.dirsync configuration file is automatically created the first time
dirsync is ran from the command line. It enables ``sync`` mode by default.
.. warning::
Any ``source/directory/.dirsync`` file is automatically excluded from the
files to compare. You have to explicitly include using the ``--include``
option it if you want it to be covered by the comparison.
The command line options always override the values defined in the
configuration files.
The configuration files must have a ``defaults`` section, and the options are
as defined above. The only exception is for the option ``action``, which can
take 3 values ``diff``, ``sync`` or ``update``.
Example config file::
[defaults]
action = sync
create = True
Custom logger
-------------
From python, you may not want to have the output sent to ``stdout``. To do so,
you can simply pass your custom logger via the ``logger`` keyword argument of
the ``sync`` function::
sync(sourcedir, targetdir, action, logger=my_logger, **options)
.. |copyright| unicode:: 0xA9
.. _`Python robocopier`: http://code.activestate.com/recipes/231501-python-robocopier-advanced-directory-synchronizati/
dirsync
=======
|copyright| 2014-2019 Thomas Khyn
|copyright| 2014+ Thomas Khyn
|copyright| 2003-2015 Anand B Pillai

@@ -11,4 +11,4 @@

If you like dirsync and are looking for a way to thank me and/or encourage
future development, here is my BTC or BCH donation address:
If you like dirsync and find it useful, you may want to thank me and
encourage future development by sending a few mBTC / mBCH / mBSV at this address:
``1EwENyR8RV6tMc1hsLTkPURtn5wJgaBfG9``.

@@ -58,5 +58,5 @@

change (Unix)
--content Takes into account ONLY content of files.
--content Takes into account ONLY content of files.
Synchronize ONLY different files.
At two-way synchronization source files content
At two-way synchronization source files content
have priority if destination and source are existed

@@ -69,3 +69,12 @@ --ignore, -x patterns Regex patterns to ignore

.. note::
The regex options are matches, which means they need to match the whole paths from the beginning.
From the command line, the ``ignore``, ``only``, ``exclude`` and ``include`` options can be
followed by one or several regex pattern(s).
When using the python API, these options are to be specified as lists of regex strings.
Configuration file

@@ -72,0 +81,0 @@ ------------------

"""
dirsync
Advanced directory tree synchronisation tool
(c) 2014-2019 Thomas Khyn
(c) 2014+ Thomas Khyn
(c) 2003-2015 Anand B Pillai

@@ -53,3 +53,2 @@ MIT license (see LICENSE.txt)

packages=find_packages(),
install_requires=('six',),
entry_points={

@@ -56,0 +55,0 @@ 'console_scripts': [