Skip to main content

A program to mirror the directory structure of a source directory to a destination directory.

Project description

TreeMirror

TreeMirror is a Python program that creates a mirrored copy of a directory structure, allowing users to easily duplicate and transfer directory trees.

Requirements

To run TreeMirror, you will need to have Python 3.x installed on your machine. You can check if you have Python installed by running the following command in your terminal:

python --version

Installation

To install TreeMirror, you can simply clone this repository to your local machine:

git clone https://github.com/samyak-jn/treemirror.git

Once cloned, you can navigate to the treemirror directory and install the program's dependencies using the following command:

pip install -r requirements.txt

Usage

To use TreeMirror, you can run the program using the following command:

python treemirror/treemirror.py <input_directory> <output_directory>

  • <input_directory>: the path to the directory structure to be copied.
  • <output_directory>: the path to the directory where the copy will be created.

Replace <input_directory> with the path to the directory whose structure you want to mirror, and <output_directory> with the path to the directory where you want to create the mirrored copy.

If the <output_directory> already exists, the program will ask if you want to overwrite its contents.

When the program is run, it will first display a CLI interface to visualize the directory structure of the input directory. The interface will show each directory as a node, with the parent directories above the child directories. Each node will be indented to indicate its level in the directory hierarchy.

After displaying the directory structure, the program will prompt the user to confirm if they want to overwrite the files in the output directory. If the user confirms, the program will create a copy of the input directory structure in the output directory. If the output directory already exists, the program will ask the user if they want to overwrite the files in the directory.

Testing

To run the unit tests for TreeMirror, navigate to the test directory and run the following command:

python -m unittest

License

TreeMirror is licensed under the MIT License. See the LICENSE file for more information.

Project details


Download files

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

Source Distribution

treemirror-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

treemirror-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file treemirror-0.1.1.tar.gz.

File metadata

  • Download URL: treemirror-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for treemirror-0.1.1.tar.gz
Algorithm Hash digest
SHA256 072411f06c049a948a5592b2c93cc79d75c9e274328448fab8ac93d37be6a941
MD5 f4a0497a3cc3e0a49bc9a56a7d39afe4
BLAKE2b-256 48ae11984014c255e09198f12cd7c88e6598e0ff681420da1be1e716e1aed93d

See more details on using hashes here.

File details

Details for the file treemirror-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: treemirror-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for treemirror-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62e4c4d6a89d82ca022e1f8f459a5fbe2c3b0b92acdd48bb32c839076e69ef47
MD5 933b11ae302d325c127fcc0dd2c15a21
BLAKE2b-256 8e1328ce1a00d1d4d80d163ee7795aff5a0ac40c43bd58c920ad284fe9d63f70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page