Skip to main content

A Python library for sorting and organizing files.

Project description

ArrangeLT

Overview

ArrangeLT is a Python library designed to help users quickly and efficiently sort and organize files in a directory. It provides functionality to sort files alphabetically, group files by extensions, and more. ArrangeLT is lightweight, easy to use, and highly extensible.

Installation

To install the library, you can use pip. Run the following command in your terminal:

pip install arrangelt

Usage

Here is a simple example of how to use the library:

Sorting Files Alphabetically

from arrangelt import alth_sort

# Sort files alphabetically in ascending order (default)
sorted_files = alth_sort("path/to/directory", style="asc", include_path=True)
print(sorted_files)

# Sort files alphabetically in descending order
sorted_files = alth_sort("path/to/directory", style="desc", include_path=False)
print(sorted_files)

Grouping Files by Extension

from arrangelt import ext_sort

# Group files by their extensions
grouped_files = ext_sort("path/to/directory", include_path=True)
print(grouped_files)

# Group files by their extensions, excluding specific types (e.g., .tmp and .log)
grouped_files = ext_sort("path/to/directory", exclude_types=[".tmp", ".log"], include_path=False)
print(grouped_files)

# Group files by their extensions, including only specific types (e.g., .txt and .csv)
grouped_files = ext_sort("path/to/directory", include_types=[".txt", ".csv"], include_path=True)
print(grouped_files)

Features

  • Alphabetical Sorting:

    • Sort files in ascending or descending order by their names.
    • Option to include or exclude the full file path in the output.
  • Extension Grouping:

    • Group files by their extensions.
    • Option to include or exclude the full file path in the output.
    • Include only specific file types or exclude specific file types.
  • Error Handling:

    • Provides clear error messages for invalid paths, permissions, and other issues.

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.

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

arrangelt-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

arrangelt-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file arrangelt-0.1.0.tar.gz.

File metadata

  • Download URL: arrangelt-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for arrangelt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 93625b9c2101bb9d53eac8f1871dab9003149b04781a82f3339bfc6e4c2c5148
MD5 35cc8ca6e723bdfe3de71a1918d415bf
BLAKE2b-256 ece08d07f57302a380d08362209a8a205bdc11126009cda51f45fcd91c8f49e7

See more details on using hashes here.

File details

Details for the file arrangelt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: arrangelt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for arrangelt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 beb31c67328c9fb973b596f77f25c7319a5541589eaa634c8baabd12460fb55d
MD5 65ace9132c956ce2a5518b0897f94abb
BLAKE2b-256 fe6ce6a4f8abccd3514eb19b49ccb6db23a8a9b8aa9c5183111ea308007da897

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