Skip to main content

A collection of miscellaneous helpers.

Project description

misc

PyPI - Python Version PyPI PyPI - License pre-commit.ci status Code style: black Open in Visual Studio Code

A collection of miscellaneous helpers.

The Help

sco1_misc.prompts

Helper wrappers for Tkinter's selection dialogs

  • prompt_for_file(title: str, start_dir: pathlib.Path, multiple: bool, filetypes: list[tuple[str, str]])
  • prompt_for_dir(title: str, start_dir: pathlib.Path)

csvdatetrim

A CLI tool for date windowing CSV log files

NOTE: The following assumptions are made about the input CSV file:

  • The CSV file contains a column named "Time", with timestamps formatted as MM/DD/YYYY HH:MM:SS
  • The CSV file ends on the same date as the specified date filter

Input Parameters

Parameter Description Type Default
--log-filepath Path to log file to trim. Path|None GUI Prompt
--test_date Trim date selection, as YYYY-MM-DD. str Today's date
--out-filename Output filename.1,2,3 str|None <in_filename>_<test_date>.csv
  1. Output file is saved to the parent directory of --log-filepath
  2. Trimming will be aborted if --out-filename matches --log-filepath
  3. Any existing data will be discarded

Contributing

Development Environment

This project uses Poetry to manage dependencies. With your fork cloned to your local machine, you can install the project and its dependencies to create a development environment using:

$ poetry install

A pre-commit configuration is also provided to create a pre-commit hook so linting errors aren't committed:

$ pre-commit install

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

sco1-misc-0.1.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

sco1_misc-0.1.1-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page