Skip to content

Commit 961301e

Browse files
Initial commit
0 parents  commit 961301e

File tree

6 files changed

+960
-0
lines changed

6 files changed

+960
-0
lines changed

.github/workflows/build.yml

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build WallCrop
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
name: Build ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
permissions:
14+
contents: write
15+
strategy:
16+
matrix:
17+
os: [windows-latest, macos-latest, ubuntu-latest]
18+
python-version: ['3.13']
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install macOS dependencies
29+
if: matrix.os == 'macos-latest'
30+
run: |
31+
brew install python-tk
32+
33+
- name: Install Linux dependencies
34+
if: matrix.os == 'ubuntu-latest'
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y python3-dev python3-tk
38+
39+
- name: Install Python dependencies
40+
run: |
41+
python -m pip install --upgrade pip wheel setuptools
42+
python -m pip install -r requirements.txt
43+
44+
- name: Build with PyInstaller
45+
run: |
46+
python -m PyInstaller --name WallCrop --windowed --onefile src/wallpaper_cropper.py
47+
48+
- name: Create release package (Windows)
49+
if: matrix.os == 'windows-latest'
50+
run: |
51+
mkdir WallCrop-Windows
52+
move dist\WallCrop.exe WallCrop-Windows\
53+
copy README.md WallCrop-Windows\
54+
7z a "WallCrop-Windows-${{ github.ref_name }}.zip" WallCrop-Windows\
55+
56+
- name: Create release package (macOS)
57+
if: matrix.os == 'macos-latest'
58+
run: |
59+
mkdir -p WallCrop-macOS
60+
cp -r dist/WallCrop WallCrop-macOS/
61+
cp README.md WallCrop-macOS/
62+
tar -czf "WallCrop-macOS-${{ github.ref_name }}.tar.gz" WallCrop-macOS/
63+
64+
- name: Create release package (Linux)
65+
if: matrix.os == 'ubuntu-latest'
66+
run: |
67+
mkdir WallCrop-Linux
68+
mv dist/WallCrop WallCrop-Linux/
69+
cp README.md WallCrop-Linux/
70+
tar -czf "WallCrop-Linux-${{ github.ref_name }}.tar.gz" WallCrop-Linux/
71+
72+
- name: Upload artifacts
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: WallCrop-${{ matrix.os }}
76+
path: |
77+
WallCrop-*-${{ github.ref_name }}.*
78+
79+
- name: Create Release
80+
if: startsWith(github.ref, 'refs/tags/')
81+
uses: softprops/action-gh-release@v1
82+
with:
83+
files: |
84+
WallCrop-*-${{ github.ref_name }}.*
85+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Virtual Environment
7+
.venv/
8+
venv/
9+
ENV/
10+
11+
# PyInstaller
12+
build/
13+
dist/
14+
*.spec
15+
16+
# IDE
17+
.vscode/
18+
.idea/
19+
20+
# OS
21+
.DS_Store
22+
Thumbs.db

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Bintang Timurlangit
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.

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# WallCrop
2+
3+
A cross-platform application for cropping wallpapers for dual monitor setups.
4+
5+
## Features
6+
- Load any image file
7+
- Interactive cropping interface
8+
- Real-time preview for both monitors
9+
- Export separate wallpapers for each monitor
10+
11+
## Installation
12+
Download the latest release for your platform:
13+
- Windows: `WallCrop-Windows.zip`
14+
- macOS: `WallCrop-macOS.dmg`
15+
- Linux: `WallCrop-Linux.tar.gz`
16+
17+
## Development
18+
1. Clone the repository
19+
2. Create a virtual environment: `python -m venv .venv`
20+
3. Activate the virtual environment:
21+
- Windows: `.venv\Scripts\activate`
22+
- macOS/Linux: `source .venv/bin/activate`
23+
4. Install dependencies: `pip install -r requirements.txt`
24+
5. Run the application: `python src/wallpaper_cropper.py`
25+
26+
## License
27+
[MIT License](LICENSE)

requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pillow>=10.0.0
2+
PyQt6>=6.6.0
3+
pyinstaller>=6.11.0

0 commit comments

Comments
 (0)