Giter Club home page Giter Club logo

treemirror's Introduction

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.

treemirror's People

Contributors

samyak-jn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.