Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
271 changes: 271 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
name: Build and Release

on:
push:
tags:
- "v*"
workflow_dispatch:

env:
python_package_name: converter-csv
folder_package_name: converter_csv
app_name: LimberDuck Converter CSV
app_name_dash: LimberDuck-Converter-CSV

jobs:
changelog:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Upload artifact with CHANGELOG
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-changelog
path: CHANGELOG.md

build-linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install dependencies
run: |
python -m venv venv
./venv/bin/python -m pip install --upgrade pip
./venv/bin/python -m pip install pyinstaller
./venv/bin/python -m pip install -r requirements.txt

- name: Build
run: |
./venv/bin/python -m pip list
./venv/bin/python -m PyInstaller ${{ env.folder_package_name }}/__main__.py --name "${{ env.app_name_dash }}" --onefile --windowed --icon=./icons/${{ env.app_name_dash }}.ico --distpath dist

- name: Archive binary
run: |
cd dist
ls -la .
mkdir ${{ env.app_name_dash }}-${{ github.ref_name }}-linux
mv "${{ env.app_name_dash }}" ${{ env.app_name_dash }}-${{ github.ref_name }}-linux
zip -r ${{ env.app_name_dash }}-${{ github.ref_name }}-linux.zip ${{ env.app_name_dash }}-${{ github.ref_name }}-linux
ls -la .

- name: Upload artifact with binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-binary
path: dist/${{ env.app_name_dash }}-${{ github.ref_name }}-linux.zip

build-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
needs: build-linux
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install dependencies
run: |
python -m venv venv
.\venv\Scripts\python -m pip install --upgrade pip
.\venv\Scripts\python -m pip install pyinstaller
.\venv\Scripts\python -m pip install -r requirements.txt

- name: Build
run: |
.\venv\Scripts\python -m pip list
.\venv\Scripts\python -m PyInstaller ${{ env.folder_package_name }}\__main__.py --name "${{ env.app_name }}" --onefile --windowed --version-file=.\version.rc --icon=.\icons\${{ env.app_name_dash }}.ico --distpath dist

- name: Archive binary
run: |
cd dist
dir .
mkdir ${{ env.app_name_dash }}-${{ github.ref_name }}-windows
mv '${{ env.app_name }}.exe' ${{ env.app_name_dash }}-${{ github.ref_name }}-windows
tar -a -c -f ${{ env.app_name_dash }}-${{ github.ref_name }}-windows.zip ${{ env.app_name_dash }}-${{ github.ref_name }}-windows
dir .

- name: Upload artifact with binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-binary
path: dist\${{ env.app_name_dash }}-${{ github.ref_name }}-windows.zip

build-macos-arm64:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
needs: build-windows
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install dependencies
run: |
python -m venv venv
./venv/bin/python -m pip install --upgrade pip
./venv/bin/python -m pip install pyinstaller
./venv/bin/python -m pip install -r requirements.txt

- name: Build
run: |
./venv/bin/python -m pip list
./venv/bin/python -m PyInstaller ${{ env.folder_package_name }}/__main__.py --name "${{ env.app_name }}" --windowed --icon=./icons/${{ env.app_name_dash }}.ico --distpath dist

- name: Archive binary
run: |
cd dist
ls -la .
mkdir ${{ env.app_name_dash }}-${{ github.ref_name }}-macos-arm64
mv "${{ env.app_name }}.app" ${{ env.app_name_dash }}-${{ github.ref_name }}-macos-arm64
zip -r ${{ env.app_name_dash }}-${{ github.ref_name }}-macos-arm64.zip ${{ env.app_name_dash }}-${{ github.ref_name }}-macos-arm64
ls -la .

- name: Upload artifact with binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-binary
path: dist/${{ env.app_name_dash }}-${{ github.ref_name }}-macos-arm64.zip

build-macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest-large]
needs: build-macos-arm64
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install dependencies
run: |
python -m venv venv
./venv/bin/python -m pip install --upgrade pip
./venv/bin/python -m pip install pyinstaller
./venv/bin/python -m pip install -r requirements.txt

- name: Build
run: |
./venv/bin/python -m pip list
./venv/bin/python -m PyInstaller ${{ env.folder_package_name }}/__main__.py --name "${{ env.app_name }}" --windowed --icon=./icons/${{ env.app_name_dash }}.ico --distpath dist

- name: Archive binary
run: |
cd dist
ls -la .
mkdir ${{ env.app_name_dash }}-${{ github.ref_name }}-macos
mv "${{ env.app_name }}.app" ${{ env.app_name_dash }}-${{ github.ref_name }}-macos
zip -r ${{ env.app_name_dash }}-${{ github.ref_name }}-macos.zip ${{ env.app_name_dash }}-${{ github.ref_name }}-macos
ls -la .

- name: Upload artifact with binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-binary
path: dist/${{ env.app_name_dash }}-${{ github.ref_name }}-macos.zip


release:
needs: [changelog, build-linux, build-windows, build-macos, build-macos-arm64]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ./downloaded-app-artifacts

- name: Generate SHA256 for Linux binary
run: |
cd downloaded-app-artifacts/ubuntu-latest-binary
sha256sum ${{ env.app_name_dash }}-${{ github.ref_name }}-linux.zip > ${{ env.app_name_dash }}-${{ github.ref_name }}-linux.zip.sha256
ls -la

- name: Generate SHA256 for macOS arm64 binary
run: |
cd downloaded-app-artifacts/macos-latest-binary
sha256sum ${{ env.app_name_dash }}-${{ github.ref_name }}-macos-arm64.zip > ${{ env.app_name_dash }}-${{ github.ref_name }}-macos-arm64.zip.sha256
ls -la

- name: Generate SHA256 for macOS binary
run: |
cd downloaded-app-artifacts/macos-latest-large-binary
sha256sum ${{ env.app_name_dash }}-${{ github.ref_name }}-macos.zip > ${{ env.app_name_dash }}-${{ github.ref_name }}-macos.zip.sha256
ls -la

- name: Generate SHA256 for Windows binary
run: |
cd downloaded-app-artifacts/windows-latest-binary
sha256sum ${{ env.app_name_dash }}-${{ github.ref_name }}-windows.zip > ${{ env.app_name_dash }}-${{ github.ref_name }}-windows.zip.sha256
ls -la

- name: Check location
run: |
ls -la
ls -la ./downloaded-app-artifacts
ls -la ./downloaded-app-artifacts/ubuntu-latest-changelog
ls -la ./downloaded-app-artifacts/ubuntu-latest-binary
ls -la ./downloaded-app-artifacts/macos-latest-binary
ls -la ./downloaded-app-artifacts/macos-latest-large-binary
ls -la ./downloaded-app-artifacts/windows-latest-binary

- name: Generate info
run: |
echo "## Summary" > info.md
awk '/^## /{if (p) exit; p=1; next} p' ./downloaded-app-artifacts/ubuntu-latest-changelog/CHANGELOG.md >> info.md
echo "## Checksums" >> info.md
echo "\`$(cat ./downloaded-app-artifacts/ubuntu-latest-binary/${{ env.app_name_dash }}-${{ github.ref_name }}-linux.zip.sha256)\`" >> info.md
echo "\`$(cat ./downloaded-app-artifacts/macos-latest-binary/${{ env.app_name_dash }}-${{ github.ref_name }}-macos-arm64.zip.sha256)\`" >> info.md
echo "\`$(cat ./downloaded-app-artifacts/macos-latest-large-binary/${{ env.app_name_dash }}-${{ github.ref_name }}-macos.zip.sha256)\`" >> info.md
echo "\`$(cat ./downloaded-app-artifacts/windows-latest-binary/${{ env.app_name_dash }}-${{ github.ref_name }}-windows.zip.sha256)\`" >> info.md

- name: Check location
run: |
ls -la
ls -la ./downloaded-app-artifacts
ls -la ./downloaded-app-artifacts/ubuntu-latest-binary
ls -la ./downloaded-app-artifacts/macos-latest-binary
ls -la ./downloaded-app-artifacts/macos-latest-large-binary
ls -la ./downloaded-app-artifacts/windows-latest-binary

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
./downloaded-app-artifacts/ubuntu-latest-binary/${{ env.app_name_dash }}-${{ github.ref_name }}-linux.zip
./downloaded-app-artifacts/macos-latest-binary/${{ env.app_name_dash }}-${{ github.ref_name }}-macos-arm64.zip
./downloaded-app-artifacts/macos-latest-large-binary/${{ env.app_name_dash }}-${{ github.ref_name }}-macos.zip
./downloaded-app-artifacts/windows-latest-binary/${{ env.app_name_dash }}-${{ github.ref_name }}-windows.zip
body_path: info.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.4.1] - 2025-09-08

### Added

- Pipeline with Build and Release for Windows, macOS and Linux.
- Requirements update
- new:
- requests>=2.32.5

### Changed

- Icon file changed and renamed from `LimberDuck-converter-csv` to `LimberDuck-Converter-CSV`.
- Default target directory changed from *current directory* to *user’s home directory*.
- Fix for app build on macOS.
- Update check directing to GitHub Releases as well.
- Suffix fields width increased to improve GUI on Windows.
- `version.rc` file info updated.

## [0.4.0] - 2025-09-01

### Added
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ sudo apt-get install --reinstall libxcb-xinerama0
6. Build your own executable file using below command

```
pyinstaller --onefile --windowed --icon=.\icons\LimberDuck-converter-csv.ico --name converter-csv converter_csv\__main__.py
pyinstaller --onefile --windowed --icon=.\icons\LimberDuck-Converter-CSV.ico --name converter-csv converter_csv\__main__.py
```

7. Go to `dist` catalog to find executable file `converter-csv.exe`
Expand Down Expand Up @@ -217,7 +217,7 @@ sudo apt-get install --reinstall libxcb-xinerama0
6. Build your own executable file using below command

```
pyinstaller --onefile --windowed --icon=./icons/LimberDuck-converter-csv.ico --name converter-csv converter_csv/__main__.py
pyinstaller --onefile --windowed --icon=./icons/LimberDuck-Converter-CSV.ico --name converter-csv converter_csv/__main__.py
```

7. Go to `dist` catalog to find executable file `converter-csv`.
Expand Down Expand Up @@ -262,7 +262,7 @@ sudo apt-get install --reinstall libxcb-xinerama0
6. Build your own executable file using below command

```
pyinstaller --onefile --windowed --icon=./icons/LimberDuck-converter-csv.ico --name converter-csv converter_csv/__main__.py
pyinstaller --onefile --windowed --icon=./icons/LimberDuck-Converter-CSV.ico --name converter-csv converter_csv/__main__.py
```

7. Go to `dist` catalog to find executable file `converter-csv`.
Expand Down
6 changes: 3 additions & 3 deletions converter_csv/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@

__title__ = "Converter CSV by LimberDuck"
__package_name__ = "converter-csv"
__icon__ = "LimberDuck-converter-csv.ico"
__icon__ = "LimberDuck-Converter-CSV.ico"
__summary__ = "Converter CSV by LimberDuck is a GUI tool to convert multiple large csv files to xlsx files."
__uri__ = "https://limberduck.org"
__version__ = "0.4.0"
__release_date__ = "2025.09.01"
__version__ = "0.4.1"
__release_date__ = "2025.09.08"
__author__ = "Damian Krawczyk"
__email__ = "damian.krawczyk@limberduck.org"
__license_name__ = "GNU GPLv3"
Expand Down
2 changes: 1 addition & 1 deletion converter_csv/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.0"
__version__ = "0.4.1"
11 changes: 7 additions & 4 deletions converter_csv/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def __init__(self, parent=None):
self.pushButton_start.setDisabled(True)
self.progressBar.setHidden(True)

cwd = os.getcwd()
self.set_target_directory(cwd)
target_dir = os.path.expanduser('~')
self.set_target_directory(target_dir)
self.get_target_directory_from_file()

files = sys.argv[1:]
Expand Down Expand Up @@ -829,6 +829,9 @@ def log_emitter(self, action_name, source_file_name, additional_info=""):


def main():
if getattr(sys, 'frozen', False):
os.chdir(os.path.dirname(sys.executable))

app = QApplication(sys.argv)
form = MainWindow()

Expand All @@ -843,11 +846,11 @@ def main():
app_window_title = name
form.setWindowTitle(app_window_title)

# app_icon_file_name_png = 'LimberDuck-converter-csv.png'
# app_icon_file_name_png = 'LimberDuck-Converter-CSV.png'
# app_icon_file_name_png_to_ico = utilities.png_to_ico(app_icon_file_name_png)
# app_icon_file_name_ico_to_base64 = utilities.file_to_base64(app_icon_file_name_png_to_ico)
# app_icon_file_name_ico = utilities.base64_to_ico(app_icon_file_name_ico_to_base64,app_icon_file_name_png)
# app_icon_file_name_ico = 'LimberDuck-converter-csv.ico'
# app_icon_file_name_ico = 'LimberDuck-Converter-CSV.ico'

icon_file_name = __about__.__icon__
utilities.base64_to_ico(ldcc_ico.ico, icon_file_name)
Expand Down
2 changes: 1 addition & 1 deletion converter_csv/dialogs/update_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def check_for_update(self):
f"<b> A new version of {self.appName} is available!</b><br><br>"
f"Latest: <b>{latest}</b><br>"
f"You have: <b>{self.current_version}</b><br><br>"
f"Update with:<br>"
f"Download latest version directly from <a href='https://github.com/LimberDuck/{PACKAGE_NAME}/releases'>GitHub Releases</a> or update with:<br>"
f"<code>pip install -U {PACKAGE_NAME}</code><br><br>"
f"{read_more}"
)
Expand Down
2 changes: 1 addition & 1 deletion converter_csv/ico_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@

from converter_csv import utilities

png_filename = "../icons/LimberDuck-converter-csv.png"
png_filename = "../icons/LimberDuck-Converter-CSV.png"

print(utilities.file_to_base64(utilities.png_to_ico(png_filename)))
2 changes: 1 addition & 1 deletion converter_csv/ldcc_ico.py

Large diffs are not rendered by default.

Loading
Loading