From a98ba68f49a5f1808bf6b4a40886d37913c17e73 Mon Sep 17 00:00:00 2001 From: samedamci Date: Thu, 26 Aug 2021 22:25:06 +0200 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ LICENSE | 13 +++++++++++++ guzzy/__main__.py | 16 ++++++++++++++++ pyproject.toml | 30 ++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 guzzy/__main__.py create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..93163af --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.venv/ +.vscode/ +__pycache__/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2d31e15 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2021, samedamci + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/guzzy/__main__.py b/guzzy/__main__.py new file mode 100644 index 0000000..d0736e2 --- /dev/null +++ b/guzzy/__main__.py @@ -0,0 +1,16 @@ +from os import listdir, path +from argparse import ArgumentParser +from subprocess import call + +dir_path = path.join(path.dirname(path.realpath(__file__)), "commands") +commands = [x.replace(".sh", "") for x in listdir(dir_path)] + +parser = ArgumentParser( + prog="guzzy", + description="Interactive CLI git client inside fzf.", + allow_abbrev=False, +) +parser.add_argument("command", choices=commands) +args = parser.parse_args() + +call(path.join(dir_path, f"{args.command}.sh"), shell=True) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..763af08 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[tool.poetry] +name = "guzzy" +version = "0.1.0" +description = "Interactive CLI git client inside fzf." +authors = ["samedamci "] +license = "ISC" +homepage = "https://github.com/samedamci/guzzy" +repository = "https://github.com/samedamci/guzzy" +keywords = ["git", "fzf"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: ISC License (ISCL)", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Unix Shell", + "Intended Audience :: Developers", + "Topic :: Software Development :: Version Control", + "Topic :: Utilities", +] +include = ["LICENSE"] + +[tool.poetry.dependencies] +python = "^3.6" + +[tool.poetry.scripts] +guzzy = "guzzy:__main__" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api"