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
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches: [master]
pull_request:
workflow_dispatch:

jobs:
frontend:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run typecheck

rust:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Install Linux system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev librsvg2-dev patchelf libssl-dev
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run generate
- run: cargo check --manifest-path src-tauri/Cargo.toml
47 changes: 0 additions & 47 deletions .github/workflows/publish.yml

This file was deleted.

135 changes: 135 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Release

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

permissions:
contents: write

jobs:
create-release:
runs-on: ubuntu-22.04
outputs:
release_id: ${{ steps.create.outputs.result }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- run: bun install --frozen-lockfile

- name: Generate release notes
id: notes
run: |
PREV_TAG=$(git describe --tags --abbrev=0 "${GITHUB_REF_NAME}^" 2>/dev/null || echo "")
if [ -z "$PREV_TAG" ]; then
PREV_TAG=$(git rev-list --max-parents=0 HEAD | tail -1)
fi
echo "Generating notes from ${PREV_TAG} to ${GITHUB_REF_NAME}"
bun x changelogen --output RELEASE_NOTES.md --from "${PREV_TAG}" --to "${GITHUB_REF_NAME}"
NOTES=$(sed '/^## /d' RELEASE_NOTES.md | sed '/./,$!d')
rm -f RELEASE_NOTES.md
{
echo "body<<CHANGELOG_EOF"
echo "${NOTES}"
echo "CHANGELOG_EOF"
} >> "$GITHUB_OUTPUT"

- name: Create draft release
id: create
uses: actions/github-script@v8
env:
RELEASE_BODY: ${{ steps.notes.outputs.body }}
with:
script: |
const { data } = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: process.env.GITHUB_REF_NAME,
name: `starnetGUI ${process.env.GITHUB_REF_NAME}`,
body: process.env.RELEASE_BODY || 'See the assets below to download and install this version.',
draft: true,
prerelease: process.env.GITHUB_REF_NAME.includes('-')
})
return data.id

build:
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest # Apple Silicon
args: "--target aarch64-apple-darwin"
- platform: macos-latest # Intel
args: "--target x86_64-apple-darwin"
- platform: ubuntu-22.04
args: ""
- platform: windows-latest
args: ""

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v5

- name: Install Linux system dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Cache Rust
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install frontend dependencies
run: bun install --frozen-lockfile

- name: Build, sign, and upload
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}
includeUpdaterJson: true
args: ${{ matrix.args }}

publish:
needs: [create-release, build]
runs-on: ubuntu-22.04
steps:
- name: Publish the release
uses: actions/github-script@v8
with:
script: |
await github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: ${{ needs.create-release.outputs.release_id }},
draft: false
})
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
node_modules
.DS_Store
.nuxt
.output
.data
dist
dist-ssr
*.local
.DS_Store
*.log
*.key
.env
.env.*
.hallmark
114 changes: 79 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,95 @@
# StarNet++ GUI
<p align="center">
<img src="src-tauri/icons/128x128@2x.png" alt="" width="128" height="128" />
</p>

<h1 align="center">StarNet GUI</h1>

A desktop interface for the [StarNet2](https://starnetastro.com/cli-tools/starnet/) star removal command-line tool, on macOS, Windows and Linux.

<p align="center">
<img src="https://user-images.githubusercontent.com/58784686/152813914-7747b6c1-faee-462e-b544-0fca4cf1a096.png" />
<a href="https://github.com/Ripwords/starnetGUI/releases/download/v2.0.0/starnetGUI_2.0.0_aarch64.dmg"><img src="https://img.shields.io/badge/Apple%20Silicon-3F454D?style=for-the-badge&logo=apple&logoColor=white" alt="Download for Mac (Apple Silicon)" /></a>
<a href="https://github.com/Ripwords/starnetGUI/releases/download/v2.0.0/starnetGUI_2.0.0_x64.dmg"><img src="https://img.shields.io/badge/Intel-3F454D?style=for-the-badge&logo=apple&logoColor=white" alt="Download for Mac (Intel)" /></a>
<a href="https://github.com/Ripwords/starnetGUI/releases/download/v2.0.0/starnetGUI_2.0.0_x64-setup.exe"><img src="https://img.shields.io/badge/Windows-3F454D?style=for-the-badge&logo=windows11&logoColor=white" alt="Download for Windows" /></a>
<a href="https://github.com/Ripwords/starnetGUI/releases/download/v2.0.0/starnetGUI_2.0.0_amd64.AppImage"><img src="https://img.shields.io/badge/Linux-3F454D?style=for-the-badge&logo=linux&logoColor=white" alt="Download for Linux" /></a>
</p>

<p align="center">
<a href="https://github.com/Ripwords/starnetGUI/releases/download/starnetGUI-v1.1.1/starnetGUI_1.1.1_x64_en-US.msi" target="_blank">
<img src="https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white" />
</a>
<a href="https://github.com/Ripwords/starnetGUI/releases/download/starnetGUI-v1.1.1/starnet-gui_1.1.1_amd64.AppImage" target="_blank">
<img src="https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black" />
</a>
<a href="https://github.com/Ripwords/starnetGUI/releases/download/starnetGUI-v1.1.1/starnet-gui_1.1.1_amd64.deb" target="_blank">
<img src="https://img.shields.io/badge/Debian-D70A53?style=for-the-badge&logo=debian&logoColor=white" />
</a>
<a href="https://github.com/Ripwords/starnetGUI/releases/download/starnetGUI-v1.1.1/starnetGUI_1.1.1_x64.dmg" target="_blank">
<img src="https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=macos&logoColor=F0F0F0" />
</a>
<img src="screenshots/running.png" alt="Three images running at once with the live log open" width="49%" />
<img src="screenshots/done.png" alt="A finished batch" width="49%" />
</p>

---
## Features

- Removes stars from one image or a batch, with drag and drop.
- Reads TIFF, PNG and FITS, including `.fits.gz`.
- Optionally saves a star mask and a star layer next to the starless image.
- Handles linear data, with adjustable stretch, and 2x upsampling.
- Processes up to four images at once, and shows a live log while it runs.
- Shows StarNet2 warnings, such as clipped data or a CPU fallback, on the finished image.
- Finds StarNet2 automatically after a normal install.
- Updates itself when a new version is released.

## Features
1. Multi-File Drag and Drop support
2. File filtering ( allows only .tif and .tiff files )
3. Easy output file naming
4. Auto Updater
## Getting started

1. Install the current StarNet2 command-line tool from the [StarNet download page](https://starnetastro.com/cli-tools/starnet/). Choose the installer for your system. This GUI does not include StarNet2.
2. Install StarNet GUI using a button above.
3. Open StarNet GUI, drop your images in, and select **Remove stars**.

### Demo Video
https://youtu.be/OutZCpG2h6E
If you used the StarNet2 ZIP instead of the installer, StarNet GUI asks you to choose the extracted folder. Keep all the files in that folder together.

**Images at once** sets how many images run together. The default is 2. Each extra image uses more memory, and your graphics card's memory on Windows and Linux, so lower it if images fail on a batch. Select **Log** while a batch runs to see StarNet2's output as it arrives.

---
Highlight protection, stride, the linear stretch settings and the StarNet2 location are under **Advanced**.

The older `starnet++` tools are not supported. Install the current StarNet2 tool instead.

<br>
## Output files

<p align="center">
<img src="https://user-images.githubusercontent.com/58784686/152814058-b4517d2b-d57b-47fe-ad03-ba57a2c0d5a9.png" />
</p>
<br>
<p align="center">
<img src="https://user-images.githubusercontent.com/58784686/157604325-fa70ab35-64a0-4e3e-a952-1ea680706955.png" />
</p>
<br>
<p align="center">
<img src="https://user-images.githubusercontent.com/58784686/152814149-b1996808-9919-42df-b71b-c6e5d584b3f5.png" />
</p>
Each result is saved in the same folder as its image, or in the folder you set under **Save to**. Existing files are never overwritten: a number is added to the name instead.

| Option | File |
| --------------- | ----------------------------------- |
| Always | `name_starless.tif` |
| Save star mask | `name_starmask.tif` |
| Save star layer | `name_stars.tif` |

Output keeps the input format. A `.fits.gz` input is saved as `.fits`.

Images must be at least 512 x 512 pixels, or 256 x 256 with **Upsample** on.

## First launch warnings

The app is not code-signed with a paid developer identity, so each system shows a warning the first time.

<details>
<summary><strong>macOS</strong>: "starnetGUI is damaged and can't be opened"</summary>

The app is signed ad-hoc but not notarized, so Gatekeeper quarantines it on download. Drag it to **Applications**, then run:

```bash
xattr -cr /Applications/starnetGUI.app
```

</details>

<details>
<summary><strong>Windows</strong>: "Windows protected your PC"</summary>

Select **More info**, then **Run anyway**.

</details>

## Upgrading from version 1

Version 1 cannot update itself to version 2. Download version 2 using a button above and install it once. Later versions update automatically.

## Development

```bash
bun install
bun run dev
```

Run `bun run release 2.0.1` to release. The script updates the version everywhere, points the download buttons above at the new version, then commits and pushes a tag. The Release workflow builds, signs and publishes the installers and the update manifest.

Publishing needs the `TAURI_SIGNING_PRIVATE_KEY` repository secret. `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` is only needed if the key has a password. A tag with a hyphen, such as `v2.1.0-rc.1`, publishes a prerelease, which the updater ignores.
8 changes: 8 additions & 0 deletions app/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default defineAppConfig({
ui: {
colors: {
primary: "neutral",
neutral: "neutral",
},
},
});
5 changes: 5 additions & 0 deletions app/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<UApp :toaster="{ position: 'bottom-left' }">
<NuxtPage />
</UApp>
</template>
Loading
Loading