sweeper/README.rst

66 lines
950 B
ReStructuredText
Raw Normal View History

2014-01-27 06:50:38 +00:00
sweeper
=======
Find duplicate files and perform action.
Usage
=====
Print duplicates
2014-01-27 07:04:25 +00:00
2014-01-27 07:01:30 +00:00
.. code:: python
2014-01-27 07:03:00 +00:00
2014-01-27 06:50:38 +00:00
from sweeper import file_dups
dups = file_dups(['images1', 'images2'])
print(dups)
Remove duplicate files
2014-01-27 07:04:25 +00:00
2014-01-27 07:01:30 +00:00
.. code:: python
2014-01-27 07:03:00 +00:00
2014-01-28 21:39:07 +00:00
from sweeper import rm_file_dups
2014-01-27 06:50:38 +00:00
rm_file_dups(['images'])
Perform custom action
2014-01-27 07:04:25 +00:00
2014-01-27 07:03:00 +00:00
.. code:: python
2014-01-28 21:39:07 +00:00
from sweeper import iter_file_dups
for files in iter_file_dups(['images']):
2014-01-27 06:50:38 +00:00
for fname in files:
2014-01-28 21:39:07 +00:00
print('found duplicate file with name: {}'.format(fname))
2014-01-27 06:50:38 +00:00
2014-01-27 07:04:25 +00:00
As script::
2014-01-27 07:03:00 +00:00
2014-01-27 06:50:38 +00:00
python sweeper.py --help
2014-01-27 08:23:37 +00:00
As installed console script::
sweeper --help
2014-01-27 06:50:38 +00:00
Installation
============
from source::
python setup.py install
or from PyPI::
pip install sweeper
Documentation
=============
this README.rst, code itself, docstrings
sweeper can be found on github.com at:
https://github.com/darko-poljak/sweeper
Tested With
===========
Python2.7.6, Python3.3.3