quickkit-tools 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/PKG-INFO +3 -1
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/README.md +2 -0
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/pyproject.toml +1 -1
- quickkit_tools-0.1.2/src/quickkit_tools/__init__.py +5 -0
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/src/quickkit_tools/cli.py +6 -4
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/src/quickkit_tools/text.py +5 -0
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/src/quickkit_tools.egg-info/PKG-INFO +3 -1
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/tests/test_text.py +5 -0
- quickkit_tools-0.1.0/src/quickkit_tools/__init__.py +0 -5
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/LICENSE +0 -0
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/setup.cfg +0 -0
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/src/quickkit_tools.egg-info/SOURCES.txt +0 -0
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/src/quickkit_tools.egg-info/dependency_links.txt +0 -0
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/src/quickkit_tools.egg-info/entry_points.txt +0 -0
- {quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/src/quickkit_tools.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quickkit-tools
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: A small collection of text utilities with a command-line interface
|
|
5
5
|
Author: Package Author
|
|
6
6
|
License-Expression: MIT
|
|
@@ -66,3 +66,5 @@ python -m twine upload dist/*
|
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
The name `quickkit-tools` is an example and may already be taken on PyPI.
|
|
69
|
+
|
|
70
|
+
Get the library version with `quickkit version` or `quickkit_tools.version_library()`.
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"""Command-line entry point."""
|
|
2
2
|
import argparse
|
|
3
|
-
from .text import slugify, word_count, reverse_text
|
|
3
|
+
from .text import slugify, word_count, reverse_text,version_library
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
def main() -> None:
|
|
7
7
|
parser = argparse.ArgumentParser(prog="quickkit", description="Simple text utilities")
|
|
8
|
-
parser.add_argument("action", choices=["slugify", "count", "reverse"])
|
|
9
|
-
parser.add_argument("text", help="Text to process")
|
|
8
|
+
parser.add_argument("action", choices=["slugify", "count", "reverse", "version"])
|
|
9
|
+
parser.add_argument("text", nargs="?", help="Text to process (not needed for version)")
|
|
10
10
|
args = parser.parse_args()
|
|
11
|
-
|
|
11
|
+
if args.action != "version" and args.text is None:
|
|
12
|
+
parser.error("text is required for this action")
|
|
13
|
+
result = {"slugify": slugify, "count": word_count, "reverse": reverse_text, "version": version_library}[args.action](args.text or "")
|
|
12
14
|
print(result)
|
|
13
15
|
|
|
14
16
|
|
|
@@ -17,3 +17,8 @@ def word_count(value: str) -> int:
|
|
|
17
17
|
def reverse_text(value: str) -> str:
|
|
18
18
|
"""Reverse a string."""
|
|
19
19
|
return value[::-1]
|
|
20
|
+
|
|
21
|
+
def version_library(value: str = "") -> str:
|
|
22
|
+
"""Return the installed quickkit-tools package version."""
|
|
23
|
+
from . import __version__
|
|
24
|
+
return __version__
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quickkit-tools
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: A small collection of text utilities with a command-line interface
|
|
5
5
|
Author: Package Author
|
|
6
6
|
License-Expression: MIT
|
|
@@ -66,3 +66,5 @@ python -m twine upload dist/*
|
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
The name `quickkit-tools` is an example and may already be taken on PyPI.
|
|
69
|
+
|
|
70
|
+
Get the library version with `quickkit version` or `quickkit_tools.version_library()`.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{quickkit_tools-0.1.0 → quickkit_tools-0.1.2}/src/quickkit_tools.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|