Skip to main content

A library that extends file management functionality in Python with many useful features in order to save your time and make life easier!

Project description

FinderZ

Full File Management Library for Python. And growing (V2 is out!)

logo-color

IMPORTANT:

V2 is finally out! To check out the details, go to the readthedocs documentation under the update v2 section! Documentation: FinderZ

If you want to use the Synchronization and Backup classes, please read the documentation linked above in order to prevent data loss

AND: Huge thank you to @RichardDally , @coolslutguy420, @kyzsuukii, @mikudae , and @fablau for starring FinderZ.

Written in python, this library provides you with different file operation commands as well as info gathering commands on directories as well as files.


CHANGELOG: V2.0.0

To check out the details of V2, go to the documentation. This is a big update with many new things!

Major update 2.1.0:

  1. Fixed bug where createFiles function parameter “firstFileStartsAtOne” is the opposite of what it should be. When set to True, there is no number, but when set to False, there is a number.
  2. New function mergeClassFolders in fileOperands to automatically converge each file in each class folder into one singular folder (useful for machine learning (ML))
  3. New GatherInfo function getFileStats (word count, character count, line count, byte count)
  4. Smaller functions within getFileStats are separate, which means you can access them separately. These include:
    1. wordCount, charCount, and byteCount. (lineCount is gathered through the already existing getFileLineAmount function)
  5. Fixed bug in GatherInfo for the isEmptyDir function where len() could not be conducted. if len(directories == 0): —> if len(directories) == 0: (Also fixed that files were not read in this function!)
  6. Changed name from getAmountofFilesinDir ---> getAmountofComponentsinDir. Switched parameter name from mainDir ---> dir. Added other options.
  7. Removed getAllFileNamesinDir function due to the existence of the readDir function.
  8. For the getFileLineContents function: Added option to return the value as a string (via f.read()) rather than a list (via f.readlines()). Added a try except to notify of errors (e.g. UnicodeDecodeError, FileExistsError)
  9. Updated computeHash function to fix some issues with the Synchronize class (more on that below).

NOTE: I have already started improving the Synchronize class, and in future updates, these things will be added. This will most likely be one, big update. Again, this below is not part of FinderZ 2.1.0, but are plans for the future. Synchronize Class Goals:

  1. Fix the bug where if the root folder of the last modified two folders is empty but the other one isn’t, it merges the files.
  2. This bug is due to for example renaming the root folders counting as “last modified”. The root folders should not be calculated, but rather the contents within the folders. To fix this, check whether or not the root folder that was “last modified” is empty or not.
  3. Add a “emptyFolderProtection” option. If set the True, an empty folder that has priority based on time last modified will not empty the other folder, but rather, it will inherit the other folders files.
  4. Fix the situation when two directories did not merge because of empty files with no content. Now, hashes will only be computed when the files are not empty.
  5. Add Quickstats option to display a smaller stats rather than a full log (files removed, files updated, files created, folders created, folders removed, backup folder updated, etc.)
  6. Add “force sync” option which removes ALL of the folders, files, and copies ALL of them back.

Also, the documentation will be updated to 2.1.0 soon

Minor Fix Version 2.0.6:

  1. Added log_non_critical parameter in the Synchronize and Backup class functions. If put to False, only critical actions will be displayed, resulting in a minimized log.
  2. Fixed file updating in Backup class by adding hash computation to the backup function when updating files. This was already in the Synchronize class.
  3. Fixed the Backup directories error (I thought this was already fixed before, but it is totally fixed now.)

Usage

Installation:

pip3 install FinderZ

Importing:

import FinderZ

Features

  • Consists of five classes: GatherInfo, fileOperands, Synchronize, Backup, and callBash.
  • Advanced file operations, already built for you (including many options to choose from!)
  • Supports regex operations for some functions, as well as specific filters and multiple other choices to choose from. Options such as exact search or something even just containing a keyword, or even having the option to choose to search recursively, are all included.
  • Includes full-featured, reliable synchronization and backup classes (beta). Both include optional and detailed logging.
  • Full set of info gathering tools under the GatherInfo class.
  • Full-featured documentation to guide you through each function in detail.
  • In case of functionality restrictions, callBash is a function that calls a bash script in order to expand functionality at its peak.
  • Easy to use.
  • You no longer have to take your time in making those file management algorithms that take a while to complete.
  • Fast and efficient, includes a plethora of other features.

Why?

  • FinderZ is a way to easily expand on the file system of many operating systems. It supports, MacOS, Windows, Linux, and Android.
  • Who wouldn't want a tool to manage their files easily in their python scripts? This will save time!

How?

  • FinderZ is composed of many iterating techniques and parametric options. Based on these options, the core of each function deals with a user's choice of what to do or what not to do.
  • More info under the documentation!

User notice

  • I am not responsible for any damage or data lost using the FinderZ library.
  • If using the Synchronize class, make sure renaming files or directories is never the last thing you do before synchronization, unless it is the only thing you did do (no adding, removing, copying, etc. files before)
  • This project has just been released to version 2! It has grown so much, but it is still growing and improving.

Services used (Credits):


Make sure to leave a star!

  • If you like this project, leaving a star is what motivates me in doing more. Thank you, and I hope this is useful to all.

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

finderz-2.1.0.tar.gz (777.7 kB view hashes)

Uploaded Source

Built Distribution

finderz-2.1.0-py3-none-any.whl (28.9 kB view hashes)

Uploaded Python 3

Supported by

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