Return formatted file and directory information.
Project description
Drive Catalog
Library to recursively read and return file and directory information about drives and folders.
License
drive-catalog is licensed under the GNU Affero General Public License v3.0
Installation
To install using pip:
> pip install drive-catalog
Usage Example
Call the application from the command-line without parameters returns:
> python drive_catalog
usage: main.py [-h] [--version] path [path ...]
main.py: error: the following arguments are required: path
Command-line help is provided by using the help directive:
> python drive_catalog --help
usage: main.py [-h] [--version] path [path ...]
Return formatted file information
positional arguments:
path The path of the drive or folder to process.
optional arguments:
-h, --help show this help message and exit
--version Show the version number and exit.
Call the application from the command-line with path. Note the testdrive folder contains public domain images, audio and video.
> python drive-catalog testdrive/
Path: /Users/bestep/3_Development/drive-catalog/testdrive
Drive Info: {'name': 'testdrive', 'total_files': 47, 'portable_drive': False, 'size': 499963174912, 'free': 60009164800, 'used': 423691579392, 'create_date': '2020-07-01T08:43:48.161025-04:00'}
p /Users/bestep/3_Development/drive-catalog/testdrive
File Info: [{'name': 'coffee_beans_coffee_drink.jpg', 'size': '147.8KiB', 'size_bytes': 151326, 'type': 'Image', 'path': '/Users/bestep/3_Development/drive-catalog/testdrive/coffee_beans_coffee_drink.jpg', 'thumbnail': '', 'create_date': '2020-06-30T23:09:33.792833-04:00', 'is_directory': False}, {'name': 'OTRR_An_Evening_With_Groucho_Singles', 'size': '1.3KiB', 'size_bytes': 1312, 'type': '', 'path': '/Users/bestep/3_Development/drive-catalog/testdrive/OTRR_An_Evening_With_Groucho_Singles', 'thumbnail': '', 'create_date': '2020-06-30T23:09:34.153570-04:00', 'is_directory': True}, {'name': 'new_york_skyline_usa.jpg', 'size': '141.2KiB', 'size_bytes': 144612, 'type': 'Image', 'path': '/Users/bestep/3_Development/drive-catalog/testdrive/new_york_skyline_usa.jpg', 'thumbnail': '', 'create_date': '2020-06-30T23:09:33.793437-04:00', 'is_directory': False},...]
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
drive-catalog-0.3.0.tar.gz
(4.6 kB
view details)
File details
Details for the file drive-catalog-0.3.0.tar.gz
.
File metadata
- Download URL: drive-catalog-0.3.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 057cabc62e37a8982eda8a8d95b111439b840acf5f124e1734b149926a0cbe27 |
|
MD5 | 7ef53ff7d8add3f72c1ffb5aed80c9cd |
|
BLAKE2b-256 | 2123da848ae8f8a37cf792577b42f23f72279c1c48fffff7945fcc01f30e20b4 |