mirror of
https://codeberg.org/hyperreal/daily-event-logger
synced 2024-11-25 11:53:42 +01:00
Prepare for PyPi
This commit is contained in:
parent
52b001e526
commit
4db49a8de2
20
README.md
20
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.
|
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
|
## Install
|
||||||
Clone this repo and copy the `elog` binary to PATH somewhere.
|
|
||||||
|
|
||||||
Also edit line 32 for your desired elog directory:
|
```bash
|
||||||
|
python3 -m pip install elog
|
||||||
```python
|
|
||||||
elog_dir = Path("~/<your path>/elog").expanduser()
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## 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
|
### Example list output
|
||||||
![screenshot.png](/screenshot.png)
|
![screenshot.png](/screenshot.png)
|
||||||
|
3
setup.cfg
Normal file
3
setup.cfg
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[metadata]
|
||||||
|
description-file=README.md
|
||||||
|
license_file=LICENSE
|
18
setup.py
Normal file
18
setup.py
Normal file
@ -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",
|
||||||
|
],
|
||||||
|
)
|
0
src/elog/__init__.py
Normal file
0
src/elog/__init__.py
Normal file
0
src/elog/elog/__init__.py
Normal file
0
src/elog/elog/__init__.py
Normal file
@ -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 argparse
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -26,10 +15,14 @@ from rich.traceback import install
|
|||||||
|
|
||||||
install(show_locals=True)
|
install(show_locals=True)
|
||||||
|
|
||||||
VERSION = "0.0.1"
|
VERSION = "0.0.2"
|
||||||
|
|
||||||
default_date = dt.date.today().strftime("%Y-%m-%d")
|
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")
|
elog_file = elog_dir.joinpath(default_date + "_elog").with_suffix(".json")
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 70 KiB |
Loading…
Reference in New Issue
Block a user