Skip to main content

Riordinato

Riordinato is a python library for organizing files with prefixes.

Installation

Use the package manager pip to install riordinato.

$ pip install riordinato 

Use the cli

Riordinato includes a cli so you can organize all your files from the terminal.

First you must go to the directory where you want riordinato to organize your files, then you must start the database with:

$ riordinato init

Now you have to add a prefix and a directory path.

$ riordinato add <prefix> <path>

Now to organize your files put:

$ riordinato organize

If you want to know more about the cli read the documentation here.

Usage

Riordinato is used to organize files by prefixes. For example, we want to move files that have the prefixes python and work.

/home/user/documents
    ├── pythonWork.py
    ├── python_examples.txt
    ├── family.jpg
    ├── dog.png
    ├── index.html
    ├── work_list.txt
    ├── any_work.docx
    ├── python_exercise.pdf
    ├── work_for_later.docx
    │
    ├── python/
    └── work/

First import riordinato

from riordinato import Riordinato

Define a directory where we have the files we want to move.

path = '/home/user/documents'

NOTE: You can also put a windows path.

Create the instance.

organize = Riordinato(path)

If you want to see the files that are in the path you can print the files attribute.

>>> print(organize.files)

['pythonWork.py', 'python_examples.txt', 'family.jpg', 'dog.png', 'index.html', 
'work_list.txt', 'any_work.docx', 'work_for_later.docx', 'python_exercise.pdf']

Now you have to create a prefix. to do it is the same when you create a new item for a dictionary, the key is the prefix and the value is the destination

organize.prefixes['python'] = './python'
organize.prefixes['work'] = './work' 

NOTE: Riordinato by default transforms all paths into an absolute path. This allows your program to run from any path.

To organize our files we use the movefiles method

organize.movefiles()

And our directory would look like this.

/home/user/documents
    ├── family.jpg
    ├── dog.png
    ├── index.html
    ├── any_work.docx          
    │
    ├── python/
    │   ├── python_exercise.pdf
    │   ├── pythonWork.py
    │   └── python_examples.txt
    └── work/
        ├── work_for_later.docx
        └── work_list.txt

If we want to move files with a specific prefix, use the "specific" parameter of the method.

organize.movefiles(specific='python')
/home/user/documents
    ├── family.jpg
    ├── dog.png
    ├── index.html
    ├── work_list.txt
    ├── work_for_later.docx
    ├── any_work.docx
    │
    ├── python/
    │   ├── python_exercise.pdf
    │   ├── pythonWork.py
    │   └── python_examples.txt
    └── work/

You can also ignore files that contain a certain prefix. In this case we will ignore the files that contain the python prefix.

organize.movefile(ignore='python')
/home/user/documents
    ├── pythonWork.py
    ├── python_examples.txt
    ├── family.jpg
    ├── dog.png
    ├── index.html
    ├── any_work.docx
    ├── python_exercise.pdf
    │
    ├── python/
    └── work/
        ├── work_for_later.docx
        └── work_list.txt

NOTE: the specific and ignore parameters are also compatible with lists.

Contributing

A contributing.md will be added soon.

License

MIT

Release files for riordinato 1.7.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for riordinato 1.7.4
File Size Uploaded
riordinato-1.7.4.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for riordinato 1.7.4
File Interpreter ABI Platform
riordinato-1.7.4-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / riordinato-1.7.4.tar.gz

Download URL riordinato-1.7.4.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d5164e81eab216997dc3d32b116981b485c26aedc1b7d61fdefbeff1558a4c34
BLAKE2b-256 checksum
How to use checksums
721a61b27c7ada599ea30e618908e7d02bf7bd6863530f2bcdaacf7924a910d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.2 Linux/5.4.0-40-generic

Release files / riordinato-1.7.4-py3-none-any.whl

Download URL riordinato-1.7.4-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d1d57865cd65143f778946d4e7751c49c9db343c0444c62cec5b0fe9055f199
BLAKE2b-256 checksum
How to use checksums
038458dcf856c7c4a087e1ec75331a84f72adedfe82d2d6e921691dc570cd2e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.2 Linux/5.4.0-40-generic

Release history Release notifications | RSS feed

This release

1.7.4 This release

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page