pbrenamer 1.5.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 (106) hide show
  1. pbrenamer-1.5.0/.github/ISSUE_TEMPLATE/bug_report.md +48 -0
  2. pbrenamer-1.5.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  3. pbrenamer-1.5.0/.github/workflows/ci.yml +162 -0
  4. pbrenamer-1.5.0/.gitignore +51 -0
  5. pbrenamer-1.5.0/.markdownlint-cli2.yaml +12 -0
  6. pbrenamer-1.5.0/.pre-commit-config.yaml +27 -0
  7. pbrenamer-1.5.0/.readthedocs.yaml +20 -0
  8. pbrenamer-1.5.0/CHANGELOG.md +391 -0
  9. pbrenamer-1.5.0/CLAUDE.md +80 -0
  10. pbrenamer-1.5.0/CODING.md +405 -0
  11. pbrenamer-1.5.0/LICENSE +674 -0
  12. pbrenamer-1.5.0/Makefile +257 -0
  13. pbrenamer-1.5.0/PKG-INFO +225 -0
  14. pbrenamer-1.5.0/README.md +192 -0
  15. pbrenamer-1.5.0/babel.cfg +2 -0
  16. pbrenamer-1.5.0/docs/_static/.gitkeep +0 -0
  17. pbrenamer-1.5.0/docs/_static/custom.css +7 -0
  18. pbrenamer-1.5.0/docs/api.rst +199 -0
  19. pbrenamer-1.5.0/docs/conf.py +204 -0
  20. pbrenamer-1.5.0/docs/index.rst +21 -0
  21. pbrenamer-1.5.0/docs/requirements.txt +2 -0
  22. pbrenamer-1.5.0/docs/user_guide.rst +745 -0
  23. pbrenamer-1.5.0/hatch_build.py +35 -0
  24. pbrenamer-1.5.0/hooks/pyi_rth_fonts.py +49 -0
  25. pbrenamer-1.5.0/pbrenamer.spec +160 -0
  26. pbrenamer-1.5.0/pixi.lock +8450 -0
  27. pbrenamer-1.5.0/pyproject.toml +123 -0
  28. pbrenamer-1.5.0/src/pbrenamer/__init__.py +13 -0
  29. pbrenamer-1.5.0/src/pbrenamer/__main__.py +732 -0
  30. pbrenamer-1.5.0/src/pbrenamer/argparse_qt.py +92 -0
  31. pbrenamer-1.5.0/src/pbrenamer/core/__init__.py +1 -0
  32. pbrenamer-1.5.0/src/pbrenamer/core/audio_meta.py +168 -0
  33. pbrenamer-1.5.0/src/pbrenamer/core/filetools.py +386 -0
  34. pbrenamer-1.5.0/src/pbrenamer/core/image_meta.py +252 -0
  35. pbrenamer-1.5.0/src/pbrenamer/core/meta_common.py +20 -0
  36. pbrenamer-1.5.0/src/pbrenamer/core/replacement.py +448 -0
  37. pbrenamer-1.5.0/src/pbrenamer/core/undo.py +30 -0
  38. pbrenamer-1.5.0/src/pbrenamer/core/video_meta.py +174 -0
  39. pbrenamer-1.5.0/src/pbrenamer/i18n.py +115 -0
  40. pbrenamer-1.5.0/src/pbrenamer/locale/de/LC_MESSAGES/pbrenamer.po +1558 -0
  41. pbrenamer-1.5.0/src/pbrenamer/locale/en/LC_MESSAGES/pbrenamer.po +1227 -0
  42. pbrenamer-1.5.0/src/pbrenamer/locale/es/LC_MESSAGES/pbrenamer.po +1565 -0
  43. pbrenamer-1.5.0/src/pbrenamer/locale/fr/LC_MESSAGES/pbrenamer.po +1240 -0
  44. pbrenamer-1.5.0/src/pbrenamer/locale/it/LC_MESSAGES/pbrenamer.po +1566 -0
  45. pbrenamer-1.5.0/src/pbrenamer/locale/ru/LC_MESSAGES/pbrenamer.po +1546 -0
  46. pbrenamer-1.5.0/src/pbrenamer/locale/vi/LC_MESSAGES/pbrenamer.po +1529 -0
  47. pbrenamer-1.5.0/src/pbrenamer/locale/zh_CN/LC_MESSAGES/pbrenamer.po +1464 -0
  48. pbrenamer-1.5.0/src/pbrenamer/platform/__init__.py +16 -0
  49. pbrenamer-1.5.0/src/pbrenamer/platform/bookmarks.py +67 -0
  50. pbrenamer-1.5.0/src/pbrenamer/platform/desktop.py +164 -0
  51. pbrenamer-1.5.0/src/pbrenamer/platform/dirs.py +145 -0
  52. pbrenamer-1.5.0/src/pbrenamer/platform/fs.py +54 -0
  53. pbrenamer-1.5.0/src/pbrenamer/platform/locale.py +28 -0
  54. pbrenamer-1.5.0/src/pbrenamer/resources/__init__.py +8 -0
  55. pbrenamer-1.5.0/src/pbrenamer/resources/pbrenamer.icns +0 -0
  56. pbrenamer-1.5.0/src/pbrenamer/resources/pbrenamer.ico +0 -0
  57. pbrenamer-1.5.0/src/pbrenamer/resources/pbrenamer.svg +37 -0
  58. pbrenamer-1.5.0/src/pbrenamer/settings.py +180 -0
  59. pbrenamer-1.5.0/src/pbrenamer/ui/__init__.py +0 -0
  60. pbrenamer-1.5.0/src/pbrenamer/ui/about_dialog.py +50 -0
  61. pbrenamer-1.5.0/src/pbrenamer/ui/about_dialog_ui.py +76 -0
  62. pbrenamer-1.5.0/src/pbrenamer/ui/file_info_window.py +244 -0
  63. pbrenamer-1.5.0/src/pbrenamer/ui/geometry_mixin.py +73 -0
  64. pbrenamer-1.5.0/src/pbrenamer/ui/history_dialog.py +98 -0
  65. pbrenamer-1.5.0/src/pbrenamer/ui/history_dialog_ui.py +141 -0
  66. pbrenamer-1.5.0/src/pbrenamer/ui/main_window.py +1177 -0
  67. pbrenamer-1.5.0/src/pbrenamer/ui/main_window_ui.py +556 -0
  68. pbrenamer-1.5.0/src/pbrenamer/ui/pattern_help.py +605 -0
  69. pbrenamer-1.5.0/src/pbrenamer/ui/presets.py +181 -0
  70. pbrenamer-1.5.0/src/pbrenamer/ui/settings_dialog.py +51 -0
  71. pbrenamer-1.5.0/src/pbrenamer/ui/settings_dialog_ui.py +100 -0
  72. pbrenamer-1.5.0/src/pbrenamer/ui/shortcuts_dialog.py +106 -0
  73. pbrenamer-1.5.0/src/pbrenamer/ui/widgets.py +84 -0
  74. pbrenamer-1.5.0/src/pbrenamer/ui/window_state.py +106 -0
  75. pbrenamer-1.5.0/src/pbrenamer/xdg.py +5 -0
  76. pbrenamer-1.5.0/tests/__init__.py +0 -0
  77. pbrenamer-1.5.0/tests/conftest.py +31 -0
  78. pbrenamer-1.5.0/tests/data/sample_audio.ogg +0 -0
  79. pbrenamer-1.5.0/tests/data/sample_exif.jpg +0 -0
  80. pbrenamer-1.5.0/tests/data/sample_video.mp4 +0 -0
  81. pbrenamer-1.5.0/tests/test_argparse_qt.py +47 -0
  82. pbrenamer-1.5.0/tests/test_filetools.py +1386 -0
  83. pbrenamer-1.5.0/tests/test_headless.py +1015 -0
  84. pbrenamer-1.5.0/tests/test_i18n.py +138 -0
  85. pbrenamer-1.5.0/tests/test_main_window.py +1663 -0
  86. pbrenamer-1.5.0/tests/test_meta_audio.py +474 -0
  87. pbrenamer-1.5.0/tests/test_meta_image.py +428 -0
  88. pbrenamer-1.5.0/tests/test_meta_video.py +426 -0
  89. pbrenamer-1.5.0/tests/test_platform_bookmarks.py +174 -0
  90. pbrenamer-1.5.0/tests/test_platform_desktop.py +257 -0
  91. pbrenamer-1.5.0/tests/test_platform_dirs.py +144 -0
  92. pbrenamer-1.5.0/tests/test_platform_fs.py +94 -0
  93. pbrenamer-1.5.0/tests/test_platform_locale.py +69 -0
  94. pbrenamer-1.5.0/tests/test_presets.py +244 -0
  95. pbrenamer-1.5.0/tests/test_replacement.py +598 -0
  96. pbrenamer-1.5.0/tests/test_resources.py +51 -0
  97. pbrenamer-1.5.0/tests/test_settings.py +276 -0
  98. pbrenamer-1.5.0/tests/test_ui_dialogs.py +1001 -0
  99. pbrenamer-1.5.0/tests/test_undo.py +110 -0
  100. pbrenamer-1.5.0/tests/test_window_state.py +126 -0
  101. pbrenamer-1.5.0/tools/bump_version.py +92 -0
  102. pbrenamer-1.5.0/tools/extract_changelog.py +65 -0
  103. pbrenamer-1.5.0/tools/fix_po_files.py +42 -0
  104. pbrenamer-1.5.0/tools/git_version.sh +10 -0
  105. pbrenamer-1.5.0/tools/po_check.py +199 -0
  106. pbrenamer-1.5.0/tools/update_icons.py +236 -0
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+
16
+ 1. Go to '...'
17
+ 2. Click on '....'
18
+ 3. Scroll down to '....'
19
+ 4. See error
20
+
21
+ **Expected behavior**
22
+ A clear and concise description of what you expected to happen.
23
+
24
+ **Screenshots**
25
+ If applicable, add screenshots to help explain your problem.
26
+
27
+ **Desktop (please complete the following information):**
28
+
29
+ - OS:
30
+ - [ ] Linux
31
+ - [ ] Windows
32
+ - [ ] macOS
33
+ - Version [e.g. 1.0.0]
34
+
35
+ **Environment:**
36
+
37
+ - Installed from:
38
+ - [ ] Asset in release
39
+ - [ ] source
40
+ - [ ] Pypi
41
+ - If installed from source or Pypi
42
+ - [ ] At system level
43
+ - [ ] At user level without environment
44
+ - [ ] from source in python virtualenv
45
+ - [ ] from source in conda environment
46
+
47
+ **Additional context**
48
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,162 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ # Semver tags only (glob syntax — + quantifier not supported by GitHub)
7
+ tags: ["v[0-9]*.[0-9]*.[0-9]*"]
8
+ pull_request:
9
+
10
+ # Cancel in-flight runs for the same ref when a newer push arrives.
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ # ── Tests ────────────────────────────────────────────────────────────────────
17
+ test:
18
+ name: Tests
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v6
22
+
23
+ - name: Set up pixi environment
24
+ uses: prefix-dev/setup-pixi@v0.10.0
25
+ with:
26
+ pixi-version: latest
27
+ cache: true
28
+
29
+ - name: Compile translation catalogues
30
+ run: pixi run -- pybabel compile -d src/pbrenamer/locale -D pbrenamer
31
+
32
+ - name: Run test suite
33
+ env:
34
+ QT_QPA_PLATFORM: offscreen
35
+ run: make test
36
+
37
+ # ── Pre-commit hooks ─────────────────────────────────────────────────────────
38
+ hooks:
39
+ name: Pre-commit hooks
40
+ runs-on: ubuntu-latest
41
+ steps:
42
+ - uses: actions/checkout@v6
43
+
44
+ - name: Set up pixi environment
45
+ uses: prefix-dev/setup-pixi@v0.10.0
46
+ with:
47
+ pixi-version: latest
48
+ cache: true
49
+
50
+ - name: Cache pre-commit hook environments
51
+ uses: actions/cache@v5
52
+ with:
53
+ path: ~/.cache/pre-commit
54
+ key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
55
+
56
+ - name: Run hooks on all files
57
+ run: pixi run -- pre-commit run --all-files
58
+
59
+ # ── Documentation ───────────────────────────────────────────────────────────
60
+ docs:
61
+ name: Build docs
62
+ needs: [test]
63
+ runs-on: ubuntu-latest
64
+ steps:
65
+ - uses: actions/checkout@v6
66
+
67
+ - name: Set up pixi environment
68
+ uses: prefix-dev/setup-pixi@v0.10.0
69
+ with:
70
+ pixi-version: latest
71
+ cache: true
72
+
73
+ - name: Build HTML documentation
74
+ run: make docs
75
+
76
+ - name: Upload documentation artifact
77
+ uses: actions/upload-artifact@v7
78
+ with:
79
+ name: docs-html
80
+ path: docs/_build/html/
81
+ if-no-files-found: error
82
+
83
+ # ── Build executables ────────────────────────────────────────────────────────
84
+ build:
85
+ name: Build / ${{ matrix.os }}
86
+ needs: [test, hooks]
87
+ strategy:
88
+ fail-fast: false
89
+ matrix:
90
+ os: [ubuntu-latest, windows-latest, macos-latest]
91
+ runs-on: ${{ matrix.os }}
92
+
93
+ steps:
94
+ - uses: actions/checkout@v6
95
+
96
+ - name: Set up pixi environment
97
+ uses: prefix-dev/setup-pixi@v0.10.0
98
+ with:
99
+ pixi-version: latest
100
+ cache: true
101
+
102
+ - name: Compile translation catalogues
103
+ # .mo files are gitignored generated artifacts; rebuild from .po sources.
104
+ run: pixi run -- pybabel compile -d src/pbrenamer/locale -D pbrenamer
105
+
106
+ - name: Build with PyInstaller
107
+ # Call PyInstaller directly to avoid GNU Make portability issues
108
+ # on Windows runners. Single-line command: the `\` line-continuation
109
+ # used by bash is not valid PowerShell, the default shell on
110
+ # windows-latest runners.
111
+ run: pixi run -- pyinstaller --clean --noconfirm --distpath dist --workpath build/pyinstaller pbrenamer.spec
112
+
113
+ - name: Zip .app bundle (macOS)
114
+ # A .app bundle is a directory; zip it for upload and release attachment.
115
+ if: runner.os == 'macOS'
116
+ shell: bash
117
+ run: |
118
+ cd dist
119
+ for app in *.app; do
120
+ zip -r "${app%.app}.zip" "$app"
121
+ rm -rf "$app"
122
+ done
123
+
124
+ - name: Upload build artifact
125
+ uses: actions/upload-artifact@v7
126
+ with:
127
+ # One artifact per runner; merged in the release job.
128
+ name: build-${{ runner.os }}
129
+ path: dist/pbrenamer-*
130
+ if-no-files-found: error
131
+
132
+ # ── GitHub release ───────────────────────────────────────────────────────────
133
+ release:
134
+ name: Release ${{ github.ref_name }}
135
+ needs: [build]
136
+ # Only create a release on semver tags; the tag filter on push already
137
+ # restricts the trigger, but this guard makes the intent explicit.
138
+ if: github.ref_type == 'tag'
139
+ runs-on: ubuntu-latest
140
+ permissions:
141
+ contents: write # required to create a release and upload assets
142
+
143
+ steps:
144
+ - uses: actions/checkout@v6
145
+
146
+ - name: Download all build artifacts
147
+ uses: actions/download-artifact@v8
148
+ with:
149
+ # Merge all per-OS artifacts into a single flat directory.
150
+ path: dist
151
+ merge-multiple: true
152
+
153
+ - name: Extract changelog entry for ${{ github.ref_name }}
154
+ id: changelog
155
+ run: python3 tools/extract_changelog.py
156
+
157
+ - name: Create GitHub release
158
+ uses: softprops/action-gh-release@v3
159
+ with:
160
+ body: ${{ steps.changelog.outputs.body }}
161
+ files: dist/pbrenamer-*
162
+ fail_on_unmatched_files: true
@@ -0,0 +1,51 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ *.egg
6
+ dist/
7
+ build/
8
+ .eggs/
9
+
10
+ # Virtual environments
11
+ .venv/
12
+ venv/
13
+ env/
14
+
15
+ # Testing
16
+ .pytest_cache/
17
+ .coverage
18
+ htmlcov/
19
+ coverage.xml
20
+
21
+ # Sphinx
22
+ docs/_build/
23
+ docs/changelog.rst
24
+ docs/_static/pbrenamer.svg
25
+
26
+ # IDE
27
+ .idea/
28
+ .vscode/
29
+ *.swp
30
+ *~
31
+
32
+ # OS
33
+ .DS_Store
34
+ Thumbs.db
35
+
36
+ # Make stamp files
37
+ .translate.stamp
38
+
39
+ # i18n — generated artifacts, rebuilt on demand by make translate
40
+ *.pot
41
+ *.mo
42
+ tools/_ui_strings_tmp.py
43
+
44
+ # Claude Code
45
+ .claude/settings.local.json
46
+
47
+ # pixi (defensive: environments should live in ~/PIXI/ via the global
48
+ # `pixi config set --global detached-environments`, but this covers
49
+ # machines/accounts where that global config isn't set, so .pixi/
50
+ # never ends up committed)
51
+ .pixi/
@@ -0,0 +1,12 @@
1
+ config:
2
+ # Line length not enforced — CHANGELOG bullets and docs are naturally long
3
+ MD013: false
4
+ # Duplicate headings allowed when they live under different parent sections
5
+ # (standard Keep-a-Changelog pattern: ### Added, ### Fixed repeat per release)
6
+ MD024:
7
+ siblings_only: true
8
+
9
+ # CLAUDE.md is intentionally compact tool-specific files
10
+ ignores:
11
+ - CLAUDE.md
12
+ - .pytest_cache/**
@@ -0,0 +1,27 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: mixed-line-ending
8
+ args: [--fix=lf]
9
+ - id: check-merge-conflict
10
+ - id: check-added-large-files
11
+ - id: check-yaml
12
+ - id: check-toml
13
+ - id: check-json
14
+ - id: check-xml # covers .ui files
15
+ - id: debug-statements # Python only
16
+
17
+ - repo: https://github.com/astral-sh/ruff-pre-commit
18
+ rev: v0.15.20
19
+ hooks:
20
+ - id: ruff
21
+ args: [--fix]
22
+ - id: ruff-format
23
+
24
+ - repo: https://github.com/DavidAnson/markdownlint-cli2
25
+ rev: v0.22.1
26
+ hooks:
27
+ - id: markdownlint-cli2
@@ -0,0 +1,20 @@
1
+ # Read the Docs configuration
2
+ # https://docs.readthedocs.io/en/stable/config-file/v2.html
3
+ version: 2
4
+
5
+ build:
6
+ os: ubuntu-22.04
7
+ tools:
8
+ python: "3.12"
9
+
10
+ python:
11
+ install:
12
+ - method: pip
13
+ path: .
14
+ extra_requirements:
15
+ - dev
16
+
17
+ sphinx:
18
+ configuration: docs/conf.py
19
+ builder: html
20
+ fail_on_warning: false