From c52b62c384861ef58afb8712b6d7814899b84f8e Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Fri, 16 Dec 2022 21:36:48 +0500 Subject: [PATCH] Upload this project to PyPI (#2) --- .gitignore | 2 ++ pyproject.toml | 24 ++++++++++++++++++++++++ readme.md | 20 ++++++-------------- src/histd/__init__.py | 0 histd.py => src/histd/__main__.py | 0 5 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 .gitignore create mode 100644 pyproject.toml create mode 100644 src/histd/__init__.py rename histd.py => src/histd/__main__.py (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f4b24f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/dist +__pycache__ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2827d0e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[project] +name = "histd" +version = "0.0.1" +authors = [ + { name="Ivan Reshetnikov", email="ordinarydev@protonmail.com" }, +] +description = "A simple but useful personal diary application" +readme = "readme.md" +requires-python = ">=3.7" + +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: POSIX :: Linux", + "Topic :: Utilities", +] + +[project.urls] +"Homepage" = "https://github.com/ordinary-dev/histd" +"Bug Tracker" = "https://github.com/ordinary-dev/histd/issues" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" diff --git a/readme.md b/readme.md index 2b600b1..98f2388 100644 --- a/readme.md +++ b/readme.md @@ -16,31 +16,23 @@ tree ~/.local/share/histd ``` ## Usage -```sh -python3 histd.py +```bash +python -m histd ``` ## Installation -Recommended method -```sh -sudo cp histd.py /usr/local/bin/histd +```bash +pip install histd ``` -Risky way (without cloning the repository) -```sh -sudo curl -o /usr/local/bin/histd "https://raw.githubusercontent.com/ordinary-dev/histd/master/histd.py" -``` - -To create a new note, you can simply type `histd` in the terminal. - ## Backup To create an archive of all notes, run the following command: ```bash -histd backup +python -m histd backup ``` ## Merge all notes This command concatenates all files and prefixes each with the filename. ```bash -histd merge +python -m histd merge ``` diff --git a/src/histd/__init__.py b/src/histd/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/histd.py b/src/histd/__main__.py similarity index 100% rename from histd.py rename to src/histd/__main__.py