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
File details
Details for the file modipyCop-1.2.2.tar.gz.
File metadata
- Download URL: modipyCop-1.2.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ddc2625e7af1205f22f10d9fc70fb0141c1b9e08aad8fd63681abd6f16960dd
|
|
| MD5 |
4ce7c931fc5af96ed6fbaea701d17528
|
|
| BLAKE2b-256 |
acb4832f85dafb1e4312f7f1b4b8fdfd544eecb598142b7e80fad1afbf773a2f
|