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
Metadata
Release files for modipyCop 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| modipyCop-1.2.2.tar.gz | 3.8 kB | Without provenance | Details for modipyCop-1.2.2.tar.gz |
Release files / modipyCop-1.2.2.tar.gz
| Download URL | modipyCop-1.2.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ddc2625e7af1205f22f10d9fc70fb0141c1b9e08aad8fd63681abd6f16960dd
|
|
BLAKE2b-256 checksum How to use checksums |
acb4832f85dafb1e4312f7f1b4b8fdfd544eecb598142b7e80fad1afbf773a2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for modipyCop 1.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.