Metadata-Version: 2.1
Name: foldersync
Version: 0.1.0
Summary: A minimalistic file and folder synchronisation utility.
Author-email: Prasant Sudhakaran <code@prasant.net>
License: MIT License
        
        Copyright (c) 2024 Prasant Sudhakaran
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights 
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
        copies of the Software, and to permit persons to whom the Software is 
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in 
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
        THE SOFTWARE.
        
Project-URL: Homepage, https://github.com/yourusername/foldersync
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# FolderSync

FolderSync is a cross-platform directory synchronisation tool. It helps you keep two folders in perfect alignment—copying new or changed files from a source directory to a target directory, and removing files that no longer exist in the source. This makes FolderSync ideal for backups, environment mirroring, and maintaining consistent folder structures across multiple machines.

## Key Features

- **Cross-Platform Compatibility:** Works seamlessly on Windows, macOS, and Linux.
- **Simple CLI Usage:** Just point to a source and destination and run one command.
- **Dry-Run Mode:** Preview changes before committing them, ensuring safety and transparency.
- **Fast and Efficient:** Uses built-in Python modules to perform quick comparisons and synchronisation.
- **Scalable:** Works equally well for small directories or large projects with many files.

## Common Use Cases

1. **Backup and Archiving:** If you want to back up your local project directory to an external folder—perhaps on a network drive or a USB stick—you can run:

   `foldersync /Users/prasant/my_project /Volumes/external_drive/my_project_backup`

   To preview changes without applying them:

   `foldersync /Users/prasant/my_project /Volumes/external_drive/my_project_backup --dry-run`

2. **Dev/Prod Environment Sync:** If you maintain a production environment folder that needs to stay in sync with your local development setup, run:

   `foldersync /Users/prasant/dev_environment /var/www/production_site`

   This ensures newly created or modified files are copied to the production folder, and outdated files are removed, keeping the production environment aligned with your development environment.

3. **Laptop to External Drive:** To keep important documents or research data on your laptop synced to an external SSD, run:

   `foldersync ~/Documents/research_data /Volumes/ssd_backup/research_data`

   If you’re unsure about changes:

   `foldersync ~/Documents/research_data /Volumes/ssd_backup/research_data --dry-run`

   This lets you confirm what will happen before making actual changes.

4. **Shared Workspaces:** For team members who each maintain a local copy of a shared folder stored on a network drive, you can keep your local copy synced with:

   `foldersync /Volumes/team_drive/shared_docs ~/shared_docs_local`

   This ensures your local directory always mirrors the master copy on the team drive.

## Installation

FolderSync uses Python’s standard library, so no extra dependencies are required. To install, run:

`pip install foldersync`

Once installed, run FolderSync by specifying the source and destination directories:

`foldersync /path/to/source /path/to/destination`

Use `--dry-run` to preview changes without making them, ensuring you have full control and confidence in the synchronisation process.
