plexer-cli 0.0.3.post5__tar.gz → 0.1.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.
- plexer_cli-0.1.3/.github/ISSUE_TEMPLATE/bug_report.yaml +34 -0
- plexer_cli-0.1.3/.github/ISSUE_TEMPLATE/feature_request.yaml +29 -0
- plexer_cli-0.1.3/.github/PULL_REQUEST_TEMPLATE.md +7 -0
- plexer_cli-0.1.3/.github/dependabot.yml +23 -0
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/.github/workflows/openssf_scorecard.yml +6 -6
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/.github/workflows/release.yml +31 -21
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/.github/workflows/run_full_test_suite.yml +16 -12
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/.gitignore +0 -3
- plexer_cli-0.1.3/.pre-commit-config.yaml +12 -0
- plexer_cli-0.1.3/.python-version +1 -0
- plexer_cli-0.1.3/.tool-versions +1 -0
- plexer_cli-0.1.3/.trivyignore.yaml +2 -0
- plexer_cli-0.1.3/.vscode/launch.json +42 -0
- plexer_cli-0.1.3/.vscode/plexer-cli.code-workspace +11 -0
- plexer_cli-0.1.3/.vscode/settings.json +7 -0
- plexer_cli-0.1.3/Dockerfile +45 -0
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/PKG-INFO +36 -26
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/README.md +23 -17
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/pyproject.toml +32 -21
- plexer_cli-0.1.3/src/plexer_cli/const.py +26 -0
- plexer_cli-0.1.3/src/plexer_cli/file_manager.py +251 -0
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/src/plexer_cli/main.py +34 -11
- plexer_cli-0.1.3/src/plexer_cli/metadata.py +136 -0
- plexer_cli-0.1.3/tests/bootstrap/blank.mkv +0 -0
- plexer_cli-0.1.3/tests/bootstrap/blank.mp4 +0 -0
- plexer_cli-0.1.3/tests/bootstrap/bootstrap_plexer_e2e.sh +23 -0
- plexer_cli-0.1.3/tests/test_artifact.py +106 -0
- plexer_cli-0.1.3/tests/test_file_manager.py +227 -0
- plexer_cli-0.1.3/tests/test_metadata.py +155 -0
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/tox.ini +21 -7
- plexer_cli-0.1.3/trivyignore.yaml +2 -0
- plexer_cli-0.1.3/uv.lock +788 -0
- plexer_cli-0.0.3.post5/.codacy.yml +0 -6
- plexer_cli-0.0.3.post5/.github/ISSUE_TEMPLATE/bug_report.md +0 -26
- plexer_cli-0.0.3.post5/.github/ISSUE_TEMPLATE/feature_request.md +0 -21
- plexer_cli-0.0.3.post5/.github/PULL_REQUEST_TEMPLATE.md +0 -13
- plexer_cli-0.0.3.post5/.github/dependabot.yml +0 -6
- plexer_cli-0.0.3.post5/.pre-commit-config.yaml +0 -9
- plexer_cli-0.0.3.post5/=1.2 +0 -39
- plexer_cli-0.0.3.post5/Dockerfile +0 -38
- plexer_cli-0.0.3.post5/src/plexer_cli/const.py +0 -7
- plexer_cli-0.0.3.post5/src/plexer_cli/file_manager.py +0 -131
- plexer_cli-0.0.3.post5/src/plexer_cli/metadata.py +0 -41
- plexer_cli-0.0.3.post5/tests/test_file_manager.py +0 -117
- plexer_cli-0.0.3.post5/tests/test_metadata.py +0 -47
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/CODE_OF_CONDUCT.md +0 -0
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/LICENSE +0 -0
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/SECURITY.md +0 -0
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/src/plexer_cli/__init__.py +0 -0
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/src/plexer_cli/artifact.py +0 -0
- {plexer_cli-0.0.3.post5 → plexer_cli-0.1.3}/tests/conftest.py +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
about: Report a bug that you've found in this application.
|
|
3
|
+
title: 'Bug: '
|
|
4
|
+
labels: bug
|
|
5
|
+
projects: "magneticstain/5"
|
|
6
|
+
assignees: magneticstain
|
|
7
|
+
type: bug
|
|
8
|
+
body:
|
|
9
|
+
- type: textarea
|
|
10
|
+
id: description
|
|
11
|
+
attributes:
|
|
12
|
+
label: Description
|
|
13
|
+
description: A clear and concise description of what the bug is, what component it's in, etc.
|
|
14
|
+
validations:
|
|
15
|
+
required: true
|
|
16
|
+
- type: textarea
|
|
17
|
+
id: steps_to_reproduce
|
|
18
|
+
attributes:
|
|
19
|
+
label: Steps To Reproduce
|
|
20
|
+
description: Steps to reproduce the behavior.
|
|
21
|
+
placeholder: |
|
|
22
|
+
1. Go to '...'
|
|
23
|
+
2. Click on '....'
|
|
24
|
+
3. Scroll down to '....'
|
|
25
|
+
4. See error
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: textarea
|
|
29
|
+
id: expected_behavior
|
|
30
|
+
attributes:
|
|
31
|
+
label: Expected Behavior
|
|
32
|
+
description: A clear and concise description of what was expected to happen.
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
about: Suggest an new feature for this project
|
|
3
|
+
title: 'Feat: '
|
|
4
|
+
labels: feature
|
|
5
|
+
projects: "magneticstain/5"
|
|
6
|
+
assignees: magneticstain
|
|
7
|
+
type: feature
|
|
8
|
+
body:
|
|
9
|
+
- type: textarea
|
|
10
|
+
id: summary
|
|
11
|
+
attributes:
|
|
12
|
+
label: Summary
|
|
13
|
+
description: What does this feature intend to do?
|
|
14
|
+
validations:
|
|
15
|
+
required: true
|
|
16
|
+
- type: textarea
|
|
17
|
+
id: benefit
|
|
18
|
+
attributes:
|
|
19
|
+
label: Benefit
|
|
20
|
+
description: What is the benefit of implementing this?
|
|
21
|
+
validations:
|
|
22
|
+
required: true
|
|
23
|
+
- type: textarea
|
|
24
|
+
id: additional_context
|
|
25
|
+
attributes:
|
|
26
|
+
label: Additional Context
|
|
27
|
+
description: Add any other context, links, or screenshots about the feature request here.
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
schedule:
|
|
5
|
+
interval: "weekly"
|
|
6
|
+
target-branch: "main"
|
|
7
|
+
commit-message:
|
|
8
|
+
prefix: "chore"
|
|
9
|
+
include: "scope"
|
|
10
|
+
labels:
|
|
11
|
+
- "dependencies"
|
|
12
|
+
- "security"
|
|
13
|
+
- package-ecosystem: "uv"
|
|
14
|
+
directory: "/"
|
|
15
|
+
schedule:
|
|
16
|
+
interval: "weekly"
|
|
17
|
+
target-branch: "main"
|
|
18
|
+
commit-message:
|
|
19
|
+
prefix: "chore"
|
|
20
|
+
include: "scope"
|
|
21
|
+
labels:
|
|
22
|
+
- "dependencies"
|
|
23
|
+
- "security"
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
name: Scorecard supply-chain security scan
|
|
6
6
|
on:
|
|
7
|
-
schedule:
|
|
8
|
-
|
|
7
|
+
# schedule:
|
|
8
|
+
# - cron: '0 0 * * *' # run a scan everyday at 00:00 UTC
|
|
9
9
|
push:
|
|
10
10
|
branches: [ main ]
|
|
11
11
|
|
|
@@ -23,25 +23,25 @@ jobs:
|
|
|
23
23
|
|
|
24
24
|
steps:
|
|
25
25
|
- name: "Checkout code"
|
|
26
|
-
uses: actions/checkout@
|
|
26
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
27
27
|
with:
|
|
28
28
|
persist-credentials: false
|
|
29
29
|
|
|
30
30
|
- name: "Run analysis"
|
|
31
|
-
uses: ossf/scorecard-action@
|
|
31
|
+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
|
32
32
|
with:
|
|
33
33
|
results_file: results.sarif
|
|
34
34
|
results_format: sarif
|
|
35
35
|
publish_results: true
|
|
36
36
|
|
|
37
37
|
- name: "Upload artifact"
|
|
38
|
-
uses: actions/upload-artifact@
|
|
38
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
39
39
|
with:
|
|
40
40
|
name: SARIF file
|
|
41
41
|
path: results.sarif
|
|
42
42
|
retention-days: 5
|
|
43
43
|
|
|
44
44
|
- name: "Upload to code-scanning"
|
|
45
|
-
uses: github/codeql-action/upload-sarif@
|
|
45
|
+
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
|
|
46
46
|
with:
|
|
47
47
|
sarif_file: results.sarif
|
|
@@ -6,6 +6,9 @@ on:
|
|
|
6
6
|
tags:
|
|
7
7
|
- 'v*'
|
|
8
8
|
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
9
12
|
jobs:
|
|
10
13
|
release:
|
|
11
14
|
name: Generate New Release - ${{ github.ref_name }}
|
|
@@ -19,28 +22,31 @@ jobs:
|
|
|
19
22
|
packages: write # required for pushing image to GHCR
|
|
20
23
|
|
|
21
24
|
steps:
|
|
22
|
-
- uses: actions/checkout@
|
|
25
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
23
26
|
with:
|
|
24
27
|
fetch-depth: 0
|
|
28
|
+
|
|
29
|
+
- name: Install uv
|
|
30
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
31
|
+
with:
|
|
32
|
+
enable-cache: true
|
|
25
33
|
|
|
26
34
|
- name: Setup python for build
|
|
27
|
-
|
|
28
|
-
with:
|
|
29
|
-
python-version: "3.x"
|
|
35
|
+
run: uv python install
|
|
30
36
|
|
|
31
37
|
# run tests
|
|
32
|
-
- name: Install
|
|
33
|
-
run:
|
|
38
|
+
- name: Install build deps
|
|
39
|
+
run: uv sync --group build --dev
|
|
34
40
|
|
|
35
41
|
- name: Setup test suite
|
|
36
|
-
run: tox -vv --notest -e test
|
|
42
|
+
run: uvx tox -vv --notest -e test
|
|
37
43
|
|
|
38
44
|
- name: Run test suite
|
|
39
|
-
run: tox --skip-pkg-install -e test
|
|
45
|
+
run: uvx tox --skip-pkg-install -e test
|
|
40
46
|
|
|
41
47
|
# build and publish
|
|
42
48
|
- name: Install Hatch
|
|
43
|
-
run: pipx install hatch
|
|
49
|
+
run: uvx pipx install hatch
|
|
44
50
|
|
|
45
51
|
- name: Build dist artifacts
|
|
46
52
|
run: hatch build
|
|
@@ -48,22 +54,23 @@ jobs:
|
|
|
48
54
|
# PyPI Release
|
|
49
55
|
# required instead of using hatch due to usage of trusted publishers
|
|
50
56
|
- name: Publish to TestPyPI
|
|
51
|
-
uses: pypa/gh-action-pypi-publish@
|
|
57
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
52
58
|
with:
|
|
53
59
|
repository-url: https://test.pypi.org/legacy/
|
|
54
60
|
print-hash: true
|
|
55
61
|
verbose: true
|
|
62
|
+
attestations: false
|
|
56
63
|
|
|
57
64
|
- name: Publish to PyPI
|
|
58
|
-
uses: pypa/gh-action-pypi-publish@
|
|
65
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
59
66
|
with:
|
|
60
67
|
attestations: true
|
|
61
68
|
|
|
62
69
|
# Github Release
|
|
63
70
|
- name: Create Github Release
|
|
64
|
-
uses: softprops/action-gh-release@
|
|
71
|
+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
|
|
65
72
|
with:
|
|
66
|
-
name:
|
|
73
|
+
name: ${{ github.ref_name }}
|
|
67
74
|
files: |
|
|
68
75
|
dist/*
|
|
69
76
|
fail_on_unmatched_files: true
|
|
@@ -72,6 +79,7 @@ jobs:
|
|
|
72
79
|
|
|
73
80
|
# Docker Release
|
|
74
81
|
# REF: https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-docker-images#publishing-images-to-docker-hub-and-github-packages
|
|
82
|
+
## Uploads to Docker.io and ghcr.io (GitHub Container Registry)
|
|
75
83
|
- name: Log in to Docker Hub
|
|
76
84
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
77
85
|
with:
|
|
@@ -87,10 +95,10 @@ jobs:
|
|
|
87
95
|
|
|
88
96
|
- name: Extract metadata (tags, labels) for Docker
|
|
89
97
|
id: meta
|
|
90
|
-
uses: docker/metadata-action@
|
|
98
|
+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
|
91
99
|
with:
|
|
92
100
|
images: |
|
|
93
|
-
magneticstain
|
|
101
|
+
magneticstain/${{ github.repository }}
|
|
94
102
|
ghcr.io/${{ github.repository }}
|
|
95
103
|
|
|
96
104
|
- name: Build and push Docker images to all registries
|
|
@@ -99,13 +107,15 @@ jobs:
|
|
|
99
107
|
with:
|
|
100
108
|
context: .
|
|
101
109
|
push: true
|
|
110
|
+
# provenance: mode=max
|
|
111
|
+
# sbom: true
|
|
102
112
|
tags: ${{ steps.meta.outputs.tags }}
|
|
103
113
|
labels: ${{ steps.meta.outputs.labels }}
|
|
104
114
|
|
|
105
|
-
- name: Generate artifact attestation
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
# - name: Generate artifact attestation
|
|
116
|
+
# uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
|
|
117
|
+
# with:
|
|
118
|
+
# subject-name: ghcr.io/${{ github.repository }}
|
|
119
|
+
# subject-digest: ${{ steps.push.outputs.digest }}
|
|
120
|
+
# push-to-registry: true
|
|
111
121
|
|
|
@@ -18,31 +18,35 @@ jobs:
|
|
|
18
18
|
strategy:
|
|
19
19
|
matrix:
|
|
20
20
|
py:
|
|
21
|
+
# - "3.15"
|
|
22
|
+
- "3.14"
|
|
23
|
+
- "3.13"
|
|
21
24
|
- "3.12"
|
|
22
25
|
- "3.11"
|
|
23
26
|
- "3.10"
|
|
24
|
-
- "3.9"
|
|
25
27
|
os:
|
|
26
28
|
- ubuntu-latest
|
|
27
29
|
|
|
28
30
|
steps:
|
|
29
|
-
- uses: actions/checkout@
|
|
31
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
30
32
|
with:
|
|
31
33
|
fetch-depth: 0
|
|
32
|
-
|
|
33
|
-
- name:
|
|
34
|
-
uses:
|
|
34
|
+
|
|
35
|
+
- name: Install uv and set python versions
|
|
36
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
35
37
|
with:
|
|
36
38
|
python-version: ${{ matrix.py }}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
enable-cache: true
|
|
40
|
+
|
|
41
|
+
- name: Setup python for build
|
|
42
|
+
run: uv python install
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
# run tests
|
|
45
|
+
- name: Install build deps
|
|
46
|
+
run: uv sync --group build --dev
|
|
43
47
|
|
|
44
48
|
- name: Setup test suite
|
|
45
|
-
run: tox -vv --notest -e test
|
|
49
|
+
run: uvx tox -vv --notest -e test
|
|
46
50
|
|
|
47
51
|
- name: Run test suite
|
|
48
|
-
run: tox --skip-pkg-install -e test
|
|
52
|
+
run: uvx tox --skip-pkg-install -e test
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.15.1
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff-format
|
|
6
|
+
- id: ruff-check
|
|
7
|
+
args: [ --fix ]
|
|
8
|
+
# REF: https://docs.astral.sh/uv/guides/integration/pre-commit/
|
|
9
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
10
|
+
rev: 0.10.2
|
|
11
|
+
hooks:
|
|
12
|
+
- id: uv-lock
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
uv 0.10.2
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
|
|
5
|
+
{
|
|
6
|
+
"name": "Run w/ Tmp Dirs",
|
|
7
|
+
"type": "debugpy",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"module": "plexer_cli.main",
|
|
10
|
+
"args": [
|
|
11
|
+
"--source-dir", "/tmp/plexer-e2e/plexer-cli-test",
|
|
12
|
+
"--destination-dir", "/tmp/plexer-e2e/plexer-cli-test-dst",
|
|
13
|
+
"-vv"
|
|
14
|
+
],
|
|
15
|
+
"justMyCode": true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Dry Run w/ Tmp Dirs",
|
|
19
|
+
"type": "debugpy",
|
|
20
|
+
"request": "launch",
|
|
21
|
+
"module": "plexer_cli.main",
|
|
22
|
+
"args": [
|
|
23
|
+
"--source-dir", "/tmp/plexer-e2e/plexer-cli-test",
|
|
24
|
+
"--destination-dir", "/tmp/plexer-e2e/plexer-cli-test-dst",
|
|
25
|
+
"--dry-run", "-vv"
|
|
26
|
+
],
|
|
27
|
+
"justMyCode": true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "Dry Run w/ Tmp Dirs - Prompt All",
|
|
31
|
+
"type": "debugpy",
|
|
32
|
+
"request": "launch",
|
|
33
|
+
"module": "plexer_cli.main",
|
|
34
|
+
"args": [
|
|
35
|
+
"--source-dir", "/tmp/plexer-e2e/plexer-cli-test",
|
|
36
|
+
"--destination-dir", "/tmp/plexer-e2e/plexer-cli-test-dst",
|
|
37
|
+
"--prompt=all", "--dry-run", "-vv"
|
|
38
|
+
],
|
|
39
|
+
"justMyCode": true,
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1
|
|
2
|
+
|
|
3
|
+
FROM ghcr.io/astral-sh/uv:alpine3.23@sha256:7d1ef166503c3c123a51f17d4eeb4dc748c33ebf4ae3bfad54f1163e1c36afcb AS build
|
|
4
|
+
|
|
5
|
+
WORKDIR /build
|
|
6
|
+
|
|
7
|
+
# we are unable to use the --require-hashes option as there is no local file defining the hashes
|
|
8
|
+
# this is what pip uses for comparison by default.
|
|
9
|
+
# However, it can compare the hash against PyPI's hash.
|
|
10
|
+
# Since PyPI sends requests over TLS, this should be secure enough for our threat model.
|
|
11
|
+
# https://pypi.org/project/pipx/
|
|
12
|
+
# RUN pip install pipx==1.7.1 --hash=sha256:a575ced25c507c1b1c978269f5684b5b291e81e3cd14eb3cee196a3c5b304732
|
|
13
|
+
RUN uv sync --group build
|
|
14
|
+
# https://pipx.pypa.io/latest/how-to/pin-packages.html
|
|
15
|
+
RUN pipx install hatch==1.13.0 && pipx pin hatch
|
|
16
|
+
|
|
17
|
+
COPY . .
|
|
18
|
+
|
|
19
|
+
ENV PATH="$PATH:/root/.local/bin"
|
|
20
|
+
|
|
21
|
+
RUN hatch build
|
|
22
|
+
|
|
23
|
+
########################
|
|
24
|
+
|
|
25
|
+
# Google distroless Python 3.13 Alpine image
|
|
26
|
+
FROM gcr.io/distroless/python3-debian13:nonroot-arm64@sha256:f7a5fde15cf1e287dffac51d5d683e06dc6d4e5f63dde693fc8a4e54ac47cbcd
|
|
27
|
+
|
|
28
|
+
RUN apk update && \
|
|
29
|
+
apk add --no-cache libmagic
|
|
30
|
+
|
|
31
|
+
RUN addgroup --system --gid 1001 plexer && \
|
|
32
|
+
adduser --system --uid 1001 --ingroup plexer plexer
|
|
33
|
+
|
|
34
|
+
WORKDIR /app
|
|
35
|
+
|
|
36
|
+
COPY --chown=plexer:plexer --from=build /build/dist/ ./dist/
|
|
37
|
+
|
|
38
|
+
RUN python -m venv /app/venv
|
|
39
|
+
ENV PATH="/app/venv/bin:$PATH"
|
|
40
|
+
RUN pip install ./dist/plexer_cli-*.whl
|
|
41
|
+
|
|
42
|
+
USER plexer
|
|
43
|
+
|
|
44
|
+
ENTRYPOINT [ "/app/venv/bin/plexer" ]
|
|
45
|
+
CMD [ "--help" ]
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: plexer_cli
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Normalize media files for use with Plex Media Server
|
|
5
|
-
Project-URL: Repository, https://github.com/magneticstain/plexer
|
|
6
|
-
Project-URL: Documentation, https://github.com/magneticstain/plexer
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Normalize media files and directories for use with Plex Media Server
|
|
5
|
+
Project-URL: Repository, https://github.com/magneticstain/plexer
|
|
6
|
+
Project-URL: Documentation, https://github.com/magneticstain/plexer-cli/wiki
|
|
7
7
|
Project-URL: Issues, https://github.com/magneticstain/plexer/issues
|
|
8
|
-
Project-URL: Source, https://github.com/magneticstain/plexer
|
|
9
8
|
Author-email: Josh Carlson <837837+magneticstain@users.noreply.github.com>
|
|
10
9
|
License-Expression: MIT
|
|
11
10
|
License-File: LICENSE
|
|
@@ -16,16 +15,21 @@ Classifier: Framework :: Hatch
|
|
|
16
15
|
Classifier: Framework :: Pytest
|
|
17
16
|
Classifier: Framework :: tox
|
|
18
17
|
Classifier: Intended Audience :: System Administrators
|
|
19
|
-
Classifier:
|
|
18
|
+
Classifier: Natural Language :: English
|
|
19
|
+
Classifier: Operating System :: MacOS
|
|
20
20
|
Classifier: Operating System :: Unix
|
|
21
21
|
Classifier: Programming Language :: Python
|
|
22
|
-
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
28
|
+
Classifier: Topic :: Multimedia :: Video
|
|
26
29
|
Classifier: Topic :: Utilities
|
|
27
|
-
Requires-Python: >=3.
|
|
30
|
+
Requires-Python: >=3.10
|
|
28
31
|
Requires-Dist: logzero~=1.7.0
|
|
32
|
+
Requires-Dist: prompt-toolkit>=3.0.52
|
|
29
33
|
Requires-Dist: python-magic~=0.4.27
|
|
30
34
|
Description-Content-Type: text/markdown
|
|
31
35
|
|
|
@@ -41,8 +45,8 @@ Description-Content-Type: text/markdown
|
|
|
41
45
|

|
|
42
46
|

|
|
43
47
|
|
|
44
|
-
[](https://scorecard.dev/viewer/?uri=github.com/magneticstain/plexer)
|
|
45
|
-
[](https://scorecard.dev/viewer/?uri=github.com/magneticstain/plexer-cli)
|
|
49
|
+
[](https://www.bestpractices.dev/projects/13659)
|
|
46
50
|
|
|
47
51
|
[](https://github.com/magneticstain/plexer/actions/workflows/run_full_test_suite.yml)
|
|
48
52
|
[](https://github.com/magneticstain/plexer/actions/workflows/release.yml)
|
|
@@ -60,15 +64,13 @@ Currently, Plexer only supports organizing movies and other individual video fil
|
|
|
60
64
|
### Roadmap
|
|
61
65
|
|
|
62
66
|
- [ ] Support for TV Shows ([#28](https://github.com/magneticstain/plexer/issues/28))
|
|
63
|
-
- [
|
|
67
|
+
- [X] Docker implementations ([#29](https://github.com/magneticstain/plexer/issues/29))
|
|
64
68
|
- [ ] MacOS support ([#30](https://github.com/magneticstain/plexer/issues/30))
|
|
65
69
|
- [ ] Windows support ([#31](https://github.com/magneticstain/plexer/issues/31))
|
|
66
|
-
- [
|
|
70
|
+
- [X] Metadata inference using file/directory info (i.e. analyze the video files to "guess" what the name, year, etc is) ([#32](https://github.com/magneticstain/plexer/issues/32))
|
|
67
71
|
|
|
68
72
|
## Install
|
|
69
73
|
|
|
70
|
-
To install Plexer, there are a few options available.
|
|
71
|
-
|
|
72
74
|
### Docker
|
|
73
75
|
|
|
74
76
|
The most portable way to install and run Plexer is by using Docker.
|
|
@@ -89,7 +91,7 @@ docker run --rm -it magneticstain/plexer-cli
|
|
|
89
91
|
docker run --rm -it ghcr.io/magneticstain/plexer-cli
|
|
90
92
|
```
|
|
91
93
|
|
|
92
|
-
#### Via Local Build
|
|
94
|
+
#### Via Local Image Build
|
|
93
95
|
|
|
94
96
|
In the case that container registries are unavailable, there's also the option to build the image locally. To do that, check out the `main` branch of this repo, build the Plexer image, and run it.
|
|
95
97
|
|
|
@@ -101,21 +103,19 @@ docker run --rm -it plexer_cli
|
|
|
101
103
|
|
|
102
104
|
## Requirements
|
|
103
105
|
|
|
104
|
-
###
|
|
106
|
+
### Linux and MacOS Native Install
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
If you've installed plexer-cli natively (i.e. outside of a Docker container) on Ubuntu, Devian, Fedora, etc, or MacOS, you will also need to install additional dependencies:
|
|
107
109
|
|
|
108
|
-
|
|
110
|
+
#### Python-Magic
|
|
109
111
|
|
|
110
|
-
|
|
112
|
+
While `python-magic` is imported in the standard fashion (via pip/python requirements), it itself depends on the presence of the libmagic C library. To install this library, follow [the installation instructions provided in the `python-magic` README](https://github.com/ahupp/python-magic?tab=readme-ov-file#installation).
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
### Media Metadata
|
|
113
115
|
|
|
114
|
-
|
|
115
|
-
echo -n "Media Name: ";read MEDIA_NAME;echo -n "Release Year (YYYY): ";read RELEASE_YEAR;echo "{\"name\": \"${MEDIA_NAME}\", \"release_year\": \"${RELEASE_YEAR}\"}" > .plexer
|
|
116
|
-
```
|
|
116
|
+
The most important requirement before running plexer is to ensure that you've created a `.plexer` file in each of your target directories.
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
This is a JSON-formatted file that includes the movie metadata required by Plexer to perform its jobs.
|
|
119
119
|
|
|
120
120
|
## Usage
|
|
121
121
|
|
|
@@ -149,7 +149,17 @@ For developing with Plexer, there are several tools that are in use:
|
|
|
149
149
|
1. [Hatch](https://hatch.pypa.io/1.12/)
|
|
150
150
|
1. Analysis Tools:
|
|
151
151
|
1. [Ruff](https://docs.astral.sh/ruff/)
|
|
152
|
-
1. [Codacy](https://app.codacy.com/gh/magneticstain/plexer/dashboard)
|
|
153
152
|
1. Testing:
|
|
154
153
|
1. [Pytest](https://docs.pytest.org/en/latest/)
|
|
155
154
|
1. [Tox](https://tox.wiki/en/stable/)
|
|
155
|
+
|
|
156
|
+
### Coding Standards and Conventions
|
|
157
|
+
|
|
158
|
+
- Pre-commit hooks are utilized and managed in `.pre-commit-config.yml`
|
|
159
|
+
- For example, `ruff` is run as part of every commit
|
|
160
|
+
- These pre-commit hooks **MUST** be installed and utilized by all developers
|
|
161
|
+
|
|
162
|
+
#### Testing
|
|
163
|
+
|
|
164
|
+
- All functions **MUST** have unit tests created for them
|
|
165
|
+
- Tests are executed using **VS Code** with the `launch.json` config file in `.vscode`
|