Skip to content

Commit 05f9c96

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/apps
2 parents c7cf96c + 71067d7 commit 05f9c96

File tree

125 files changed

+13445
-7927
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+13445
-7927
lines changed

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# AGENTS.md
2+
3+
This file provides guidance to agents when working with code in this repository.
4+
5+
## General Guidelines
6+
7+
1. Modern Python First: Use Python 3.12+ features extensively - built-in generics, pattern matching, and dataclasses.
8+
2. KISS Principle: Aim for simplicity and clarity. Avoid unnecessary abstractions or metaprogramming.
9+
3. DRY with Care: Reuse code appropriately but avoid over-engineering. Each command handler has single responsibility.
10+
11+
## Test after any change
12+
13+
1. Activate venv before any test execution:
14+
15+
```bash
16+
source .venv/bin/activate
17+
```
18+
19+
2. Run pytest with following command to ensure all tests pass:
20+
21+
```bash
22+
pytest -v -q --strict-markers
23+
```
24+
25+
## Run the application
26+
27+
```bash
28+
python run.py --help
29+
python run.py install appflowy
30+
python run.py update appflowy
31+
```

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,33 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## v1.8.0-alpha
5+
### BREAKING CHANGES
6+
This release removes the `self-update` command to use `upgrade` command instead for better clarity and consistency. Also, upgrade command now removed the rich progress bar and use simple text-based progress updates to improve performance and reduce resource consumption.
7+
8+
### Migration guide
9+
Please update manually with setup.sh script. Run the following commands in your terminal:
10+
11+
```bash
12+
git clone https://github.com/Cyber-Syntax/my-unicorn.git
13+
cd my-unicorn
14+
./setup.sh
15+
```
16+
17+
## v1.7.4-alpha
18+
## v1.7.3-alpha
19+
## v1.7.2-alpha
20+
## v1.7.1-alpha
21+
## v1.7.0-alpha
22+
# CHANGES
23+
This release refactors the codebase for improved code readability, maintainability and performance.
24+
25+
- Removed size verification logic which it was not best practice to verify app integrity.
26+
27+
## v1.6.0-alpha
28+
# BREAKING CHANGES
29+
This release introduces a comprehensive caching mechanism for GitHub release data, enhancing performance and reducing redundant API calls. The caching system is designed to store release information persistently, with a configurable time-to-live (TTL) to ensure data freshness. Additionally, the release includes significant improvements to the logging capabilities of the verification service, providing detailed insights into the verification process and asset handling.
30+
431
## v1.5.1-alpha
532
## v1.5.0-alpha
633
# BREAKING CHANGES

README.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
Türkçe Açıklama: [README.tr.md](README.tr.md)
1+
Turkish: [README.tr.md](README.tr.md)
22

33
> [!CAUTION]
4-
> This project is in a **alpha phase** due to limited testing at this time.
54
>
6-
> **Important:** Follow the instructions in the **Releases section** when updating the script.
7-
>
8-
> **Supported OS:** Currently, only Linux is supported.
5+
> - This project is in a **alpha phase** due to limited testing at this time.
6+
> - **Important:** Follow the instructions in the **Releases section** when updating the script.
7+
> - **Supported OS:** Currently, only Linux is supported.
98
109
# **🦄 About my-unicorn**
1110

1211
> [!NOTE]
13-
> I always frustrated with the manual AppImage update process and I created this project to automate the process.
12+
> My Unicorn is a command-line tool to manage AppImages on Linux. It allows users to install, update, and manage AppImages from GitHub repositories easily. It's designed to simplify the process of handling AppImages, making it more convenient for users to keep their applications up-to-date.
1413
>
15-
> This project introduces a Python-based CLI tool that treats AppImages like packages: installable, updatable,
16-
> and manageable via a simple interface.
17-
> Detailed information: [wiki.md](docs/wiki.md)
14+
> - Detailed information: [wiki.md](docs/wiki.md)
1815
1916
- **Supported Applications:**
20-
- Super-Productivity, Siyuan, Joplin, Standard-notes, Logseq, QOwnNotes, Tagspaces, Zen-Browser, weektodo, Zettlr, HeroicGamesLauncher, KDiskMark, AppFlowy, Obsidian
17+
- Super-Productivity, Siyuan, Joplin, Standard-notes, Logseq, QOwnNotes, Tagspaces, Zen-Browser, Zettlr, HeroicGamesLauncher, KDiskMark, AppFlowy, Obsidian
2118
- Applications without verification (developer doesn't provide hash):
19+
- WeekToDo
2220
- FreeTube
23-
- Related issue: https://github.com/FreeTubeApp/FreeTube/issues/4720)
21+
- Related issue: <https://github.com/FreeTubeApp/FreeTube/issues/4720>)
2422
- More can be found in the [catalog](my_unicorn/catalog/) folder.
2523
- **Supported hash types:**
2624
- sha256, sha512
@@ -41,16 +39,27 @@ Türkçe Açıklama: [README.tr.md](README.tr.md)
4139

4240
```bash
4341
cd my-unicorn &
44-
sh my-unicorn-installer.sh install
42+
sh setup.sh install
43+
```
44+
45+
3. Add autocomplete (optional):
46+
47+
```bash
48+
# auto-detect your shell and install autocomplete
49+
sh setup.sh autocomplete
50+
51+
# or manually add autocomplete for bash or zsh
52+
sh setup.sh autocomplete bash
53+
sh setup.sh autocomplete zsh
4554
```
4655

47-
3. Start using my-unicorn:
56+
4. Start using my-unicorn:
4857

4958
```bash
5059
my-unicorn --help # to see the command options
5160
```
5261

53-
## For using uncompatible apps (installing with URL):
62+
## For using uncompatible apps (installing with URL)
5463

5564
> [!IMPORTANT]
5665
> If you want to install an uncompatible app, you'll need to know some information about the application.

README.tr.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
English Description: [README.md](README.md)
22

33
> [!CAUTION]
4-
> Bu proje sınırlı testlerden dolayı şu anlık **alpha aşamasındadır**.
4+
> Bu proje sınırlı testlerden dolayı şu anlık **alpha aşamasındadır**.
55
>
66
> **Önemli:** Script’i güncellerken **Releases** bölümündeki talimatları takip edin.
77
>
@@ -10,15 +10,15 @@ English Description: [README.md](README.md)
1010
## **🦄 my-unicorn Hakkında**
1111

1212
> [!NOTE]
13-
> Manuel AppImage güncelleme sürecinden yılmıştım, süreci otomatikleştirmek için bu projeyi oluşturdum.
13+
> Manuel AppImage güncelleme sürecinden yılmıştım, süreci otomatikleştirmek için bu projeyi oluşturdum.
1414
>
15-
> Detaylı bilgi: [wiki.md](docs/wiki.md)
15+
> Detaylı bilgi: [wiki.md](docs/wiki.md)
1616
1717
- **Desteklenen Uygulamalar:**
1818
- Super-Productivity, Siyuan, Joplin, Standard-notes, Logseq, QOwnNotes, Tagspaces, Zen-Browser, weektodo, Zettlr
1919
- Doğrulaması olmayan uygulamalar (yazılımcıları hash sağlamıyor):
2020
- FreeTube
21-
- Bağlantılı sorun: https://github.com/FreeTubeApp/FreeTube/issues/4720)
21+
- Bağlantılı sorun: <https://github.com/FreeTubeApp/FreeTube/issues/4720>)
2222
- AppFlowy
2323
- Obsidian
2424
- Daha fazlası [apps](my_unicorn/apps/) klasöründe bulunabilir.
@@ -41,10 +41,10 @@ English Description: [README.md](README.md)
4141

4242
```bash
4343
cd my-unicorn &
44-
sh my-unicorn-installer.sh install
44+
sh setup.sh install
4545
```
46-
47-
## Paketi kaldır:
46+
47+
## Paketi kaldır
4848

4949
> [!TIP]
5050
> Eğer paketi küresel olarak yüklediyseniz, aşağıdaki komutu kullanarak kaldırabilirsiniz:
@@ -55,7 +55,7 @@ English Description: [README.md](README.md)
5555

5656
# Nasıl Kullanılır?
5757

58-
## Paket olarak kullanım:
58+
## Paket olarak kullanım
5959

6060
```bash
6161
my-unicorn --help # to see the command options
@@ -91,25 +91,24 @@ my-unicorn migrate --clean # Migrate configuration files
9191
my-unicorn migrate --force # Migrate configuration without confirmation
9292
```
9393

94-
95-
## Desteklenmeyen uygulamalar için (URL ile kurulum):
94+
## Desteklenmeyen uygulamalar için (URL ile kurulum)
9695

9796
> [!IMPORTANT]
9897
> Eğer desteklenmeyen bir uygulamayı kurmak istiyorsanız, uygulama hakkında bazı bilgilere sahip olmanız gerekecektir.
9998

10099
- **GitHub URL:** Uygulamanın GitHub depo adresi (örn. `https://github.com/johannesjo/super-productivity`).
101100
- Hash türü ve Hash dosya adı otamatik olarak tespit edilir. Eğer uygulamanın uyumluluğu yoksa veya hata oluşursa aşağıdaki bilgileri sağlamanız gerekecek:
102-
- **Hash türü:** Hash türünü belirtin (örn. super-productivity için sha512).
103-
- **Hash doğrulama sorunları:** Eğer hash doğrulama başarısız olursa, hash'i manuel olarak JSON dosyasına ekleyebilirsiniz:
104-
- En son hash bilgisini GitHub sürüm sayfasında bulabilirsiniz (örn. [super-productivity releases](https://github.com/johannesjo/super-productivity/releases)).
105-
- Örnekler için [apps](my_unicorn/apps/) klasörüne bakabilirsiniz.
101+
- **Hash türü:** Hash türünü belirtin (örn. super-productivity için sha512).
102+
- **Hash doğrulama sorunları:** Eğer hash doğrulama başarısız olursa, hash'i manuel olarak JSON dosyasına ekleyebilirsiniz:
103+
- En son hash bilgisini GitHub sürüm sayfasında bulabilirsiniz (örn. [super-productivity releases](https://github.com/johannesjo/super-productivity/releases)).
104+
- Örnekler için [apps](my_unicorn/apps/) klasörüne bakabilirsiniz.
106105
107106
# **🙏 Bu Projeye Destek Olun**
108107
109108
- **GitHub üzerinde yıldız ⭐** vererek desteğinizi gösterebilirsiniz, böylece kodlama yolculuğumda motive olmamı sağlar!
110109
- **Test:** Eğer betiği test eder ve karşılaştığınız herhangi bir sorun hakkında geri bildirim sağlayabilirseniz harika olur.
111110
- **💖 Projeyi Destekle:** Çalışmalarımı desteklemek ve projeler yapmaya devam etmemi sağlamak istersen, bana sponsor olmayı düşünebilirsin:
112-
- [![Sponsor Ol](https://img.shields.io/badge/Sponsor-💖-brightgreen)](https://github.com/sponsors/Cyber-Syntax)
111+
- [![Sponsor Ol](https://img.shields.io/badge/Sponsor-💖-brightgreen)](https://github.com/sponsors/Cyber-Syntax)
113112
114113
## **🤝 Katkı Sağlama**
115114

autocomplete/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Completions
2+
3+
This directory contains subdirectories for `my-unicorn`'s tab completions for `bash` and `zsh`.

autocomplete/bash_autocomplete

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
#!/bin/bash
2+
3+
# my-unicorn bash completion script
4+
# Source this file to enable tab completion for my-unicorn command
5+
6+
_my_unicorn_completion() {
7+
local cur prev commands
8+
COMPREPLY=()
9+
cur="${COMP_WORDS[COMP_CWORD]}"
10+
prev="${COMP_WORDS[COMP_CWORD-1]}"
11+
12+
# Available commands
13+
commands="install update upgrade list remove backup cache auth config"
14+
15+
# Global options
16+
local global_opts="--help --version"
17+
18+
# Command-specific options
19+
local install_opts="--concurrency --no-icon --no-verify --no-desktop --verbose --help"
20+
local update_opts="--check-only --refresh-cache --verbose --help"
21+
local upgrade_opts="--check-only --help"
22+
local list_opts="--available --help"
23+
local remove_opts="--keep-config --help"
24+
local backup_opts="--restore-last --restore-version --list-backups --cleanup --info --migrate --help"
25+
local cache_opts="clear stats --help"
26+
local cache_clear_opts="--all --help"
27+
local auth_opts="--save-token --remove-token --status --help"
28+
local config_opts="--show --reset --help"
29+
30+
# If we're completing the first argument (command)
31+
if [[ ${COMP_CWORD} -eq 1 ]]; then
32+
mapfile -t COMPREPLY < <(compgen -W "${commands} ${global_opts}" -- "${cur}")
33+
return 0
34+
fi
35+
36+
# Get the command being used
37+
local command="${COMP_WORDS[1]}"
38+
39+
case "${command}" in
40+
install)
41+
case "${prev}" in
42+
--concurrency)
43+
# Numeric value expected
44+
COMPREPLY=()
45+
;;
46+
*)
47+
if [[ ${cur} == -* ]]; then
48+
mapfile -t COMPREPLY < <(compgen -W "${install_opts}" -- "${cur}")
49+
else
50+
# Complete with app names or URLs
51+
COMPREPLY=()
52+
fi
53+
;;
54+
esac
55+
;;
56+
update)
57+
if [[ ${cur} == -* ]]; then
58+
mapfile -t COMPREPLY < <(compgen -W "${update_opts}" -- "${cur}")
59+
else
60+
# Complete with installed app names
61+
COMPREPLY=()
62+
fi
63+
;;
64+
upgrade)
65+
mapfile -t COMPREPLY < <(compgen -W "${upgrade_opts}" -- "${cur}")
66+
;;
67+
list)
68+
mapfile -t COMPREPLY < <(compgen -W "${list_opts}" -- "${cur}")
69+
;;
70+
remove)
71+
if [[ ${cur} == -* ]]; then
72+
mapfile -t COMPREPLY < <(compgen -W "${remove_opts}" -- "${cur}")
73+
else
74+
# Complete with installed app names
75+
COMPREPLY=()
76+
fi
77+
;;
78+
backup)
79+
case "${prev}" in
80+
--restore-version)
81+
# Version string expected
82+
COMPREPLY=()
83+
;;
84+
*)
85+
if [[ ${cur} == -* ]]; then
86+
mapfile -t COMPREPLY < <(compgen -W "${backup_opts}" -- "${cur}")
87+
else
88+
# Complete with app names
89+
COMPREPLY=()
90+
fi
91+
;;
92+
esac
93+
;;
94+
cache)
95+
if [[ ${COMP_CWORD} -eq 2 ]]; then
96+
mapfile -t COMPREPLY < <(compgen -W "${cache_opts}" -- "${cur}")
97+
elif [[ ${COMP_WORDS[2]} == "clear" ]]; then
98+
if [[ ${cur} == -* ]]; then
99+
mapfile -t COMPREPLY < <(compgen -W "${cache_clear_opts}" -- "${cur}")
100+
else
101+
# Complete with app names
102+
COMPREPLY=()
103+
fi
104+
fi
105+
;;
106+
auth)
107+
mapfile -t COMPREPLY < <(compgen -W "${auth_opts}" -- "${cur}")
108+
;;
109+
config)
110+
mapfile -t COMPREPLY < <(compgen -W "${config_opts}" -- "${cur}")
111+
;;
112+
*)
113+
COMPREPLY=()
114+
;;
115+
esac
116+
117+
return 0
118+
}
119+
120+
# Register the completion function
121+
complete -F _my_unicorn_completion my-unicorn

0 commit comments

Comments
 (0)