sharex-cli 0.0.3__tar.gz → 0.0.4__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.
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/.gitignore +6 -4
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/PKG-INFO +33 -27
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/README.md +26 -23
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/pyproject.toml +59 -38
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/src/app.py +0 -1
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/src/sharex/__init__.py +0 -1
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/src/sharex/_version.py +1 -1
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/src/sharex/api.py +0 -1
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/src/sharex/cli.py +3 -5
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/LICENSE +0 -0
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/src/sharex/py.typed +0 -0
- {sharex_cli-0.0.3 → sharex_cli-0.0.4}/src/sharex/utils.py +0 -0
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
.idea/
|
|
3
3
|
*.iml
|
|
4
4
|
.vscode/
|
|
5
|
+
.*cache*
|
|
6
|
+
node_modules/
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
out/
|
|
5
10
|
.venv/
|
|
6
11
|
venv/
|
|
7
12
|
__pycache__/
|
|
8
13
|
*.egg-info/
|
|
9
|
-
build/
|
|
10
|
-
dist/
|
|
11
|
-
.*cache/
|
|
12
|
-
*.log
|
|
13
14
|
*.pyc
|
|
14
15
|
.coverage
|
|
15
16
|
coverage.xml
|
|
@@ -18,3 +19,4 @@ coverage.xml
|
|
|
18
19
|
/tests/files
|
|
19
20
|
/tests/fake.json
|
|
20
21
|
*.spec
|
|
22
|
+
win-version.txt
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: sharex-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: CLI to Upload Files to a ShareX Server using a ShareX Custom Uploader (.sxcu) Configuration File.
|
|
5
5
|
Project-URL: Changelog, https://github.com/cssnr/sharex-cli/releases
|
|
6
6
|
Project-URL: Discord, https://discord.gg/wXy6m2X8wY
|
|
7
7
|
Project-URL: Documentation, https://cssnr.github.io/sharex-cli/
|
|
8
|
+
Project-URL: Download, https://github.com/cssnr/sharex-cli/releases/latest
|
|
8
9
|
Project-URL: Funding, https://ko-fi.com/cssnr
|
|
9
10
|
Project-URL: GitHub, https://github.com/cssnr/sharex-cli
|
|
10
11
|
Project-URL: Homepage, https://cssnr.com/
|
|
11
12
|
Project-URL: Issues, https://github.com/cssnr/sharex-cli/issues
|
|
12
13
|
Author: Shane
|
|
13
|
-
License: MIT
|
|
14
|
+
License-Expression: MIT
|
|
14
15
|
License-File: LICENSE
|
|
15
16
|
Classifier: Natural Language :: English
|
|
16
17
|
Classifier: Operating System :: OS Independent
|
|
@@ -19,31 +20,34 @@ Classifier: Programming Language :: Python :: 3
|
|
|
19
20
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
21
|
Classifier: Typing :: Typed
|
|
21
22
|
Requires-Python: >=3.10
|
|
23
|
+
Requires-Dist: click<9,>=8
|
|
22
24
|
Requires-Dist: jsonpath-ng<2,>=1
|
|
23
25
|
Requires-Dist: pyperclip<2,>=1
|
|
24
26
|
Requires-Dist: requests<3,>=2
|
|
25
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: rich>=13.8.0
|
|
28
|
+
Requires-Dist: typer>=0.27.2
|
|
26
29
|
Description-Content-Type: text/markdown
|
|
27
30
|
|
|
28
31
|
[](https://pypi.org/project/sharex-cli/)
|
|
29
32
|
[](https://github.com/cssnr/sharex-cli/releases)
|
|
30
33
|
[](https://github.com/cssnr/sharex-cli?tab=readme-ov-file#readme)
|
|
31
|
-
[](https://github.com/cssnr/sharex-cli/releases/latest)
|
|
35
|
+
[](https://pypistats.org/packages/sharex-cli)
|
|
36
|
+
[](https://clickpy.clickhouse.com/dashboard/sharex-cli)
|
|
33
37
|
[](https://codecov.io/gh/cssnr/sharex-cli)
|
|
34
38
|
[](https://github.com/cssnr/sharex-cli/actions/workflows/lint.yaml)
|
|
35
39
|
[](https://github.com/cssnr/sharex-cli/actions/workflows/test.yaml)
|
|
36
40
|
[](https://pypi.org/project/sharex-cli/)
|
|
37
41
|
[](https://cssnr.github.io/sharex-cli/)
|
|
38
|
-
[](https://github.com/cssnr/sharex-cli/pulse)
|
|
43
|
+
[](https://github.com/cssnr/sharex-cli?tab=readme-ov-file#readme)
|
|
44
|
+
[](https://github.com/cssnr/sharex-cli?tab=readme-ov-file#readme)
|
|
45
|
+
[](https://github.com/cssnr/sharex-cli/graphs/contributors)
|
|
46
|
+
[](https://github.com/cssnr/sharex-cli/issues)
|
|
47
|
+
[](https://github.com/cssnr/sharex-cli/discussions)
|
|
48
|
+
[](https://github.com/cssnr/sharex-cli/forks)
|
|
49
|
+
[](https://github.com/cssnr/sharex-cli/stargazers)
|
|
50
|
+
[](https://cssnr.github.io/)
|
|
47
51
|
[](https://discord.gg/wXy6m2X8wY)
|
|
48
52
|
[](https://ko-fi.com/cssnr)
|
|
49
53
|
|
|
@@ -87,30 +91,32 @@ From PyPI: <https://pypi.org/p/sharex-cli>
|
|
|
87
91
|
|
|
88
92
|
```shell
|
|
89
93
|
pip install sharex-cli
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
```shell
|
|
93
94
|
uv tool install sharex-cli
|
|
94
95
|
```
|
|
95
96
|
|
|
96
|
-
From
|
|
97
|
+
From Homebrew: <https://github.com/cssnr/homebrew-tap>
|
|
97
98
|
|
|
98
99
|
```shell
|
|
99
|
-
|
|
100
|
+
brew install cssnr/tap/sharex-cli
|
|
100
101
|
```
|
|
101
102
|
|
|
103
|
+
From GitHub: <https://github.com/cssnr/sharex-cli/releases/latest>
|
|
104
|
+
|
|
102
105
|
```shell
|
|
103
|
-
|
|
106
|
+
curl https://i.jpillora.com/cssnr/sharex-cli! | bash
|
|
104
107
|
```
|
|
105
108
|
|
|
106
|
-
[
|
|
109
|
+
See [jpillora/installer](https://github.com/jpillora/installer) for more details.
|
|
110
|
+
Alternatively, you can manually download a release for your system.
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
- [Windows Installer](https://github.com/cssnr/sharex-cli/releases/latest/download/windows-installer.exe) _amd64_
|
|
113
|
+
- [Windows x86_64](https://github.com/cssnr/sharex-cli/releases/latest/download/windows-amd64.zip) _amd64_
|
|
114
|
+
- [macOS Apple Intel](https://github.com/cssnr/sharex-cli/releases/latest/download/macos-amd64.zip) _amd64_
|
|
115
|
+
- [macOS Apple Silicon](https://github.com/cssnr/sharex-cli/releases/latest/download/macos-arm64.zip) _arm64_
|
|
116
|
+
- [Linux x86_64](https://github.com/cssnr/sharex-cli/releases/latest/download/linux-amd64.zip) _amd64_
|
|
117
|
+
- [Linux ARM](https://github.com/cssnr/sharex-cli/releases/latest/download/linux-arm64.zip) _arm64_
|
|
109
118
|
|
|
110
|
-
|
|
111
|
-
- [macos-amd64.zip](https://github.com/cssnr/sharex-cli/releases/latest/download/macos-amd64.zip)
|
|
112
|
-
- [linux-amd64.zip](https://github.com/cssnr/sharex-cli/releases/latest/download/linux-amd64.zip)
|
|
113
|
-
- [linux-arm64.zip](https://github.com/cssnr/sharex-cli/releases/latest/download/linux-arm64.zip)
|
|
119
|
+
[](https://cssnr.github.io/sharex-cli/cli/#install)
|
|
114
120
|
|
|
115
121
|
## Configure<a id="configure"></a>
|
|
116
122
|
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
[](https://pypi.org/project/sharex-cli/)
|
|
2
2
|
[](https://github.com/cssnr/sharex-cli/releases)
|
|
3
3
|
[](https://github.com/cssnr/sharex-cli?tab=readme-ov-file#readme)
|
|
4
|
-
[](https://github.com/cssnr/sharex-cli/releases/latest)
|
|
5
|
+
[](https://pypistats.org/packages/sharex-cli)
|
|
6
|
+
[](https://clickpy.clickhouse.com/dashboard/sharex-cli)
|
|
6
7
|
[](https://codecov.io/gh/cssnr/sharex-cli)
|
|
7
8
|
[](https://github.com/cssnr/sharex-cli/actions/workflows/lint.yaml)
|
|
8
9
|
[](https://github.com/cssnr/sharex-cli/actions/workflows/test.yaml)
|
|
9
10
|
[](https://pypi.org/project/sharex-cli/)
|
|
10
11
|
[](https://cssnr.github.io/sharex-cli/)
|
|
11
|
-
[](https://github.com/cssnr/sharex-cli/pulse)
|
|
13
|
+
[](https://github.com/cssnr/sharex-cli?tab=readme-ov-file#readme)
|
|
14
|
+
[](https://github.com/cssnr/sharex-cli?tab=readme-ov-file#readme)
|
|
15
|
+
[](https://github.com/cssnr/sharex-cli/graphs/contributors)
|
|
16
|
+
[](https://github.com/cssnr/sharex-cli/issues)
|
|
17
|
+
[](https://github.com/cssnr/sharex-cli/discussions)
|
|
18
|
+
[](https://github.com/cssnr/sharex-cli/forks)
|
|
19
|
+
[](https://github.com/cssnr/sharex-cli/stargazers)
|
|
20
|
+
[](https://cssnr.github.io/)
|
|
20
21
|
[](https://discord.gg/wXy6m2X8wY)
|
|
21
22
|
[](https://ko-fi.com/cssnr)
|
|
22
23
|
|
|
@@ -60,30 +61,32 @@ From PyPI: <https://pypi.org/p/sharex-cli>
|
|
|
60
61
|
|
|
61
62
|
```shell
|
|
62
63
|
pip install sharex-cli
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
```shell
|
|
66
64
|
uv tool install sharex-cli
|
|
67
65
|
```
|
|
68
66
|
|
|
69
|
-
From
|
|
67
|
+
From Homebrew: <https://github.com/cssnr/homebrew-tap>
|
|
70
68
|
|
|
71
69
|
```shell
|
|
72
|
-
|
|
70
|
+
brew install cssnr/tap/sharex-cli
|
|
73
71
|
```
|
|
74
72
|
|
|
73
|
+
From GitHub: <https://github.com/cssnr/sharex-cli/releases/latest>
|
|
74
|
+
|
|
75
75
|
```shell
|
|
76
|
-
|
|
76
|
+
curl https://i.jpillora.com/cssnr/sharex-cli! | bash
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
[
|
|
79
|
+
See [jpillora/installer](https://github.com/jpillora/installer) for more details.
|
|
80
|
+
Alternatively, you can manually download a release for your system.
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
- [Windows Installer](https://github.com/cssnr/sharex-cli/releases/latest/download/windows-installer.exe) _amd64_
|
|
83
|
+
- [Windows x86_64](https://github.com/cssnr/sharex-cli/releases/latest/download/windows-amd64.zip) _amd64_
|
|
84
|
+
- [macOS Apple Intel](https://github.com/cssnr/sharex-cli/releases/latest/download/macos-amd64.zip) _amd64_
|
|
85
|
+
- [macOS Apple Silicon](https://github.com/cssnr/sharex-cli/releases/latest/download/macos-arm64.zip) _arm64_
|
|
86
|
+
- [Linux x86_64](https://github.com/cssnr/sharex-cli/releases/latest/download/linux-amd64.zip) _amd64_
|
|
87
|
+
- [Linux ARM](https://github.com/cssnr/sharex-cli/releases/latest/download/linux-arm64.zip) _arm64_
|
|
82
88
|
|
|
83
|
-
|
|
84
|
-
- [macos-amd64.zip](https://github.com/cssnr/sharex-cli/releases/latest/download/macos-amd64.zip)
|
|
85
|
-
- [linux-amd64.zip](https://github.com/cssnr/sharex-cli/releases/latest/download/linux-amd64.zip)
|
|
86
|
-
- [linux-arm64.zip](https://github.com/cssnr/sharex-cli/releases/latest/download/linux-arm64.zip)
|
|
89
|
+
[](https://cssnr.github.io/sharex-cli/cli/#install)
|
|
87
90
|
|
|
88
91
|
## Configure<a id="configure"></a>
|
|
89
92
|
|
|
@@ -3,7 +3,7 @@ name = "sharex-cli"
|
|
|
3
3
|
description = "CLI to Upload Files to a ShareX Server using a ShareX Custom Uploader (.sxcu) Configuration File."
|
|
4
4
|
readme = "README.md"
|
|
5
5
|
requires-python = ">=3.10"
|
|
6
|
-
license =
|
|
6
|
+
license = "MIT"
|
|
7
7
|
authors = [{ name = "Shane" }]
|
|
8
8
|
classifiers = [
|
|
9
9
|
"Natural Language :: English",
|
|
@@ -14,10 +14,12 @@ classifiers = [
|
|
|
14
14
|
"Typing :: Typed",
|
|
15
15
|
]
|
|
16
16
|
dependencies = [
|
|
17
|
+
"click>=8,<9",
|
|
17
18
|
"jsonpath-ng>=1,<2",
|
|
18
19
|
"pyperclip>=1,<2",
|
|
19
20
|
"requests>=2,<3",
|
|
20
|
-
"
|
|
21
|
+
"rich>=13.8.0",
|
|
22
|
+
"typer>=0.27.2",
|
|
21
23
|
]
|
|
22
24
|
dynamic = ["version"]
|
|
23
25
|
|
|
@@ -25,6 +27,7 @@ dynamic = ["version"]
|
|
|
25
27
|
Changelog = "https://github.com/cssnr/sharex-cli/releases"
|
|
26
28
|
Discord = "https://discord.gg/wXy6m2X8wY"
|
|
27
29
|
Documentation = "https://cssnr.github.io/sharex-cli/"
|
|
30
|
+
Download = "https://github.com/cssnr/sharex-cli/releases/latest"
|
|
28
31
|
Funding = "https://ko-fi.com/cssnr"
|
|
29
32
|
GitHub = "https://github.com/cssnr/sharex-cli"
|
|
30
33
|
Homepage = "https://cssnr.com/"
|
|
@@ -36,23 +39,23 @@ sharex-cli = "sharex.cli:app"
|
|
|
36
39
|
|
|
37
40
|
[dependency-groups]
|
|
38
41
|
dev = [
|
|
39
|
-
"bandit>=1.9.
|
|
40
|
-
"black>=
|
|
41
|
-
"coverage>=7.
|
|
42
|
-
"hatch>=1.
|
|
43
|
-
"isort>=
|
|
44
|
-
"mypy>=
|
|
45
|
-
"pyinstaller>=6.
|
|
46
|
-
"pyinstaller-versionfile>=3.0
|
|
47
|
-
"pytest>=9.
|
|
48
|
-
"ruff>=0.
|
|
49
|
-
"tombi>=
|
|
50
|
-
"toml-run>=0.0.
|
|
51
|
-
"ty>=0.0.
|
|
52
|
-
"typer>=0.
|
|
53
|
-
"types-pyperclip>=1.
|
|
54
|
-
"types-requests>=2.
|
|
55
|
-
"validate-pyproject[all]>=0.
|
|
42
|
+
"bandit>=1.9.4",
|
|
43
|
+
"black>=26.5.1",
|
|
44
|
+
"coverage>=7.16.1",
|
|
45
|
+
"hatch>=1.18.1",
|
|
46
|
+
"isort>=9.0.1",
|
|
47
|
+
"mypy>=2.3.1",
|
|
48
|
+
"pyinstaller>=6.22.3",
|
|
49
|
+
"pyinstaller-versionfile>=3.1.0",
|
|
50
|
+
"pytest>=9.1.1",
|
|
51
|
+
"ruff>=0.16.8",
|
|
52
|
+
"tombi>=1.5.5",
|
|
53
|
+
"toml-run>=0.0.2",
|
|
54
|
+
"ty>=0.0.83",
|
|
55
|
+
"typer>=0.27.2",
|
|
56
|
+
"types-pyperclip>=1.11.0.20260508",
|
|
57
|
+
"types-requests>=2.33.0.20260906",
|
|
58
|
+
"validate-pyproject[all]>=0.26",
|
|
56
59
|
]
|
|
57
60
|
|
|
58
61
|
# [build-system]
|
|
@@ -97,7 +100,6 @@ packages = ["src/sharex"]
|
|
|
97
100
|
# https://pycqa.github.io/isort/docs/configuration/options.html
|
|
98
101
|
[tool.isort]
|
|
99
102
|
profile = "black"
|
|
100
|
-
lines_after_imports = 2
|
|
101
103
|
src_paths = ["src", "test"]
|
|
102
104
|
skip = [".venv", ".github"]
|
|
103
105
|
|
|
@@ -122,23 +124,42 @@ extend-exclude = [".github"]
|
|
|
122
124
|
select = ["E4", "E7", "E9", "F", "B", "Q"]
|
|
123
125
|
|
|
124
126
|
[tool.scripts]
|
|
125
|
-
version = "pyivf-make_version --source-format yaml --metadata-source
|
|
126
|
-
|
|
127
|
+
win-version = "uv run pyivf-make_version --source-format yaml --metadata-source assets/win-version.yaml --outfile win-version.txt"
|
|
128
|
+
pyinstaller = "uv run pyinstaller -n sharex -i docs/favicon.ico src/app.py"
|
|
129
|
+
pathmgr = [
|
|
130
|
+
"mkdir dist || echo dist dir exists",
|
|
131
|
+
"wget https://github.com/Bill-Stewart/PathMgr/releases/download/v2.0.0/PathMgr-2.0.0.zip -O dist/pathmgr.zip",
|
|
132
|
+
"unzip dist/pathmgr.zip -d dist/PathMgr",
|
|
133
|
+
]
|
|
134
|
+
inno = ["iscc.exe installer.iss"]
|
|
135
|
+
test = ["uv run coverage run -m pytest", "uv run coverage report -m"]
|
|
136
|
+
clean = "rm -rf .cache dist site"
|
|
127
137
|
build = "uv run hatch build"
|
|
128
138
|
predocs = "rm -rf .cache site"
|
|
129
|
-
docs = "zensical serve --open"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
black
|
|
133
|
-
run
|
|
134
|
-
run
|
|
135
|
-
run
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
""
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
docs = "zensical serve --open --dev-addr 0.0.0.0:8000"
|
|
140
|
+
docs-build = "zensical build --clean"
|
|
141
|
+
format = [
|
|
142
|
+
"uv run black .",
|
|
143
|
+
"uv run isort -c .",
|
|
144
|
+
"uv run ruff format .",
|
|
145
|
+
"uv run tombi format .",
|
|
146
|
+
"which prettier && prettier --write . || echo missing prettier",
|
|
147
|
+
]
|
|
148
|
+
lint = [
|
|
149
|
+
"run bandit",
|
|
150
|
+
"run mypy",
|
|
151
|
+
"run ruff",
|
|
152
|
+
"run validate",
|
|
153
|
+
"run yamllint",
|
|
154
|
+
"which prettier && prettier --check . || echo missing prettier",
|
|
155
|
+
"uv run black --check .",
|
|
156
|
+
"uv run isort -c .",
|
|
157
|
+
"uv run tombi lint",
|
|
158
|
+
"uv run ty check -v .",
|
|
159
|
+
"uv lock --check",
|
|
160
|
+
]
|
|
161
|
+
bandit = "uv run bandit -c pyproject.toml -r ."
|
|
162
|
+
mypy = "uv run mypy ."
|
|
163
|
+
ruff = "uv run ruff check ."
|
|
164
|
+
validate = "uv run validate-pyproject pyproject.toml"
|
|
165
|
+
yamllint = "uv run yamllint -c .github/yamllint.yaml ."
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# The string "0.0.1" is used in .github/workflows/build.yaml
|
|
2
|
-
__version__ = "0.0.
|
|
2
|
+
__version__ = "0.0.4"
|
|
@@ -5,7 +5,7 @@ import sys
|
|
|
5
5
|
import tempfile
|
|
6
6
|
from json import JSONDecodeError
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Any, Dict, List, Optional
|
|
8
|
+
from typing import Annotated, Any, Dict, List, Optional, cast
|
|
9
9
|
|
|
10
10
|
import click
|
|
11
11
|
import pyperclip
|
|
@@ -14,13 +14,11 @@ from rich import print
|
|
|
14
14
|
from rich.console import Console
|
|
15
15
|
from rich.panel import Panel
|
|
16
16
|
from rich.table import Table
|
|
17
|
-
from typing_extensions import Annotated
|
|
18
17
|
|
|
19
18
|
from . import __doc__ as package_doc
|
|
20
19
|
from . import api, utils
|
|
21
20
|
from ._version import __version__
|
|
22
21
|
|
|
23
|
-
|
|
24
22
|
app = typer.Typer(
|
|
25
23
|
context_settings={"help_option_names": ["-h", "--help"]},
|
|
26
24
|
pretty_exceptions_show_locals=False,
|
|
@@ -79,7 +77,7 @@ def update_config(config_path: Path, config_files: List[Path]):
|
|
|
79
77
|
vprint(f"2 {user_config=}")
|
|
80
78
|
|
|
81
79
|
if not user_config:
|
|
82
|
-
res
|
|
80
|
+
res = cast(Optional[str], click.edit())
|
|
83
81
|
vprint(f"{res=}")
|
|
84
82
|
if res:
|
|
85
83
|
user_config = json.loads(res)
|
|
@@ -209,7 +207,7 @@ def main( # NOSONAR
|
|
|
209
207
|
# Process STDIN
|
|
210
208
|
file_name = _name or f"{utils.gen_rand(8)}.txt"
|
|
211
209
|
vprint(f"{file_name=}")
|
|
212
|
-
content =
|
|
210
|
+
content = sys.stdin
|
|
213
211
|
url = api.upload_file(config, file_name, content)
|
|
214
212
|
print(url)
|
|
215
213
|
copy_text(url)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|