mediainfo-picker 0.2.0__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.
Files changed (40) hide show
  1. mediainfo_picker-0.2.0/.github/workflows/ci.yml +68 -0
  2. mediainfo_picker-0.2.0/.github/workflows/release.yml +125 -0
  3. mediainfo_picker-0.2.0/.gitignore +220 -0
  4. mediainfo_picker-0.2.0/.pre-commit-config.yaml +45 -0
  5. mediainfo_picker-0.2.0/CHANGELOG.md +43 -0
  6. mediainfo_picker-0.2.0/LICENSE +21 -0
  7. mediainfo_picker-0.2.0/PKG-INFO +125 -0
  8. mediainfo_picker-0.2.0/README.md +96 -0
  9. mediainfo_picker-0.2.0/RELEASING.md +63 -0
  10. mediainfo_picker-0.2.0/pyproject.toml +85 -0
  11. mediainfo_picker-0.2.0/scripts/release-notes.py +57 -0
  12. mediainfo_picker-0.2.0/scripts/update-mediainfo-csv.py +60 -0
  13. mediainfo_picker-0.2.0/src/mediainfo_picker/__init__.py +5 -0
  14. mediainfo_picker-0.2.0/src/mediainfo_picker/__main__.py +5 -0
  15. mediainfo_picker-0.2.0/src/mediainfo_picker/app.py +463 -0
  16. mediainfo_picker-0.2.0/src/mediainfo_picker/config.py +48 -0
  17. mediainfo_picker-0.2.0/src/mediainfo_picker/data/icon.svg +5 -0
  18. mediainfo_picker-0.2.0/src/mediainfo_picker/data/mediainfo-csv/Audio.csv +285 -0
  19. mediainfo_picker-0.2.0/src/mediainfo_picker/data/mediainfo-csv/General.csv +359 -0
  20. mediainfo_picker-0.2.0/src/mediainfo_picker/data/mediainfo-csv/Image.csv +177 -0
  21. mediainfo_picker-0.2.0/src/mediainfo_picker/data/mediainfo-csv/LICENSE-MediaInfoLib +25 -0
  22. mediainfo_picker-0.2.0/src/mediainfo_picker/data/mediainfo-csv/Menu.csv +101 -0
  23. mediainfo_picker-0.2.0/src/mediainfo_picker/data/mediainfo-csv/Other.csv +193 -0
  24. mediainfo_picker-0.2.0/src/mediainfo_picker/data/mediainfo-csv/TAG +1 -0
  25. mediainfo_picker-0.2.0/src/mediainfo_picker/data/mediainfo-csv/Text.csv +305 -0
  26. mediainfo_picker-0.2.0/src/mediainfo_picker/data/mediainfo-csv/Video.csv +398 -0
  27. mediainfo_picker-0.2.0/src/mediainfo_picker/descriptions.py +47 -0
  28. mediainfo_picker-0.2.0/src/mediainfo_picker/engine.py +246 -0
  29. mediainfo_picker-0.2.0/tests/conftest.py +12 -0
  30. mediainfo_picker-0.2.0/tests/fixtures/README.md +14 -0
  31. mediainfo_picker-0.2.0/tests/fixtures/default-raw.txt +85 -0
  32. mediainfo_picker-0.2.0/tests/fixtures/default.txt +85 -0
  33. mediainfo_picker-0.2.0/tests/fixtures/full-raw.txt +274 -0
  34. mediainfo_picker-0.2.0/tests/fixtures/full.txt +274 -0
  35. mediainfo_picker-0.2.0/tests/fixtures/info-parameters.txt +1831 -0
  36. mediainfo_picker-0.2.0/tests/fixtures/sample.mkv +0 -0
  37. mediainfo_picker-0.2.0/tests/test_app.py +171 -0
  38. mediainfo_picker-0.2.0/tests/test_engine.py +205 -0
  39. mediainfo_picker-0.2.0/tests/test_release.py +71 -0
  40. mediainfo_picker-0.2.0/uv.lock +537 -0
@@ -0,0 +1,68 @@
1
+ # The same checks as pre-commit, on every pull request and on main, on Linux, Windows and macOS.
2
+ # release.yml runs this too, before it builds anything.
3
+ name: CI
4
+
5
+ on:
6
+ pull_request:
7
+ push:
8
+ branches: [main]
9
+ workflow_call:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ concurrency:
15
+ # github.workflow is the caller's name when release.yml runs this, so the two never cancel each other
16
+ group: ci-${{ github.workflow }}-${{ github.ref }}
17
+ cancel-in-progress: true
18
+
19
+ jobs:
20
+ lint:
21
+ name: Lint and type check
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25
+ with:
26
+ persist-credentials: false # nothing here pushes; don't leave the token in .git/config
27
+ - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
28
+ with:
29
+ enable-cache: true
30
+ - run: uv sync --locked
31
+ - run: uv run ruff check .
32
+ - run: uv run ruff format --check .
33
+ - run: uv run mypy
34
+
35
+ test:
36
+ name: Test (${{ matrix.os }}, Python ${{ matrix.python }})
37
+ runs-on: ${{ matrix.os }}
38
+ strategy:
39
+ fail-fast: false
40
+ matrix:
41
+ os: [ubuntu-latest, windows-latest, macos-latest]
42
+ python: ["3.12", "3.14"] # the oldest supported and the newest
43
+ env:
44
+ REQUIRE_MEDIAINFO: "1" # a missing mediainfo fails the run instead of skipping the live tests
45
+ QT_QPA_PLATFORM: offscreen
46
+ steps:
47
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
48
+ with:
49
+ persist-credentials: false # nothing here pushes; don't leave the token in .git/config
50
+ - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
51
+ with:
52
+ enable-cache: true
53
+ python-version: ${{ matrix.python }}
54
+
55
+ - name: Install mediainfo and Qt's libraries (Linux)
56
+ if: runner.os == 'Linux'
57
+ run: sudo apt-get update && sudo apt-get install -y mediainfo libegl1 libgl1 libxkbcommon0 libfontconfig1
58
+ - name: Install mediainfo (macOS)
59
+ if: runner.os == 'macOS'
60
+ run: brew install media-info
61
+ - name: Install mediainfo (Windows)
62
+ if: runner.os == 'Windows'
63
+ run: choco install mediainfo-cli --no-progress -y
64
+
65
+ - name: mediainfo version
66
+ run: mediainfo --Version
67
+ - run: uv sync --locked
68
+ - run: uv run pytest -ra
@@ -0,0 +1,125 @@
1
+ # Releases. Pushing a v* tag runs CI, builds the packages, publishes them to PyPI and creates the
2
+ # GitHub Release with the CHANGELOG notes. Running this workflow by hand from the Actions tab does
3
+ # the same up to the build, then publishes to TestPyPI instead, as a dry run. See RELEASING.md.
4
+ #
5
+ # Publishing uses PyPI's Trusted Publishing: no token is stored anywhere. PyPI and TestPyPI each
6
+ # trust this file (release.yml) in this repository, in the GitHub environment named below.
7
+ name: Release
8
+
9
+ on:
10
+ push:
11
+ tags: ["v*"]
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ concurrency:
18
+ group: release-${{ github.ref }}
19
+ cancel-in-progress: false # never stop a release halfway
20
+
21
+ jobs:
22
+ ci:
23
+ name: CI
24
+ uses: ./.github/workflows/ci.yml
25
+
26
+ build:
27
+ name: Build
28
+ needs: ci
29
+ runs-on: ubuntu-latest
30
+ outputs:
31
+ version: ${{ steps.version.outputs.version }}
32
+ steps:
33
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34
+ with:
35
+ persist-credentials: false
36
+ - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
37
+ with:
38
+ enable-cache: false # a release is built from nothing but the commit
39
+ - name: Version, and the tag must match it
40
+ id: version
41
+ env:
42
+ REF_TYPE: ${{ github.ref_type }}
43
+ REF_NAME: ${{ github.ref_name }}
44
+ run: |
45
+ version=$(uv version --short)
46
+ if [ "$REF_TYPE" = tag ] && [ "$REF_NAME" != "v$version" ]; then
47
+ echo "::error::tag $REF_NAME does not match version $version in pyproject.toml"
48
+ exit 1
49
+ fi
50
+ echo "version=$version" >> "$GITHUB_OUTPUT"
51
+ - name: The CHANGELOG has notes for this version
52
+ env:
53
+ VERSION: ${{ steps.version.outputs.version }}
54
+ run: uv run --no-project scripts/release-notes.py "$VERSION"
55
+ - run: uv build
56
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
57
+ with:
58
+ name: dist
59
+ path: dist/
60
+ if-no-files-found: error
61
+
62
+ testpypi:
63
+ name: Publish to TestPyPI
64
+ if: github.event_name == 'workflow_dispatch'
65
+ needs: build
66
+ runs-on: ubuntu-latest
67
+ environment:
68
+ name: testpypi
69
+ url: https://test.pypi.org/project/mediainfo-picker/${{ needs.build.outputs.version }}/
70
+ permissions:
71
+ id-token: write # Trusted Publishing
72
+ steps:
73
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
74
+ with:
75
+ name: dist
76
+ path: dist/
77
+ - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
78
+ with:
79
+ repository-url: https://test.pypi.org/legacy/
80
+
81
+ pypi:
82
+ name: Publish to PyPI
83
+ if: github.ref_type == 'tag'
84
+ needs: build
85
+ runs-on: ubuntu-latest
86
+ environment:
87
+ name: pypi
88
+ url: https://pypi.org/project/mediainfo-picker/${{ needs.build.outputs.version }}/
89
+ permissions:
90
+ id-token: write # Trusted Publishing
91
+ steps:
92
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
93
+ with:
94
+ name: dist
95
+ path: dist/
96
+ - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
97
+
98
+ github-release:
99
+ name: GitHub Release
100
+ needs: [build, pypi]
101
+ runs-on: ubuntu-latest
102
+ permissions:
103
+ contents: write # create the Release
104
+ steps:
105
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
106
+ with:
107
+ persist-credentials: false
108
+ - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
109
+ with:
110
+ enable-cache: false
111
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
112
+ with:
113
+ name: dist
114
+ path: dist/
115
+ - name: Create the Release
116
+ env:
117
+ GH_TOKEN: ${{ github.token }}
118
+ TAG: ${{ github.ref_name }}
119
+ VERSION: ${{ needs.build.outputs.version }}
120
+ run: |
121
+ uv run --no-project scripts/release-notes.py "$VERSION" > notes.md
122
+ flags=()
123
+ if [[ "$VERSION" =~ (a|b|rc)[0-9]+$ ]]; then flags+=(--prerelease); fi
124
+ gh release create "$TAG" dist/* --verify-tag --title "mediainfo-picker $VERSION" \
125
+ --notes-file notes.md "${flags[@]}"
@@ -0,0 +1,220 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ *.lcov
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ # Pipfile.lock
97
+
98
+ # uv
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ # poetry.lock
110
+ # poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ # pdm.lock
117
+ # pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ # pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi/*
127
+ !.pixi/config.toml
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule*
134
+ celerybeat.pid
135
+
136
+ # Redis
137
+ *.rdb
138
+ *.aof
139
+ *.pid
140
+
141
+ # RabbitMQ
142
+ mnesia/
143
+ rabbitmq/
144
+ rabbitmq-data/
145
+
146
+ # ActiveMQ
147
+ activemq-data/
148
+
149
+ # SageMath parsed files
150
+ *.sage.py
151
+
152
+ # Environments
153
+ .env
154
+ .envrc
155
+ .venv
156
+ env/
157
+ venv/
158
+ ENV/
159
+ env.bak/
160
+ venv.bak/
161
+
162
+ # Spyder project settings
163
+ .spyderproject
164
+ .spyproject
165
+
166
+ # Rope project settings
167
+ .ropeproject
168
+
169
+ # mkdocs/Zensical documentation
170
+ /site
171
+
172
+ # mypy
173
+ .mypy_cache/
174
+ .dmypy.json
175
+ dmypy.json
176
+
177
+ # Pyre type checker
178
+ .pyre/
179
+
180
+ # pytype static type analyzer
181
+ .pytype/
182
+
183
+ # Cython debug symbols
184
+ cython_debug/
185
+
186
+ # PyCharm
187
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
188
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
189
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
190
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
191
+ # .idea/
192
+
193
+ # Abstra
194
+ # Abstra is an AI-powered process automation framework.
195
+ # Ignore directories containing user credentials, local state, and settings.
196
+ # Learn more at https://abstra.io/docs
197
+ .abstra/
198
+
199
+ # Visual Studio Code
200
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
201
+ # can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
202
+ # and can be added to the global gitignore or merged into this file. However, if you prefer, you
203
+ # could uncomment the following to ignore the entire vscode folder
204
+ # .vscode/
205
+ # Temporary file for partial code execution
206
+ tempCodeRunnerFile.py
207
+
208
+ # Ruff stuff:
209
+ .ruff_cache/
210
+
211
+ # PyPI configuration file
212
+ .pypirc
213
+
214
+ # Marimo
215
+ marimo/_static/
216
+ marimo/_lsp/
217
+ __marimo__/
218
+
219
+ # Streamlit
220
+ .streamlit/secrets.toml
@@ -0,0 +1,45 @@
1
+ # pre-commit hooks: `uv run pre-commit install` once per clone, then they run on every commit.
2
+ # Run them all by hand with `uv run pre-commit run --all-files`.
3
+
4
+ # Recorded mediainfo output and MediaArea's own tables are kept byte for byte: --Info-Parameters
5
+ # pads every name with a trailing space, and the tables have CRLF line endings.
6
+ exclude: ^(tests/fixtures/|src/mediainfo_picker/data/mediainfo-csv/)
7
+
8
+ repos:
9
+ - repo: https://github.com/pre-commit/pre-commit-hooks
10
+ rev: v6.0.0
11
+ hooks:
12
+ - id: trailing-whitespace
13
+ - id: end-of-file-fixer
14
+ - id: mixed-line-ending
15
+ args: [--fix=lf]
16
+ - id: check-yaml
17
+ - id: check-toml
18
+ - id: check-added-large-files
19
+ - id: check-merge-conflict
20
+ - id: debug-statements
21
+ - id: no-commit-to-branch # main changes only through pull requests
22
+ args: [--branch, main]
23
+
24
+ - repo: https://github.com/astral-sh/ruff-pre-commit
25
+ rev: v0.17.5 # keep in step with the ruff pin in pyproject.toml
26
+ hooks:
27
+ - id: ruff-check
28
+ args: [--fix]
29
+ - id: ruff-format
30
+
31
+ # mypy and the tests run in the project's own environment, where PySide6 and its type stubs are.
32
+ - repo: local
33
+ hooks:
34
+ - id: mypy
35
+ name: mypy (strict)
36
+ entry: uv run mypy
37
+ language: system
38
+ types: [python]
39
+ pass_filenames: false
40
+ - id: pytest
41
+ name: pytest
42
+ entry: uv run pytest -q
43
+ language: system
44
+ types: [python]
45
+ pass_filenames: false
@@ -0,0 +1,43 @@
1
+ # Changelog
2
+
3
+ What changed in each release of mediainfo-picker. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow
5
+ [Semantic Versioning](https://semver.org/) (while it is 0.x, a new feature bumps the middle number).
6
+
7
+ ## [0.2.0] - 2026-11-16
8
+
9
+ First release on PyPI: `uv tool install mediainfo-picker` or `pipx install mediainfo-picker`.
10
+
11
+ ### Added
12
+
13
+ - A banner with the app's name, and an icon: a white tick on teal.
14
+ - A log under the buttons: what happened (opened, applied, copied) and the notes from each run,
15
+ such as fields removed from the text or fields only Full can show.
16
+ - **Defaults** and **Clear all** in Selected fields. Both change only the open file's fields, so
17
+ fields saved from other files are kept.
18
+ - **Expand all** and **Collapse all**. Clearing a search puts back the sections that were open,
19
+ and opening another file keeps them open.
20
+ - Tests on Linux, Windows and macOS, with Python 3.12 and 3.14, on every pull request.
21
+
22
+ ### Changed
23
+
24
+ - The status bar shows only the versions in use (MediaInfo, Descriptions, MediaInfo Picker) and
25
+ errors.
26
+ - The field count sits below the list, and the left panel can no longer be squeezed until it is
27
+ cut off.
28
+
29
+ ## [0.1.0] - 2026-11-15
30
+
31
+ First version.
32
+
33
+ ### Added
34
+
35
+ - Default, Full and Selected fields modes; the field list can be changed only in Selected fields.
36
+ - Every field the file has, grouped by section, with MediaInfo's own description as a tooltip, and
37
+ a search that filters the list.
38
+ - **Apply**, **Copy output** and **Copy command**: the command, pasted into a Unix-style shell,
39
+ prints the same text.
40
+ - The selection, mode and window layout are remembered between runs.
41
+
42
+ [0.2.0]: https://github.com/TheEverlastingBish/mediainfo-picker/compare/v0.1.0...v0.2.0
43
+ [0.1.0]: https://github.com/TheEverlastingBish/mediainfo-picker/tree/v0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Bish Sinha
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,125 @@
1
+ Metadata-Version: 2.5
2
+ Name: mediainfo-picker
3
+ Version: 0.2.0
4
+ Summary: Pick which MediaInfo fields to show for a media file, and copy the output or the command that makes it
5
+ Project-URL: Repository, https://github.com/TheEverlastingBish/mediainfo-picker
6
+ Project-URL: Issues, https://github.com/TheEverlastingBish/mediainfo-picker/issues
7
+ Project-URL: Changelog, https://github.com/TheEverlastingBish/mediainfo-picker/blob/main/CHANGELOG.md
8
+ Author: Bish Sinha
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ License-File: src/mediainfo_picker/data/mediainfo-csv/LICENSE-MediaInfoLib
12
+ Keywords: audio,media,mediainfo,metadata,qt,video
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: MacOS X
15
+ Classifier: Environment :: Win32 (MS Windows)
16
+ Classifier: Environment :: X11 Applications :: Qt
17
+ Classifier: Intended Audience :: End Users/Desktop
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Multimedia :: Sound/Audio
25
+ Classifier: Topic :: Multimedia :: Video
26
+ Requires-Python: >=3.12
27
+ Requires-Dist: pyside6-essentials>=6.5
28
+ Description-Content-Type: text/markdown
29
+
30
+ # MediaInfo Picker
31
+
32
+ [![CI](https://github.com/TheEverlastingBish/mediainfo-picker/actions/workflows/ci.yml/badge.svg)](https://github.com/TheEverlastingBish/mediainfo-picker/actions/workflows/ci.yml)
33
+ [![Licence: MIT](https://img.shields.io/badge/licence-MIT-blue.svg)](https://github.com/TheEverlastingBish/mediainfo-picker/blob/main/LICENSE)
34
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-blue.svg)](https://github.com/TheEverlastingBish/mediainfo-picker/blob/main/pyproject.toml)
35
+
36
+ Pick which [MediaInfo](https://mediaarea.net/en/MediaInfo) fields to show for a media file, then
37
+ copy the output, or the exact `mediainfo` command that produces it.
38
+
39
+ MediaInfo's text output is either the default set of fields or `--Full`, everything. To show
40
+ anything in between you pass `--HideParameter` and `--ShowParameter`, which take internal names
41
+ (`General_UniqueID/String`, `Video_Encoded_Library_Settings`) that the normal output never shows.
42
+ mediainfo-picker lists every field the file actually has, by its readable label *and* its internal
43
+ name, lets you tick the ones you want, and shows you the output along with the CLI command that
44
+ created it.
45
+
46
+ Not affiliated with MediaArea.
47
+
48
+ ## What it does
49
+
50
+ - **Default / Full / Selected fields.** Default is what `mediainfo` shows on its own; Full is
51
+ `--Full`; Selected fields is your own choice, and the only mode in which the field list can be
52
+ changed. There, **Defaults** ticks what `mediainfo` shows on its own and **Clear all** unticks
53
+ everything, so you can build a short list from nothing.
54
+ - **Every field the file has**, grouped by section (General, Video, Audio #1, …), with MediaInfo's
55
+ own description as a tooltip. Sections start collapsed; **Expand all** and **Collapse all** open
56
+ or close them together. Search filters the list as you type and opens every section with a
57
+ match; clearing it puts back the sections you had open.
58
+ - **Apply** shows the output in a monospace box; **Copy output** and **Copy command** put either on
59
+ the clipboard. Pasted into a terminal, the command prints exactly the same text.
60
+ - **Your selection is remembered**, in `~/.config/mediainfo-picker/settings.json` on Linux. It is
61
+ stored by field name, so it applies to any file.
62
+ - **A log under the buttons** says what happened (opened, applied, copied) and anything worth knowing
63
+ about the last run. The status bar shows the versions in use (MediaInfo, its field descriptions
64
+ and MediaInfo Picker) and any error.
65
+
66
+ ## Requirements
67
+
68
+ - **MediaInfo's command-line tool**, `mediainfo`, on your `PATH`. It is not bundled. Arch/CachyOS:
69
+ `pacman -S mediainfo`; Debian/Ubuntu: `apt install mediainfo`; macOS: `brew install media-info`.
70
+ Developed against MediaInfoLib v26.10.
71
+ - Python 3.12 or later. (On 3.11, PySide6 6.12 releases one reference to `None` too many on every
72
+ `QTreeWidgetItem.setFlags()` call, and Python crashes once the count runs out; from 3.12 `None`
73
+ is immortal and the bug is harmless.)
74
+
75
+ ## Install and run
76
+
77
+ ```bash
78
+ uv tool install mediainfo-picker
79
+ mediainfo-picker # or: mediainfo-picker /path/to/file.mkv
80
+ ```
81
+
82
+ `pipx install mediainfo-picker` works the same way. `uv tool upgrade mediainfo-picker` gets the
83
+ latest release; what changed in each is in the
84
+ [CHANGELOG](https://github.com/TheEverlastingBish/mediainfo-picker/blob/main/CHANGELOG.md). To run
85
+ the unreleased `main` instead: `uv tool install git+https://github.com/TheEverlastingBish/mediainfo-picker`.
86
+ From a checkout: `uv run mediainfo-picker`.
87
+
88
+ ## How it decides what to show
89
+
90
+ - **The fields and their default visibility come from your installed `mediainfo`**, by reading the
91
+ file three times: `--Full`, `--Full --Language=raw` (internal names, line for line) and
92
+ `--Language=raw` (what is shown by default). So they always match your version. The default view
93
+ mostly shows the `/String` variant of a field (`Format/String`, not `Format`), and that is the one
94
+ hidden or shown.
95
+ - **Tooltips come from MediaInfoLib's field tables**, bundled in
96
+ `src/mediainfo_picker/data/mediainfo-csv/` from the release tag in `TAG` there. Refresh them with
97
+ `uv run scripts/update-mediainfo-csv.py`, which fetches the installed mediainfo's version (or
98
+ `--tag vXX.YY`) and every stream kind that version lists.
99
+ - **A few fields cannot be hidden by `mediainfo` at all.** `--HideParameter` only accepts names
100
+ listed by `mediainfo --Info-Parameters`, and given any other it prints nothing but an error.
101
+ `Attachments` (in General) is one: it appears in the output but not in that list. Such fields are
102
+ removed from the text after the run instead; the log says so, and **Copy command** adds an
103
+ `awk` filter that removes them the same way.
104
+ - **The copied command is for a Unix-style shell** (bash, zsh; on Windows, Git Bash or WSL). Its
105
+ quoting and `awk` filter don't work in PowerShell or `cmd`.
106
+
107
+ ## Development
108
+
109
+ ```bash
110
+ uv sync
111
+ uv run pytest
112
+ ```
113
+
114
+ Releases are made by pushing a tag; the steps are in
115
+ [RELEASING.md](https://github.com/TheEverlastingBish/mediainfo-picker/blob/main/RELEASING.md).
116
+
117
+ The tests use `tests/fixtures/`: a one-second synthetic `sample.mkv` and MediaInfo's recorded
118
+ output for it (see the README there). Tests that run the real `mediainfo` are skipped when it is not
119
+ installed.
120
+
121
+ ## Licence
122
+
123
+ MIT, see [LICENSE](https://github.com/TheEverlastingBish/mediainfo-picker/blob/main/LICENSE). The bundled MediaInfoLib field tables are © MediaArea.net SARL under
124
+ the BSD 2-Clause licence; its notice, which the licence requires to travel with them, is
125
+ [`LICENSE-MediaInfoLib`](https://github.com/TheEverlastingBish/mediainfo-picker/blob/main/src/mediainfo_picker/data/mediainfo-csv/LICENSE-MediaInfoLib).