diff --git a/README.md b/README.md index 964f0fe..4f1c76e 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,24 @@ This is a little utility I use for logging my daily activities and events. It is written in Python. -Go ahead, make fun of me because this is "cringe". Whatever. I have the basilisks ready to deploy at the snap of my fingers, so you best watch yourself. 😾 - ## Install -Clone this repo and copy the `elog` binary to PATH somewhere. -Also edit line 32 for your desired elog directory: - -```python -elog_dir = Path("~//elog").expanduser() +```bash +python3 -m pip install elog ``` ## Usage -![usage_screenshot.png](/usage_screenshot.png) +```bash +usage: elog [-h] [-v] {add,edit,rm,ls,lsfiles,search} ... + +positional arguments: + {add,edit,rm,ls,lsfiles,search} + +options: + -h, --help show this help message and exit + -v, --version Print version information +``` ### Example list output ![screenshot.png](/screenshot.png) diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..22754de --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[metadata] +description-file=README.md +license_file=LICENSE \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..a8b10ce --- /dev/null +++ b/setup.py @@ -0,0 +1,18 @@ +from setuptools import setup, find_packages + + +setup( + name="elog", + version="0.0.2", + license="GPL-3.0", + author="Jeffrey Serio", + author_email="hyperreal@fedoraproject.org", + packages=find_packages("src"), + package_dir={"": "src"}, + url="https://github.com/hyperreal64/elog", + keywords="elog", + install_requires=[ + "jsonschema", + "rich", + ], +) \ No newline at end of file diff --git a/src/elog/__init__.py b/src/elog/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/elog/elog/__init__.py b/src/elog/elog/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/elog b/src/elog/elog/elog.py similarity index 95% rename from elog rename to src/elog/elog/elog.py index 08576ce..2506c43 100755 --- a/elog +++ b/src/elog/elog/elog.py @@ -1,18 +1,7 @@ -#!/usr/bin/env python3 - -# USAGE: elog [-h] [-v] {add,edit,rm,ls,lsfiles,search} ... -# -# positional arguments: -# {add,edit,rm,ls,lsfiles,search} -# -# options: -# -h, --help show this help message and exit -# -v, --version Print version information - - import argparse import datetime as dt import json +import os import sys import time from pathlib import Path @@ -26,10 +15,14 @@ from rich.traceback import install install(show_locals=True) -VERSION = "0.0.1" +VERSION = "0.0.2" default_date = dt.date.today().strftime("%Y-%m-%d") -elog_dir = Path("~/Nextcloud/elogs").expanduser() +ELOG_DIR = os.getenv("ELOG_DIR") +if ELOG_DIR is None: + elog_dir = Path("~/elogs").expanduser() +else: + elog_dir = Path(ELOG_DIR) elog_file = elog_dir.joinpath(default_date + "_elog").with_suffix(".json") diff --git a/usage_screenshot.png b/usage_screenshot.png deleted file mode 100644 index be82f28..0000000 Binary files a/usage_screenshot.png and /dev/null differ