Skip to main content

Track modification made to file/s.

Project description

ModipyCop

ModipyCop is a Python tool that allows you to track modifications made to files or directories. Ideal for projects where monitoring changes in files is crucial, ModipyCop offers a simple and efficient way to get information on when files were last modified.

Installation

You can easily install modipyCop using pip:

pip install modipyCop

or via git:

git clone https://github.com/niCodeLine/modipyCop.git

or just copy-paste it into your code.

Usage

To use ModipyCop, first import the Cop class into your Python project and then follow these steps:

from modipyCop import Cop

# Create an instance of the Cop class for a specific 
# directory or file and save the current state of files
directory = Cop("your/directory/path")
directory.prev_revision()

# Making changes in the directory files...

# Check and get a list of the modified files
directory.post_revision()

Or be used as a decorator:

from modipyCop import decoprator

@decoprator('your/directory/path')
def some_function(var,var_1):
    # some_function code...

Outputs

Depending on whether a path to a folder or a specific file is given, you can get different outputs:

Folder

For a folder path:

No file was modified in your/directory/path

and

Modified files in your/directory/path:

file_1.py, 1.23 seconds ago.
text_1.txt, 4.56 seconds ago.

File

For an individual file path:

No modifications in file_1.py

and

file_1.py modified 7.89 seconds ago.

Features

  • Modification Tracking: Allows tracking of the latest modifications of files or directories.
  • Easy to Use: A simple and straightforward interface for reviewing file changes.
  • Usable as Decorator: Avoid unneceserly writing and use the decorator module.

Reminder

Before using post_revision(), it's important to call prev_revision() to save the current state of the files. This ensures that post_revision() can accurately detect and report any changes made.

You can forget about this concern by just using the decoprator module as a decorator.

Contributions

Contributions are welcome! If you have improvements or fixes, please feel free to send a pull request or open an issue in the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

Nico Spok - nicospok@hotmail.com GitHub: niCodeLine

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

modipyCop-1.2.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

modipyCop-1.2.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file modipyCop-1.2.1.tar.gz.

File metadata

  • Download URL: modipyCop-1.2.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for modipyCop-1.2.1.tar.gz
Algorithm Hash digest
SHA256 a8df82451baada1b4a42d897e368d46006658275d42e6ad93d95bd8b94b94fef
MD5 8bd58eb9aa0ff98cd0e8160c0a4e91ae
BLAKE2b-256 9d9da9258607aa2701a7254209fb6082247bd0f81c84aea7683a4cfd4e08452a

See more details on using hashes here.

File details

Details for the file modipyCop-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: modipyCop-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for modipyCop-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dffab63bca5f714d3c4520691f18c4e381b6754076498d6d16bf98c55320b97b
MD5 5a020f19b3f9bfb9491c6fe3535a7c8f
BLAKE2b-256 fcd7123effd35db32a94607a982e78281959c3f6af703d485cb25036e0d19631

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