Skip to content

Releases: sayyid5416/generalpy

v1.7.0

Choose a tag to compare

@sayyid5416 sayyid5416 released this 29 Jan 16:01
61c8a8d

Added New classes

💠 Attrib class (windows OS only)

  • Handles the attrib command from windows OS.
  • To set/modify/remove the A/H/I/R/S attributes for files/folders.
  • Use attrib /? in CMD for more info.

💠 ICACLS class (windows OS only)

  • Handles functions related to icacls command from windows OS.
  • To set/modify/remove the permissions for files/folders.
  • Use icacls /? in CMD for more info.

💠 TaskList class (windows OS only)

  • Handles functions related to tasklist command of windows OS.
  • Get running tasks/executables.
  • Check if an exe is running or not, or how many of it's instances are running.

Added New methods in modules

💠 decorator module

  • platform_specific: Run decorated function only if current platform is one of the supportedPlatforms

💠 general module

  • get_digit_from_text: Returns the digit from the first occurrence of (digit).
  • is_python: Returns True if current running app is python.
  • set_app_user_model_id: Sets the App User Model ID for the current process on windows OS.

Other changes

  • Refactored the internal imports
  • Improved docstrings of many modules, classes and methods

v1.6.0

Choose a tag to compare

@sayyid5416 sayyid5416 released this 27 Jan 10:37
088d785

[Added] time_it decorator function in decorator module:

  • Prints the time taken by the decorated function

v1.5.0

Choose a tag to compare

@sayyid5416 sayyid5416 released this 26 Jan 16:24
3645883

[NEW] Added new methods:

  • delete_files_by_condition: Deletes all files in directory and its subdirectories according to some condition.
  • generate_repr_str: Returns a suitable string for __repr__ method of classes.

Improved

  • Added __repr__ method in Settings, LevelFormatter and CustomLogging classes
  • Refactoring in Settings class

v1.4.0

Choose a tag to compare

@sayyid5416 sayyid5416 released this 26 Jan 11:42
b2877b8

[NEW] general module

This module contains general methods

  • get_digit_from_text: Returns the digit from the first occurrence of (digit).

Other changes

  • [Bug Fix] get_new_path method was not creating filepaths correctly
  • Now Settings.get_setting takes default argument. It would be returned, if setting not present
  • Improved docstring of Settings class
  • Added docstring in IgnoreError class
  • Readme updated
  • Deleted test-settings.py file (not necessary any more) (doesn't affect the package)

v1.3.2

Choose a tag to compare

@sayyid5416 sayyid5416 released this 25 Jan 15:31
32f9bdc

Nothing new in this release

Fixed the links in readme and pypi project

v1.3.1

Choose a tag to compare

@sayyid5416 sayyid5416 released this 25 Jan 15:25
fa8505d

[NEW] exceptions module

  • IgnoreError class (read more about it in Readme)

v1.3.0

Choose a tag to compare

@sayyid5416 sayyid5416 released this 25 Jan 11:04
62ceefb

[NEW] decorator module: Contains decorators

  • combine_single_items: To combine item of sublists (which contain only one item) in a single sublist.
  • conditional: To run the decorated function and return it's value, only when condition=True
  • run_threaded: To run the decorated function in a new thread

[NEW] files module: Contains methods to work with files

  • delete_files_by_prefix_suffix: Deletes all files in directory and its subdirectories which have prefix as prefix or suffix as suffix in their name.
  • get_new_path: Returns new filePath for files, which do not exist by appending (1/2/3/..).
  • get_random_file_path: Returns a random path of a file which is not present, in parentDirectory
  • read_file_chunks: Read file and returns possible data of chunkSize

Settings class

  • Added __str__ method

CustomLogging class

  • Better formatting for log statements
  • Logs for logging.WARNING will have [!] as prefix

Other changes

  • Minor docstring improvements
  • Added test.py file for internal testing (not for package)

Formatting improvements

Choose a tag to compare

@sayyid5416 sayyid5416 released this 24 Jan 15:47
f4bef5c

Better formatting of logs in CustomLogging class

Improvements

Choose a tag to compare

@sayyid5416 sayyid5416 released this 24 Jan 15:29
55bcbcc

CustomLogging class

  • default value of loggerName = __name__
  • Better spacing in log statements
  • Added [!] for warning logs

Critical issue fix

Choose a tag to compare

@sayyid5416 sayyid5416 released this 24 Jan 08:52
c8e2f2f

Fixed missing required dependency pytz