sleepyconvert 2.3.2__tar.gz → 2.3.3__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.
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/PKG-INFO +11 -2
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/README.md +10 -1
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/pyproject.toml +1 -1
- sleepyconvert-2.3.3/sleepyconvert/core/about.py +58 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/main.py +10 -4
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/LICENSE +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/__init__.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/cli/__init__.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/cli/command_logic.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/core/__init__.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/core/config.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/core/logging.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/core/sleepy_params.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/core/version.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/__init__.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/csv_json.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/csv_parquet.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/csv_pkl.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/csv_xlsx.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/data_shared.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/doc_shared.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/html_md.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/html_pdf.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/image_shared.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/json_parquet.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/json_pkl.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/json_xlsx.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/md_pdf.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/parquet_pkl.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/parquet_xlsx.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/pkl_xlsx.py +0 -0
- {sleepyconvert-2.3.2 → sleepyconvert-2.3.3}/sleepyconvert/utils/png_jpg.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sleepyconvert
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.3
|
|
4
4
|
Summary: Convert data files, images, and documents between formats from a single terse CLI.
|
|
5
5
|
License-Expression: GPL-3.0-or-later
|
|
6
6
|
License-File: LICENSE
|
|
@@ -62,7 +62,7 @@ Description-Content-Type: text/markdown
|
|
|
62
62
|
uv tool install sleepyconvert # or: pipx install sleepyconvert
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
> `-v` / `--version` prints the version and best-effort checks PyPI for a newer release — it works even when placed alongside the paths.
|
|
65
|
+
> `-v` / `--version` prints the version and best-effort checks PyPI for a newer release — it works even when placed alongside the paths. Run `sleepyconvert about` for the project's PyPI + GitHub links.
|
|
66
66
|
|
|
67
67
|
## Configure
|
|
68
68
|
|
|
@@ -130,6 +130,15 @@ Error: Input and output extensions must belong to the same type group.
|
|
|
130
130
|
Use `convert --help` to see the supported categories.
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
+
**About** — print the version and the project's public PyPI + GitHub links:
|
|
134
|
+
|
|
135
|
+
```console
|
|
136
|
+
$ sleepyconvert about
|
|
137
|
+
sleepyconvert 2.3.1
|
|
138
|
+
PyPI: https://pypi.org/project/sleepyconvert/
|
|
139
|
+
GitHub: https://github.com/anthonybench/convert
|
|
140
|
+
```
|
|
141
|
+
|
|
133
142
|
## Development
|
|
134
143
|
|
|
135
144
|
```sh
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
uv tool install sleepyconvert # or: pipx install sleepyconvert
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
> `-v` / `--version` prints the version and best-effort checks PyPI for a newer release — it works even when placed alongside the paths.
|
|
21
|
+
> `-v` / `--version` prints the version and best-effort checks PyPI for a newer release — it works even when placed alongside the paths. Run `sleepyconvert about` for the project's PyPI + GitHub links.
|
|
22
22
|
|
|
23
23
|
## Configure
|
|
24
24
|
|
|
@@ -86,6 +86,15 @@ Error: Input and output extensions must belong to the same type group.
|
|
|
86
86
|
Use `convert --help` to see the supported categories.
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
**About** — print the version and the project's public PyPI + GitHub links:
|
|
90
|
+
|
|
91
|
+
```console
|
|
92
|
+
$ sleepyconvert about
|
|
93
|
+
sleepyconvert 2.3.1
|
|
94
|
+
PyPI: https://pypi.org/project/sleepyconvert/
|
|
95
|
+
GitHub: https://github.com/anthonybench/convert
|
|
96
|
+
```
|
|
97
|
+
|
|
89
98
|
## Development
|
|
90
99
|
|
|
91
100
|
```sh
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sleepyconvert"
|
|
7
|
-
version = "2.3.
|
|
7
|
+
version = "2.3.3"
|
|
8
8
|
description = "Convert data files, images, and documents between formats from a single terse CLI."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""Public project links for the ``about`` pseudo-command.
|
|
2
|
+
|
|
3
|
+
sleepyconvert is a single-command CLI, so ``about`` is handled by a pre-scan in
|
|
4
|
+
the entrypoint (like ``--version``) rather than a Typer subcommand. The GitHub
|
|
5
|
+
URL is read from the installed package metadata (i.e. the ``[project.urls]``
|
|
6
|
+
entries) with a hardcoded fallback for running uninstalled from source; the PyPI
|
|
7
|
+
URL is derived from the distribution name.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from importlib.metadata import PackageNotFoundError, metadata
|
|
13
|
+
|
|
14
|
+
from sleepyconvert.core.version import DIST_NAME, getVersion
|
|
15
|
+
|
|
16
|
+
_GITHUB_FALLBACK = "https://github.com/anthonybench/convert"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def pypiUrl() -> str:
|
|
20
|
+
"""Return the public PyPI project URL."""
|
|
21
|
+
|
|
22
|
+
return f"https://pypi.org/project/{DIST_NAME}/"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def githubUrl() -> str:
|
|
26
|
+
"""Return the public GitHub URL from package metadata, or a fallback."""
|
|
27
|
+
|
|
28
|
+
try:
|
|
29
|
+
entries = metadata(DIST_NAME).get_all("Project-URL") or []
|
|
30
|
+
except PackageNotFoundError:
|
|
31
|
+
return _GITHUB_FALLBACK
|
|
32
|
+
|
|
33
|
+
labelled: dict[str, str] = {}
|
|
34
|
+
for entry in entries: # each entry looks like "Source, https://github.com/…"
|
|
35
|
+
label, _, url = entry.partition(",")
|
|
36
|
+
labelled[label.strip().lower()] = url.strip()
|
|
37
|
+
|
|
38
|
+
for key in ("source", "homepage", "repository"):
|
|
39
|
+
if "github.com" in labelled.get(key, ""):
|
|
40
|
+
return labelled[key]
|
|
41
|
+
for url in labelled.values():
|
|
42
|
+
if "github.com" in url:
|
|
43
|
+
return url
|
|
44
|
+
return _GITHUB_FALLBACK
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def wantsAbout(args) -> bool:
|
|
48
|
+
"""Return whether the first argument is the ``about`` pseudo-command."""
|
|
49
|
+
|
|
50
|
+
return bool(args) and args[0] == "about"
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def printAbout() -> None:
|
|
54
|
+
"""Print the project's version and public PyPI + GitHub links."""
|
|
55
|
+
|
|
56
|
+
print(f"{DIST_NAME} {getVersion()}")
|
|
57
|
+
print(f"PyPI: {pypiUrl()}")
|
|
58
|
+
print(f"GitHub: {githubUrl()}")
|
|
@@ -7,13 +7,14 @@ import sys
|
|
|
7
7
|
import typer
|
|
8
8
|
|
|
9
9
|
from sleepyconvert.cli.command_logic import runConversion
|
|
10
|
+
from sleepyconvert.core.about import printAbout, wantsAbout
|
|
10
11
|
from sleepyconvert.core.version import printVersion, wantsVersion
|
|
11
12
|
|
|
12
13
|
app = typer.Typer(
|
|
13
14
|
add_completion=False,
|
|
14
15
|
help=(
|
|
15
16
|
"Convert files between supported formats by passing an input and output path. "
|
|
16
|
-
"Pass -v/--version to print the version."
|
|
17
|
+
"Pass -v/--version to print the version, or `about` for project links."
|
|
17
18
|
),
|
|
18
19
|
)
|
|
19
20
|
|
|
@@ -28,13 +29,18 @@ def main(input_path: str, output_path: str) -> None:
|
|
|
28
29
|
def run() -> None:
|
|
29
30
|
"""Run the Typer application.
|
|
30
31
|
|
|
31
|
-
``-v``/``--version``
|
|
32
|
-
|
|
32
|
+
``-v``/``--version`` and the ``about`` pseudo-command are honored before Typer
|
|
33
|
+
parses (sleepyconvert is a single-command CLI, so they can't be real
|
|
34
|
+
subcommands); when present, the conversion is skipped.
|
|
33
35
|
"""
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
args = sys.argv[1:]
|
|
38
|
+
if wantsVersion(args):
|
|
36
39
|
printVersion()
|
|
37
40
|
return
|
|
41
|
+
if wantsAbout(args):
|
|
42
|
+
printAbout()
|
|
43
|
+
return
|
|
38
44
|
app()
|
|
39
45
|
|
|
40
46
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|