Skip to main content

A simple directory configuration tool

Project description

dirconfig 📂

Configure what files should be in what folders using an easy-to-read YAML config file.

PyPI PyPI - Python Version PyPI - License GitHub Actions Workflow Status

Features

  • File Organization: Automatically move files based on their extension from one directory to another.
  • Notification System (Future Feature): Get notified regarding specific events specified in the configuration file.
  • Automated Backups (Future Feature): Set up scheduled backups for important directories.

Installation

Install dirconfig using pip:

pip install dirconfig

Configuration

Create a config.yml file in your working directory with your automation tasks. Here's an example configuration that organizes .jpg and .pdf files into separate directories:

tasks:
  - name: Organize Downloads
    type: file-organization
    source: /path/to/your/source/directory
    rules:
      - extension: .jpg
        destination: /path/to/your/destination/for/images
      - extension: .pdf
        destination: /path/to/your/destination/for/documents

Usage

dirconfig is designed to run as a daemon, monitoring specified directories and automatically organizing files according to the configurations defined in your config.yml file.

You can generate a sample config.yml file using the following command:

dirconfig generate

Starting dirconfig

To initiate dirconfig and begin the monitoring process, use the following command:

dirconfig start

This command starts dirconfig, which then operates in the background. It will watch the source directories specified in your config.yml for any changes, organizing files according to your predefined rules.

To run dirconfig as a separate process, use the following command:

dirconfig start &

Stopping dirconfig

To stop the dirconfig daemon, execute:

dirconfig stop

This command stops the background process of dirconfig, halting the monitoring and file organization tasks.

Advanced Management

For long-term operation or deployment, integrating dirconfig with system services or process managers can offer more graceful management, including automatic restarts, logging, and simplified start/stop operations.

Extending dirconfig

dirconfig welcomes enhancements and customization. If you're interested in adding new features or improving the tool, consider contributing to the source code. Your input and contributions are highly appreciated.

License

dirconfig is licensed under the MIT License. See the LICENSE file for more 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

dirconfig-0.2.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

dirconfig-0.2.3-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file dirconfig-0.2.3.tar.gz.

File metadata

  • Download URL: dirconfig-0.2.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for dirconfig-0.2.3.tar.gz
Algorithm Hash digest
SHA256 0320c912c6ada7443ff1c1f1693eadc41c2784f5f21315cbd5c6e7ed0dd66c91
MD5 2435e469ab6795dd267964b0b5c9a3da
BLAKE2b-256 a21bd31ab30e24f677c5541c6909c52f9697fd10605b8ced5d49fa4f3289ca6d

See more details on using hashes here.

File details

Details for the file dirconfig-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: dirconfig-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for dirconfig-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ac8191b0faa6b2167a0a8b2851d6b3ecb224f38bda2bcd55273dfb2c9e7fd131
MD5 721494b4d46499e44eab13f2ad224232
BLAKE2b-256 3b102cfc5312bdac2b2764128d682815ddeb18eb383da0939b34f487849a2a2a

See more details on using hashes here.

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