Rename app to HSRename; use HSRename.png as icon; update build script and README
Made-with: Cursor
This commit is contained in:
@@ -14,6 +14,8 @@ build/
|
|||||||
# PyInstaller / packaging
|
# PyInstaller / packaging
|
||||||
*.spec
|
*.spec
|
||||||
appdir/
|
appdir/
|
||||||
|
*.AppDir/
|
||||||
|
*.AppImage
|
||||||
Bulk_Renamer*.AppImage
|
Bulk_Renamer*.AppImage
|
||||||
|
|
||||||
# IDE
|
# IDE
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
@@ -1,4 +1,4 @@
|
|||||||
# Bulk Renamer
|
# HSRename
|
||||||
|
|
||||||
A **native Linux** GUI for mass renaming files. Inspired by [Bulk Rename Utility](https://www.bulkrenameutility.co.uk/#features) (Windows). Rename hundreds of media files with flexible rules, **preview before applying**, and support for **episode renumbering** without losing episode titles.
|
A **native Linux** GUI for mass renaming files. Inspired by [Bulk Rename Utility](https://www.bulkrenameutility.co.uk/#features) (Windows). Rename hundreds of media files with flexible rules, **preview before applying**, and support for **episode renumbering** without losing episode titles.
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ A **native Linux** GUI for mass renaming files. Inspired by [Bulk Rename Utility
|
|||||||
## Install and run
|
## Install and run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd "/home/jorg/Documents/Cursor Projects/Bulk Renamer"
|
cd /path/to/HSRename
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
python main.py
|
python main.py
|
||||||
```
|
```
|
||||||
@@ -71,7 +71,7 @@ pip install -r requirements.txt -r requirements-build.txt
|
|||||||
./build_appimage.sh
|
./build_appimage.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
You need [appimagetool](https://github.com/AppImage/AppImageKit/releases) installed to produce the final `.AppImage`; if missing, the script still creates the AppDir and prints the exact command. The output is `BulkRenamer.AppImage` (or `BulkRenamer-dev.AppImage`).
|
You need [appimagetool](https://github.com/AppImage/AppImageKit/releases) installed to produce the final `.AppImage`; if missing, the script still creates the AppDir and prints the exact command. The output is `HSRename.AppImage`.
|
||||||
|
|
||||||
## Push to Gitea
|
## Push to Gitea
|
||||||
|
|
||||||
|
|||||||
+19
-12
@@ -1,11 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Build Bulk Renamer as an AppImage.
|
# Build HSRename as an AppImage.
|
||||||
# Requires: pip install -r requirements.txt -r requirements-build.txt
|
# Requires: pip install -r requirements.txt -r requirements-build.txt
|
||||||
# Optional: appimagetool from https://github.com/AppImage/AppImageKit/releases (for building the final .AppImage)
|
# Optional: appimagetool from https://github.com/AppImage/appimagetool/releases (for building the final .AppImage)
|
||||||
|
# Uses HSRename.png in the project folder as the app icon.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
APP_NAME="BulkRenamer"
|
APP_NAME="HSRename"
|
||||||
APPDIR="${APP_NAME}.AppDir"
|
APPDIR="${APP_NAME}.AppDir"
|
||||||
EXE_NAME="$APP_NAME"
|
EXE_NAME="$APP_NAME"
|
||||||
|
|
||||||
@@ -28,23 +29,29 @@ rm -rf "$APPDIR"
|
|||||||
mkdir -p "$APPDIR/usr/bin"
|
mkdir -p "$APPDIR/usr/bin"
|
||||||
cp -a "dist/$EXE_NAME" "$APPDIR/usr/bin/"
|
cp -a "dist/$EXE_NAME" "$APPDIR/usr/bin/"
|
||||||
|
|
||||||
cat > "$APPDIR/AppRun" << 'EOF'
|
cat > "$APPDIR/AppRun" << EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
SELF=$(readlink -f "$0")
|
SELF=\$(readlink -f "\$0")
|
||||||
HERE=${SELF%/*}
|
HERE=\${SELF%/*}
|
||||||
exec "$HERE/usr/bin/BulkRenamer/BulkRenamer" "$@"
|
exec "\$HERE/usr/bin/$EXE_NAME/$EXE_NAME" "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x "$APPDIR/AppRun"
|
chmod +x "$APPDIR/AppRun"
|
||||||
|
|
||||||
cat > "$APPDIR/bulk-renamer.desktop" << 'EOF'
|
cat > "$APPDIR/hsrename.desktop" << 'EOF'
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Bulk Renamer
|
Name=HSRename
|
||||||
Comment=Mass rename files with preview and flexible rules
|
Comment=Mass rename files with preview and flexible rules
|
||||||
Exec=BulkRenamer
|
Exec=HSRename
|
||||||
Icon=bulk-renamer
|
Icon=HSRename
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Utility;FileTools;
|
Categories=Utility;FileTools;
|
||||||
EOF
|
EOF
|
||||||
|
# Use project icon as app icon and logo
|
||||||
|
if [[ -f HSRename.png ]]; then
|
||||||
|
cp HSRename.png "$APPDIR/HSRename.png"
|
||||||
|
else
|
||||||
|
echo "Warning: HSRename.png not found; appimagetool may fail or use no icon."
|
||||||
|
fi
|
||||||
|
|
||||||
echo "=== Building AppImage (requires appimagetool) ==="
|
echo "=== Building AppImage (requires appimagetool) ==="
|
||||||
if command -v appimagetool &>/dev/null; then
|
if command -v appimagetool &>/dev/null; then
|
||||||
@@ -55,5 +62,5 @@ else
|
|||||||
echo "AppDir is ready at $APPDIR/"
|
echo "AppDir is ready at $APPDIR/"
|
||||||
echo "To create the .AppImage, install appimagetool and run:"
|
echo "To create the .AppImage, install appimagetool and run:"
|
||||||
echo " appimagetool $APPDIR ${APP_NAME}.AppImage"
|
echo " appimagetool $APPDIR ${APP_NAME}.AppImage"
|
||||||
echo " # Get it from: https://github.com/AppImage/AppImageKit/releases"
|
echo " # Get it from: https://github.com/AppImage/appimagetool/releases"
|
||||||
fi
|
fi
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ from typing import List, Optional
|
|||||||
|
|
||||||
from .rules import Rule
|
from .rules import Rule
|
||||||
|
|
||||||
UNDO_FILENAME = ".bulk-renamer-undo.json"
|
UNDO_FILENAME = ".hsrename-undo.json"
|
||||||
|
|
||||||
|
|
||||||
def _split_name(name: str) -> tuple[str, str]:
|
def _split_name(name: str) -> tuple[str, str]:
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ from .rule_widgets import (
|
|||||||
class MainWindow(QMainWindow):
|
class MainWindow(QMainWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setWindowTitle("Bulk Renamer")
|
self.setWindowTitle("HSRename")
|
||||||
self.resize(1000, 700)
|
self.resize(1000, 700)
|
||||||
self._base_dir = ""
|
self._base_dir = ""
|
||||||
self._file_names: list[str] = []
|
self._file_names: list[str] = []
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""
|
"""
|
||||||
Bulk Renamer - Native Linux GUI for mass renaming files.
|
HSRename - Native Linux GUI for mass renaming files.
|
||||||
Inspired by Bulk Rename Utility (Windows); supports preview and flexible rules.
|
Inspired by Bulk Rename Utility (Windows); supports preview and flexible rules.
|
||||||
"""
|
"""
|
||||||
import sys
|
import sys
|
||||||
@@ -21,7 +21,7 @@ def main():
|
|||||||
Qt.HighDpiScaleFactorRoundingPolicy.PassThrough
|
Qt.HighDpiScaleFactorRoundingPolicy.PassThrough
|
||||||
)
|
)
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
app.setApplicationName("Bulk Renamer")
|
app.setApplicationName("HSRename")
|
||||||
win = MainWindow()
|
win = MainWindow()
|
||||||
win.show()
|
win.show()
|
||||||
sys.exit(app.exec())
|
sys.exit(app.exec())
|
||||||
|
|||||||
Reference in New Issue
Block a user