Pythod
Table of Contents
Installation
You can install Pythod either by cloning the repository with:
git clone https://github.com/not-so-cool-anymore/pythod.git
and then run pip install . inside the repository.
Or you can install download and install it via Pip with:
pip install pythod
Usage
Configuration file
In order to properly organize a directory, the tool uses a configuration file that contains information about content types, indicators of those content types and the target folder into which they will be moved. The format of the default configuration file is the following:
{
"contents": [
{
"content_class": "<content_class_x>",
"target_directory": "<target_directory_x>",
"content_indicators": ["<indicator>", "<indicator>", "<indicator>"]
},
{
"content_class": "<content_class_y>",
"target_directory": "<target_directory_y>",
"content_indicators": ["<indicator>", "<indicator>", "<indicator>"]
}
]
}
Where content_class indicates the type of object that would be moved and must be either file or directory.
target_directory is the name of the directory in which files with matching content indicators will be moved.
content_indicators is an array of strings which contains indicators about a specific set of files. For directories, it is part of their names, and for files - their file extensions.
There is a default configuration file in the directory of the tool. The file contains the following:
{
"contents": [
{
"content_class": "file",
"indicators": [
"mkv",
"mp4",
"flv",
"avi",
"mov",
"mpg",
"amv",
"wmv",
"mov"
],
"target_directory": "movies_and_videos"
},
{
"content_class": "file",
"indicators": [
"jpg",
"jpeg",
"tiff",
"bat",
"gif",
"bmp",
"png",
"exif",
"svg"
],
"target_directory": "images"
},
{
"content_class": "file",
"indicators": ["txt", "doc", "docx", "md"],
"target_directory": "text_and_documents"
},
{
"content_class": "file",
"indicators": ["pdf"],
"target_directory": "pdfs"
},
{
"content_class": "file",
"indicators": ["zip", "rar", "tar", "gz"],
"target_directory": "archives"
},
{
"content_class": "file",
"indicators": ["exe", "bin", "msi"],
"target_directory": "executables"
},
{
"content_class": "directory",
"indicators": ["movie", "xvid", "brip", "dvdrip", "x264", "release"],
"target_directory": "movies_and_videos"
},
{
"content_class": "file",
"indicators": [
"cpp",
"c",
"cs",
"py",
"go",
"java",
"lua",
"rpy",
"sh",
"bas",
"pl",
"r",
"swift",
"pas",
"asm"
],
"target_directory": "source_files"
}
]
}
CLI usage
To use the tool type:
pythod --dir <ABS/PATH/TO/DIRECTORY/TO/ORGANIZE> --config <PATH/TO/CUSTOM/CONFIG/FILE>
Where --dir is required parameter and --config is optional. If --config is not provided, the default configuration will be loaded.
Metadata
Release files for pythod 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pythod-0.0.6.tar.gz | 4.3 kB | Without provenance | Details for pythod-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pythod-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for pythod-0.0.6-py3-none-any.whl |
Total release size: 22.7 kB
Release files / pythod-0.0.6.tar.gz
| Download URL | pythod-0.0.6.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6915dea8c2c401db0048c097d65b76bbc17e25864384b3d72370ccc0764ad73
|
|
BLAKE2b-256 checksum How to use checksums |
bf8d675add9c1cf93008786ce0f10ad5c5f806b80845fccf65bd49dcec3d3dd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9
|
Release files / pythod-0.0.6-py3-none-any.whl
| Download URL | pythod-0.0.6-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f79b75f310161fc20d99829e5b73b76ab5d32a92ff7167d734ad0fc1535b487
|
|
BLAKE2b-256 checksum How to use checksums |
2fd901ffe057f9df82cbaec31553c1e26edb97e3bdcc6d38c7cde95018e5ee17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9
|
Security for pythod 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.