A collection of miscellaneous helpers.
Project description
misc
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 asMM/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 |
- Output file is saved to the parent directory of
--log-filepath
- Trimming will be aborted if
--out-filename
matches--log-filepath
- 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
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
sco1-misc-0.1.1.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file sco1-misc-0.1.1.tar.gz
.
File metadata
- Download URL: sco1-misc-0.1.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21bbbefce57b28b7b513548584a937e200837a32233d653de92dd04fc27571f4 |
|
MD5 | 707a87e82cba29f2393d701d1fc6caf8 |
|
BLAKE2b-256 | e259a85059dd2acab627ee1af76b2f304daee37a0e76905ea3174766dc6b0eec |
File details
Details for the file sco1_misc-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: sco1_misc-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00a6396f7688b88ee0841eec077794743ea23048dab581af67106a56f5a1a6bc |
|
MD5 | 6d3fc4724ad06d0857fe49f68729542b |
|
BLAKE2b-256 | f2fc425047841fe1f0c26e69b2cf26a371e924280041996f89ad3492505dde81 |