Utility functions for corpus and experiment file management in Python
Project description
fileorganize
Utility functions for corpus and experiment file management in Python.
Installation
pip install fileorganize
Documentation
Examples
from fileorganize import dir_to_df
# Get all files in `mypath` as a dataframe
df = dir_to_df(mypath)
# Get all `.wav` files in `mypath` as a dataframe
df = dir_to_df(mypath, fnpat=r'\.wav$')
# Get all `.wav` files in `mypath` and extract named captures as
# categorical `subj` and `token` columns
df = dir_to_df(
mypath,
fnpat=r'(?P<subj>[A-Z]+\d+)-(?P<token>\d+)\.wav$'
)
from fileorganize import today_YYYYMMDD, timestamp_now
# Get today's date in YYYYMMDD format
todaystr = today_YYYYMMDD()
# Get timestamp as YYYY-MM-DDTHHMMSS string and UTC offset for current
# the current datetime
tstamp, utcoffset = timestamp_now()
from fileorganize import cp_backup
# Copy a file to a backup directory with a version number
copyname = cp_backup(origfile, backupdir)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fileorganize-0.0.4.tar.gz
(6.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fileorganize-0.0.4.tar.gz.
File metadata
- Download URL: fileorganize-0.0.4.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a918fcf8d210b49de660532ce0c192b9a4ee6c17dbce4de7c7cfd3ca4cda0a59
|
|
| MD5 |
a44f6657d4e304deb70f08b9ec66d12b
|
|
| BLAKE2b-256 |
9de1916709d724cf4fbdcc79d9cabc7dd7c7470675ebbc3bc74d17dfa8384924
|
File details
Details for the file fileorganize-0.0.4-py3-none-any.whl.
File metadata
- Download URL: fileorganize-0.0.4-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a42fd8adcee9eaff674af2ee40a7f9bfa1091bbd838a2435a6b744db91e45cf
|
|
| MD5 |
4d01e2ff20310c0daa98cd9bea54eb71
|
|
| BLAKE2b-256 |
d8f045e6017fa2370b467a6a6a206475068feccdd1cba8386e65af272aba8191
|