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