This commit is contained in:
Jeffrey Serio 2025-04-19 10:58:30 -05:00
parent 9c52f72181
commit 154280cec9
7 changed files with 32 additions and 342 deletions

4
.gitignore vendored
View File

@ -1,2 +1,4 @@
.venv
dist dist
src/*.egg-info src/*.egg-info
uv.lock

View File

@ -1 +0,0 @@
__version__ = '0.1.4'

View File

@ -1,4 +1,4 @@
"""elog - daily event logger.""" #!/usr/bin/env python3
import argparse import argparse
import datetime as dt import datetime as dt
@ -17,7 +17,7 @@ from rich.traceback import install
install(show_locals=True) install(show_locals=True)
VERSION = "0.1.4" VERSION = "0.1.5"
default_date = dt.date.today().strftime("%Y-%m-%d") default_date = dt.date.today().strftime("%Y-%m-%d")
ELOG_DIR = os.getenv("ELOG_DIR") ELOG_DIR = os.getenv("ELOG_DIR")
@ -74,9 +74,9 @@ def elog_list(args):
with open(selected_elog_file, "r") as ef: with open(selected_elog_file, "r") as ef:
json_data = json.load(ef) json_data = json.load(ef)
table = Table(style="green", header_style="bold", box=box.ROUNDED) table = Table(style="#5f00ff", header_style="bold", box=box.ROUNDED)
table.add_column("Index", justify="right", style="white") table.add_column("Index", justify="right", style="white")
table.add_column("Timestamp", justify="left", style="red") table.add_column("Timestamp", justify="left", style="#ff87d7")
table.add_column("Message", justify="left") table.add_column("Message", justify="left")
for i in range(len(json_data)): for i in range(len(json_data)):
@ -375,3 +375,7 @@ def main():
else: else:
args = parser.parse_args() args = parser.parse_args()
args.func(args) args.func(args)
if __name__ == "__main__":
main()

306
poetry.lock generated
View File

@ -1,306 +0,0 @@
[[package]]
name = "atomicwrites"
version = "1.4.1"
description = "Atomic file writes."
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "attrs"
version = "22.1.0"
description = "Classes Without Boilerplate"
category = "main"
optional = false
python-versions = ">=3.5"
[package.extras]
dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"]
docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"]
tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"]
[[package]]
name = "black"
version = "22.10.0"
description = "The uncompromising code formatter."
category = "dev"
optional = false
python-versions = ">=3.7"
[package.dependencies]
click = ">=8.0.0"
mypy-extensions = ">=0.4.3"
pathspec = ">=0.9.0"
platformdirs = ">=2"
tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""}
[package.extras]
colorama = ["colorama (>=0.4.3)"]
d = ["aiohttp (>=3.7.4)"]
jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]
uvloop = ["uvloop (>=0.15.2)"]
[[package]]
name = "click"
version = "8.1.3"
description = "Composable command line interface toolkit"
category = "dev"
optional = false
python-versions = ">=3.7"
[package.dependencies]
colorama = {version = "*", markers = "platform_system == \"Windows\""}
[[package]]
name = "colorama"
version = "0.4.6"
description = "Cross-platform colored terminal text."
category = "dev"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
[[package]]
name = "commonmark"
version = "0.9.1"
description = "Python parser for the CommonMark Markdown spec"
category = "main"
optional = false
python-versions = "*"
[package.extras]
test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"]
[[package]]
name = "flake8"
version = "5.0.4"
description = "the modular source code checker: pep8 pyflakes and co"
category = "dev"
optional = false
python-versions = ">=3.6.1"
[package.dependencies]
mccabe = ">=0.7.0,<0.8.0"
pycodestyle = ">=2.9.0,<2.10.0"
pyflakes = ">=2.5.0,<2.6.0"
[[package]]
name = "iniconfig"
version = "1.1.1"
description = "iniconfig: brain-dead simple config-ini parsing"
category = "dev"
optional = false
python-versions = "*"
[[package]]
name = "jsonschema"
version = "4.17.0"
description = "An implementation of JSON Schema validation for Python"
category = "main"
optional = false
python-versions = ">=3.7"
[package.dependencies]
attrs = ">=17.4.0"
pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2"
[package.extras]
format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"]
format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"]
[[package]]
name = "mccabe"
version = "0.7.0"
description = "McCabe checker, plugin for flake8"
category = "dev"
optional = false
python-versions = ">=3.6"
[[package]]
name = "mypy-extensions"
version = "0.4.3"
description = "Experimental type system extensions for programs checked with the mypy typechecker."
category = "dev"
optional = false
python-versions = "*"
[[package]]
name = "packaging"
version = "21.3"
description = "Core utilities for Python packages"
category = "dev"
optional = false
python-versions = ">=3.6"
[package.dependencies]
pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
[[package]]
name = "pathspec"
version = "0.10.1"
description = "Utility library for gitignore style pattern matching of file paths."
category = "dev"
optional = false
python-versions = ">=3.7"
[[package]]
name = "platformdirs"
version = "2.5.2"
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
category = "dev"
optional = false
python-versions = ">=3.7"
[package.extras]
docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"]
test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"]
[[package]]
name = "pluggy"
version = "1.0.0"
description = "plugin and hook calling mechanisms for python"
category = "dev"
optional = false
python-versions = ">=3.6"
[package.extras]
dev = ["pre-commit", "tox"]
testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "py"
version = "1.11.0"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "pycodestyle"
version = "2.9.1"
description = "Python style guide checker"
category = "dev"
optional = false
python-versions = ">=3.6"
[[package]]
name = "pyflakes"
version = "2.5.0"
description = "passive checker of Python programs"
category = "dev"
optional = false
python-versions = ">=3.6"
[[package]]
name = "pygments"
version = "2.13.0"
description = "Pygments is a syntax highlighting package written in Python."
category = "main"
optional = false
python-versions = ">=3.6"
[package.extras]
plugins = ["importlib-metadata"]
[[package]]
name = "pyparsing"
version = "3.0.9"
description = "pyparsing module - Classes and methods to define and execute parsing grammars"
category = "dev"
optional = false
python-versions = ">=3.6.8"
[package.extras]
diagrams = ["railroad-diagrams", "jinja2"]
[[package]]
name = "pyrsistent"
version = "0.19.2"
description = "Persistent/Functional/Immutable data structures"
category = "main"
optional = false
python-versions = ">=3.7"
[[package]]
name = "pytest"
version = "6.2.5"
description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false
python-versions = ">=3.6"
[package.dependencies]
atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""}
attrs = ">=19.2.0"
colorama = {version = "*", markers = "sys_platform == \"win32\""}
iniconfig = "*"
packaging = "*"
pluggy = ">=0.12,<2.0"
py = ">=1.8.2"
toml = "*"
[package.extras]
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"]
[[package]]
name = "rich"
version = "12.6.0"
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
category = "main"
optional = false
python-versions = ">=3.6.3,<4.0.0"
[package.dependencies]
commonmark = ">=0.9.0,<0.10.0"
pygments = ">=2.6.0,<3.0.0"
[package.extras]
jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"]
[[package]]
name = "toml"
version = "0.10.2"
description = "Python Library for Tom's Obvious, Minimal Language"
category = "dev"
optional = false
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
[[package]]
name = "tomli"
version = "2.0.1"
description = "A lil' TOML parser"
category = "dev"
optional = false
python-versions = ">=3.7"
[metadata]
lock-version = "1.1"
python-versions = "^3.10"
content-hash = "3eff85610f946b4b0f1b4ee7494d3a25ada567e05f67c99fa8554fd7c0d54047"
[metadata.files]
atomicwrites = []
attrs = []
black = []
click = []
colorama = []
commonmark = []
flake8 = []
iniconfig = []
jsonschema = []
mccabe = []
mypy-extensions = []
packaging = []
pathspec = []
platformdirs = []
pluggy = []
py = []
pycodestyle = []
pyflakes = []
pygments = []
pyparsing = []
pyrsistent = []
pytest = []
rich = []
toml = []
tomli = []

View File

@ -1,30 +1,26 @@
[tool.poetry] [project]
name = "daily-event-logger" name = "evlog"
version = "0.1.4" version = "0.1.5"
description = "A utility for logging daily tasks and events." authors = [
authors = ["Jeffrey Serio <hyperreal@fedoraproject.org>"] { name="Jeffrey Serio", email="hyperreal@moonshadow.dev" },
license = "GPL-3.0-or-later" ]
homepage = "https://github.com/hyperreal64/daily-event-logger" description = "A utility for logging daily events and tasks."
readme = "README.md" readme = "README.md"
repository = "https://github.com/hyperreal64/daily-event-logger" requires-python = ">=3.10"
classififers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
]
dependencies = ["jsonschema>=4.17.0", "rich>=12.6.0"]
[tool.poetry.dependencies] [project.scripts]
python = "^3.10" elog = "evlog:main"
jsonschema = "^4.17.0"
rich = "^12.6.0"
[tool.poetry.dev-dependencies] [project.urls]
pytest = "^6.2" Homepage = "https://git.hyperreal.coffee/hyperreal/daily-event-logger"
black = "^22.10.0" Issues = "https://git.hyperreal.coffee/hyperreal/daily-event-logger/issues"
flake8 = "^5.0.4"
[tool.poetry.scripts]
elog = "daily_event_logger.elog:main"
[build-system] [build-system]
requires = ["poetry-core>=1.0.0"] requires = ["hatchling"]
build-backend = "poetry.core.masonry.api" build-backend = "hatchling.build"
[flake8]
max-line-length = 88
extend-ignore = "E203"

View File

View File

@ -1,5 +0,0 @@
from daily_event_logger import __version__
def test_version():
assert __version__ == '0.1.0'