Skip to main content

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)

Release files for fileorganize 0.0.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 fileorganize 0.0.4
File Size Uploaded
fileorganize-0.0.4.tar.gz 6.6 kB Details

Built distribution (wheel)

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

Total release size: 13.6 kB

Release files / fileorganize-0.0.4.tar.gz

Download URL fileorganize-0.0.4.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a918fcf8d210b49de660532ce0c192b9a4ee6c17dbce4de7c7cfd3ca4cda0a59
BLAKE2b-256 checksum
How to use checksums
9de1916709d724cf4fbdcc79d9cabc7dd7c7470675ebbc3bc74d17dfa8384924
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / fileorganize-0.0.4-py3-none-any.whl

Download URL fileorganize-0.0.4-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a42fd8adcee9eaff674af2ee40a7f9bfa1091bbd838a2435a6b744db91e45cf
BLAKE2b-256 checksum
How to use checksums
d8f045e6017fa2370b467a6a6a206475068feccdd1cba8386e65af272aba8191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.0.4 This release

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