clapp-pm 1.0.41__py3-none-any.whl → 1.0.42__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {clapp_pm-1.0.41.data → clapp_pm-1.0.42.data}/data/version.json +1 -1
- {clapp_pm-1.0.41.dist-info → clapp_pm-1.0.42.dist-info}/METADATA +1 -1
- {clapp_pm-1.0.41.dist-info → clapp_pm-1.0.42.dist-info}/RECORD +16 -9
- packages/cloud-calc/README.md +93 -0
- packages/cloud-calc/clapp-packages-repo/README.md +46 -0
- packages/cloud-calc/clapp-packages-repo/index.json +40 -0
- packages/cloud-calc/clapp-packages-repo/packages.json +40 -0
- packages/cloud-calc/main.py +364 -0
- packages/cloud-calc/manifest.json +8 -0
- packages/cloud-calc/requirements.txt +1 -0
- publish_command.py +28 -22
- version.py +1 -1
- {clapp_pm-1.0.41.dist-info → clapp_pm-1.0.42.dist-info}/WHEEL +0 -0
- {clapp_pm-1.0.41.dist-info → clapp_pm-1.0.42.dist-info}/entry_points.txt +0 -0
- {clapp_pm-1.0.41.dist-info → clapp_pm-1.0.42.dist-info}/licenses/LICENSE +0 -0
- {clapp_pm-1.0.41.dist-info → clapp_pm-1.0.42.dist-info}/top_level.txt +0 -0
@@ -18,12 +18,12 @@ package_runner.py,sha256=yTWIlIXRBQq-FiuoS2qifnJHLajgDOnMv2wPPFL1HtI,5787
|
|
18
18
|
package_signing.py,sha256=ModMAzLk08rkI6zd8QKhyCH5BFbB-7dy8pwqKYatFQo,4579
|
19
19
|
post_install_hint.py,sha256=wjMPCgRurZiGu6hv_se-XA36KqBCdeYdRCD1q7FrJzQ,4918
|
20
20
|
progress_utils.py,sha256=ZH73QNLd5mI4h-JU0hSFR2OU8lesr2XteSZdmFD0bFA,5995
|
21
|
-
publish_command.py,sha256=
|
21
|
+
publish_command.py,sha256=RNebdxnMHCI_7nHBUiNrk1_blxBYyLbDqNG4n6oC0vQ,16316
|
22
22
|
remote_registry.py,sha256=rPBIM_ESXUt0br5cARQ4YbzUoTda0G4e1KGzfyYMbpQ,8235
|
23
23
|
smart_search.py,sha256=R5O5CDXqlQc-N-6R6D5k36_-arCB-wnKfmWr5zMYWUI,15741
|
24
24
|
uninstall_command.py,sha256=rQYbZ-XMw8Xxw1fmgGdDaBQmgBGqyJ_rTBZkvEV5HV0,7066
|
25
25
|
validate_command.py,sha256=idaujErzrwuZNT6DYCVTVwZqBDEEi1GTxIXAGBgKMKM,7623
|
26
|
-
version.py,sha256=
|
26
|
+
version.py,sha256=doqnAedY5ZMFFI2T6IQYI9Y17IbLYjNUuJA60uQd7Lg,224
|
27
27
|
version_command.py,sha256=DZuYWtohSeM5PJNYCflBy36_k0vex3tYV2C8ixEA9ho,4259
|
28
28
|
version_manager.py,sha256=fpC7jxhIW1wZhJ9IkVwyqkgJN4mhBjUUbaLefXLDMiM,11423
|
29
29
|
where_command.py,sha256=TcLoXLGmrPSHQuvlceVuuKBsfeadIwz-E0G_5okH14g,6420
|
@@ -67,9 +67,16 @@ clapp-packages-repo/packages/cloud-web-browser/requirements.txt,sha256=fJMjUewTq
|
|
67
67
|
clapp-packages-repo/packages/test-app-2/README.md,sha256=AqVgCZ-cwXBuDHFoJdYkAHAuB6SjSjqXQrjhLu0q7cc,964
|
68
68
|
clapp-packages-repo/packages/test-app-2/main.py,sha256=24IEuyHSuPWJp2-xYhInUNEWqeueGxAO3NBgHkEgLdQ,1562
|
69
69
|
clapp-packages-repo/packages/test-app-2/manifest.json,sha256=dzxPwC-GebvxX9DodLAtdRB0WsZBm204uGGsHbpGhyY,286
|
70
|
-
clapp_pm-1.0.
|
71
|
-
clapp_pm-1.0.
|
70
|
+
clapp_pm-1.0.42.data/data/version.json,sha256=ZzEaPFNvilpk5But6Abu3hbgYKPnMCrQedO1T3FOkSI,239
|
71
|
+
clapp_pm-1.0.42.dist-info/licenses/LICENSE,sha256=_hryv9pKR6udRexceUYuoYCJGmYBz7e-vRuFWmm38UY,1075
|
72
72
|
docs/developer_guide.md,sha256=B-S141TSNy7e8T9KaV6Fr-ZAFhYqqgcwqWijjX0C2Xc,7336
|
73
|
+
packages/cloud-calc/README.md,sha256=PBxWn01QykaHeezWf2AsD8P8cj66KKVpyuqvGadeUJo,2162
|
74
|
+
packages/cloud-calc/main.py,sha256=9m0igRXqIZHa3KTM37pqg02HxU_tY-2j-GMJWfUauvk,14764
|
75
|
+
packages/cloud-calc/manifest.json,sha256=Bn_TTQuDIrnbgDmrTcNcZluOhivf8xaVxB-AVFNf2es,198
|
76
|
+
packages/cloud-calc/requirements.txt,sha256=pYaeR23FY29bRDAdaV-GyW_gwMs7PRRn8lPJgqpPduM,13
|
77
|
+
packages/cloud-calc/clapp-packages-repo/README.md,sha256=stsqg4c5qWcUZxRabvbD0DEwzjJEGDGvxpA4bGbzJqg,1688
|
78
|
+
packages/cloud-calc/clapp-packages-repo/index.json,sha256=69UIXm_TQBP9CMVk9Nn1pjj_I3piOwRJdjRRdNoOoUM,1236
|
79
|
+
packages/cloud-calc/clapp-packages-repo/packages.json,sha256=kjcUn29aMFs89bmjZLK33EMeuy0KZQmyLbdvuCwzCZQ,1148
|
73
80
|
packages/cloud-finder/README.md,sha256=3W5VWCpv1HG9qIube4ytUVK8tpXbk1pB_rSEQU3auQw,5868
|
74
81
|
packages/cloud-finder/main.py,sha256=ivPzRbL3Qlu10mSarpwff9s7kOyxqa7L3jPCaDbdLEg,39106
|
75
82
|
packages/cloud-finder/manifest.json,sha256=rt-SSKprBL5p5kmWyvzmZR8Ur8Qtz-sJJ9n0VY44XTw,196
|
@@ -112,8 +119,8 @@ test-app/packages/test-app/manifest.json,sha256=_oJaNcbc7RINIQZ8ivzp3I75hUU2pth1
|
|
112
119
|
test-app-2/README.md,sha256=AqVgCZ-cwXBuDHFoJdYkAHAuB6SjSjqXQrjhLu0q7cc,964
|
113
120
|
test-app-2/main.py,sha256=24IEuyHSuPWJp2-xYhInUNEWqeueGxAO3NBgHkEgLdQ,1562
|
114
121
|
test-app-2/manifest.json,sha256=dzxPwC-GebvxX9DodLAtdRB0WsZBm204uGGsHbpGhyY,286
|
115
|
-
clapp_pm-1.0.
|
116
|
-
clapp_pm-1.0.
|
117
|
-
clapp_pm-1.0.
|
118
|
-
clapp_pm-1.0.
|
119
|
-
clapp_pm-1.0.
|
122
|
+
clapp_pm-1.0.42.dist-info/METADATA,sha256=cBd6bSHzcDMqQpF_ZtjjEcFQjWLFUJdXADTEy2Xx5ls,3983
|
123
|
+
clapp_pm-1.0.42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
124
|
+
clapp_pm-1.0.42.dist-info/entry_points.txt,sha256=7j-3pQVpQfnaVzUV83g7zlCA30ePlnXkhHLAGGz9xrQ,36
|
125
|
+
clapp_pm-1.0.42.dist-info/top_level.txt,sha256=-nbfxZD1zt1LMxzElOZyNhKpdwHhZD-d5ZWrwIArCtE,495
|
126
|
+
clapp_pm-1.0.42.dist-info/RECORD,,
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# Cloud Calculator
|
2
|
+
|
3
|
+
Modern ve profesyonel bir hesap makinesi uygulaması. Python ve Flet framework kullanılarak geliştirilmiştir.
|
4
|
+
|
5
|
+
## Özellikler
|
6
|
+
|
7
|
+
### 🧮 Temel İşlemler
|
8
|
+
- Toplama, çıkarma, çarpma, bölme
|
9
|
+
- Ondalık sayı desteği
|
10
|
+
- Geri alma (backspace) fonksiyonu
|
11
|
+
- Temizleme (clear) fonksiyonu
|
12
|
+
|
13
|
+
### 🔬 Bilimsel Hesap Makinesi
|
14
|
+
- Karekök (√)
|
15
|
+
- Kare alma (x²)
|
16
|
+
- Trigonometrik fonksiyonlar (sin, cos, tan)
|
17
|
+
- Logaritma (log)
|
18
|
+
|
19
|
+
### 🎨 Modern Arayüz
|
20
|
+
- Gradient arka plan
|
21
|
+
- Yuvarlak butonlar
|
22
|
+
- Tema değiştirme (Açık/Koyu)
|
23
|
+
- Responsive tasarım
|
24
|
+
- Geçmiş işlemler görüntüleme
|
25
|
+
|
26
|
+
### 📱 Kullanıcı Deneyimi
|
27
|
+
- İşlem geçmişi
|
28
|
+
- Son 3 işlemi görüntüleme
|
29
|
+
- Geçmiş temizleme
|
30
|
+
- Hata yönetimi
|
31
|
+
- Anlık sonuç gösterimi
|
32
|
+
|
33
|
+
## Kurulum
|
34
|
+
|
35
|
+
1. Gerekli paketleri yükleyin:
|
36
|
+
```bash
|
37
|
+
pip install -r requirements.txt
|
38
|
+
```
|
39
|
+
|
40
|
+
2. Uygulamayı çalıştırın:
|
41
|
+
```bash
|
42
|
+
python main.py
|
43
|
+
```
|
44
|
+
|
45
|
+
## Kullanım
|
46
|
+
|
47
|
+
### Temel İşlemler
|
48
|
+
- Sayıları ve operatörleri tıklayarak işlem oluşturun
|
49
|
+
- "=" butonuna basarak sonucu görün
|
50
|
+
- "C" butonu ile temizleyin
|
51
|
+
- "⌫" butonu ile son karakteri silin
|
52
|
+
|
53
|
+
### Bilimsel İşlemler
|
54
|
+
- Bir sayı girin
|
55
|
+
- İstediğiniz bilimsel fonksiyonu seçin (√, x², sin, cos, tan, log)
|
56
|
+
- Sonuç otomatik olarak hesaplanır
|
57
|
+
|
58
|
+
### Tema Değiştirme
|
59
|
+
- Sol üst köşedeki tema butonuna tıklayın
|
60
|
+
- Açık ve koyu tema arasında geçiş yapın
|
61
|
+
|
62
|
+
### Geçmiş
|
63
|
+
- Son 3 işlem otomatik olarak görüntülenir
|
64
|
+
- Sağ üst köşedeki temizleme butonu ile geçmişi silebilirsiniz
|
65
|
+
|
66
|
+
## Teknik Detaylar
|
67
|
+
|
68
|
+
- **Framework**: Flet (Python)
|
69
|
+
- **Dil**: Python 3.7+
|
70
|
+
- **Pencere Boyutu**: 400x700 piksel
|
71
|
+
- **Tema**: Gradient arka planlar
|
72
|
+
- **Buton Stili**: Yuvarlak, modern tasarım
|
73
|
+
|
74
|
+
## Ekran Görüntüleri
|
75
|
+
|
76
|
+
Uygulama modern bir arayüze sahiptir:
|
77
|
+
- Mor-mavi gradient arka plan
|
78
|
+
- Beyaz metin ve butonlar
|
79
|
+
- Yuvarlak, modern buton tasarımı
|
80
|
+
- Temiz ve düzenli layout
|
81
|
+
|
82
|
+
## Geliştirme
|
83
|
+
|
84
|
+
Bu proje açık kaynak kodludur ve geliştirilmeye açıktır. Yeni özellikler eklemek için:
|
85
|
+
|
86
|
+
1. Projeyi fork edin
|
87
|
+
2. Yeni özellik dalı oluşturun
|
88
|
+
3. Değişikliklerinizi commit edin
|
89
|
+
4. Pull request gönderin
|
90
|
+
|
91
|
+
## Lisans
|
92
|
+
|
93
|
+
Bu proje MIT lisansı altında lisanslanmıştır.
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# clapp-packages - Resmi clapp Paket Deposu
|
2
|
+
|
3
|
+
Bu repo, [clapp](https://github.com/mburakmmm/clapp) paket yöneticisinin resmi ve merkezi paket deposudur.
|
4
|
+
|
5
|
+
## Yapı ve Kullanım
|
6
|
+
|
7
|
+
- Her paket kendi klasöründe bulunur (ör: `hello-world/`)
|
8
|
+
- Her pakette en az bir `manifest.json` ve giriş dosyası (`main.py` veya benzeri) bulunur
|
9
|
+
- Tüm paketler ve sürümler `index.json` dosyasında listelenir
|
10
|
+
- Paketler doğrudan elle eklenmez, sadece `clapp publish` komutu ile eklenir/güncellenir
|
11
|
+
|
12
|
+
## Paket Yükleme
|
13
|
+
|
14
|
+
Kullanıcılar paketleri doğrudan CLI ile yükler:
|
15
|
+
```bash
|
16
|
+
clapp install hello-world
|
17
|
+
```
|
18
|
+
clapp, bu repodaki `index.json` üzerinden paketleri bulur ve indirir.
|
19
|
+
|
20
|
+
## Paket Yayınlama
|
21
|
+
|
22
|
+
Kendi uygulamanızı eklemek için:
|
23
|
+
1. Uygulamanızın klasöründe geçerli bir `manifest.json` ve giriş dosyası olmalı
|
24
|
+
2. `clapp publish ./my-app --push` komutunu kullanın
|
25
|
+
- Bu komut, paketi zipler, bu repoya ekler ve `index.json`'u günceller
|
26
|
+
- Tüm işlemler otomatik yapılır, manuel ekleme yapılmaz
|
27
|
+
|
28
|
+
## index.json
|
29
|
+
|
30
|
+
- Tüm paketlerin adı, sürümü, açıklaması ve indirme bağlantısı burada tutulur
|
31
|
+
- clapp CLI, paket arama ve yükleme işlemlerinde bu dosyayı kullanır
|
32
|
+
|
33
|
+
## Katkı ve Güvenlik
|
34
|
+
|
35
|
+
- Paketler sadece `clapp publish` ile eklenir/güncellenir
|
36
|
+
- Her paket için geçerli manifest ve çalışır giriş dosyası zorunludur
|
37
|
+
- Zararlı veya uygunsuz içerik tespit edilirse paket kaldırılır
|
38
|
+
|
39
|
+
## Lisans
|
40
|
+
|
41
|
+
Bu repodaki paketler kendi lisanslarına sahiptir. Genel repo MIT lisansı altındadır.
|
42
|
+
|
43
|
+
## Destek
|
44
|
+
|
45
|
+
- 🐛 Hata bildirimi ve öneriler: [Issues](https://github.com/mburakmmm/clapp-packages/issues)
|
46
|
+
- 📖 Ana proje: [clapp](https://github.com/mburakmmm/clapp)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"name": "cloud-finder",
|
4
|
+
"version": "1.0.0",
|
5
|
+
"language": "python",
|
6
|
+
"description": "MacOS Finder'a benzeyen modern dosya gezgini",
|
7
|
+
"entry": "main.py",
|
8
|
+
"dependencies": [],
|
9
|
+
"folder": "cloud-finder",
|
10
|
+
"repo_url": "https://github.com/mburakmmm/clapp-packages",
|
11
|
+
"subdir": "cloud-finder"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"name": "cloud-web-browser",
|
15
|
+
"version": "1.0.0",
|
16
|
+
"language": "python",
|
17
|
+
"description": "Modern ve hızlı web tarayıcı uygulaması. Python ve Flet framework'ü ile geliştirilmiştir. WebView teknolojisi ile gerçek web sayfalarını uygulama içinde görüntüler.",
|
18
|
+
"entry": "cloud_browser.py",
|
19
|
+
"dependencies": [
|
20
|
+
"flet>=0.21.0",
|
21
|
+
"flet-webview>=0.1.0",
|
22
|
+
"requests>=2.31.0",
|
23
|
+
"beautifulsoup4>=4.12.0"
|
24
|
+
],
|
25
|
+
"folder": "cloud-web-browser",
|
26
|
+
"repo_url": "https://github.com/mburakmmm/clapp-packages",
|
27
|
+
"subdir": "cloud-web-browser"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"name": "test-app-2",
|
31
|
+
"version": "1.0.0",
|
32
|
+
"language": "python",
|
33
|
+
"description": "Basit bir Python Hello World uygulaması",
|
34
|
+
"entry": "main.py",
|
35
|
+
"dependencies": [],
|
36
|
+
"folder": "test-app-2",
|
37
|
+
"repo_url": "https://github.com/mburakmmm/clapp-packages",
|
38
|
+
"subdir": "test-app-2"
|
39
|
+
}
|
40
|
+
]
|
@@ -0,0 +1,40 @@
|
|
1
|
+
{
|
2
|
+
"repository": "mburakmmm/clapp-packages",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"last_updated": "2024-01-15T10:00:00Z",
|
5
|
+
"packages": [
|
6
|
+
{
|
7
|
+
"name": "hello-world",
|
8
|
+
"version": "1.0.0",
|
9
|
+
"language": "python",
|
10
|
+
"description": "Basit merhaba dünya uygulaması - clapp ile ilk adımınız",
|
11
|
+
"author": "clapp-team",
|
12
|
+
"dependencies": [],
|
13
|
+
"download_url": "https://github.com/mburakmmm/clapp-packages/releases/download/v1.0.0/hello-world.clapp.zip",
|
14
|
+
"category": "demo",
|
15
|
+
"tags": ["demo", "tutorial", "beginner"],
|
16
|
+
"size": "1.2 KB",
|
17
|
+
"downloads": 150
|
18
|
+
},
|
19
|
+
|
20
|
+
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"categories": {
|
24
|
+
"demo": "Demo ve Öğretici",
|
25
|
+
"productivity": "Verimlilik",
|
26
|
+
"utility": "Araçlar",
|
27
|
+
"system": "Sistem",
|
28
|
+
"games": "Oyunlar",
|
29
|
+
"security": "Güvenlik",
|
30
|
+
"development": "Geliştirme"
|
31
|
+
},
|
32
|
+
"statistics": {
|
33
|
+
"total_packages": 10,
|
34
|
+
"total_downloads": 1722,
|
35
|
+
"languages": {
|
36
|
+
"python": 10,
|
37
|
+
"lua": 0
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
@@ -0,0 +1,364 @@
|
|
1
|
+
import flet as ft
|
2
|
+
import math
|
3
|
+
from datetime import datetime
|
4
|
+
|
5
|
+
class CloudCalculator:
|
6
|
+
def __init__(self):
|
7
|
+
self.current_expression = ""
|
8
|
+
self.history = []
|
9
|
+
self.is_dark_theme = False
|
10
|
+
|
11
|
+
def main(self, page: ft.Page):
|
12
|
+
page.title = "Cloud Calculator"
|
13
|
+
page.theme_mode = ft.ThemeMode.LIGHT
|
14
|
+
page.window_width = 200
|
15
|
+
page.window_height = 700
|
16
|
+
page.window_resizable = True
|
17
|
+
page.padding = 0
|
18
|
+
page.spacing = 0
|
19
|
+
page.bgcolor = "#667eea"
|
20
|
+
|
21
|
+
# Ana container - Tam genişlik, tam yükseklik
|
22
|
+
self.main_container = ft.Container(
|
23
|
+
expand=True,
|
24
|
+
border_radius=0,
|
25
|
+
padding=15,
|
26
|
+
gradient=ft.LinearGradient(
|
27
|
+
begin=ft.alignment.top_center,
|
28
|
+
end=ft.alignment.bottom_center,
|
29
|
+
colors=["#667eea", "#764ba2"]
|
30
|
+
)
|
31
|
+
)
|
32
|
+
|
33
|
+
# Ekran alanı
|
34
|
+
self.display = ft.TextField(
|
35
|
+
value="0",
|
36
|
+
text_align=ft.TextAlign.RIGHT,
|
37
|
+
border=ft.InputBorder.NONE,
|
38
|
+
text_size=32,
|
39
|
+
color="white",
|
40
|
+
bgcolor="transparent",
|
41
|
+
read_only=True,
|
42
|
+
height=80
|
43
|
+
)
|
44
|
+
|
45
|
+
# Geçmiş alanı
|
46
|
+
self.history_display = ft.Text(
|
47
|
+
"",
|
48
|
+
size=14,
|
49
|
+
color="white",
|
50
|
+
text_align=ft.TextAlign.RIGHT,
|
51
|
+
opacity=0.7
|
52
|
+
)
|
53
|
+
|
54
|
+
# Tema değiştirme butonu
|
55
|
+
self.theme_button = ft.IconButton(
|
56
|
+
icon="dark_mode",
|
57
|
+
icon_color="white",
|
58
|
+
on_click=self.toggle_theme
|
59
|
+
)
|
60
|
+
|
61
|
+
# Geçmiş temizleme butonu
|
62
|
+
self.clear_history_button = ft.IconButton(
|
63
|
+
icon="clear_all",
|
64
|
+
icon_color="white",
|
65
|
+
on_click=self.clear_history
|
66
|
+
)
|
67
|
+
|
68
|
+
# Üst bar
|
69
|
+
top_bar = ft.Row(
|
70
|
+
controls=[
|
71
|
+
self.theme_button,
|
72
|
+
ft.Text("Cloud Calculator", size=18, color="white", weight=ft.FontWeight.BOLD),
|
73
|
+
self.clear_history_button
|
74
|
+
],
|
75
|
+
alignment=ft.MainAxisAlignment.SPACE_BETWEEN
|
76
|
+
)
|
77
|
+
|
78
|
+
# Buton stilleri
|
79
|
+
button_style = {
|
80
|
+
"width": 60,
|
81
|
+
"height": 60
|
82
|
+
}
|
83
|
+
|
84
|
+
# Sayı butonları - Doğru standart düzen
|
85
|
+
number_buttons = [
|
86
|
+
ft.ElevatedButton("7", **button_style, on_click=lambda e: self.add_to_expression("7")),
|
87
|
+
ft.ElevatedButton("8", **button_style, on_click=lambda e: self.add_to_expression("8")),
|
88
|
+
ft.ElevatedButton("9", **button_style, on_click=lambda e: self.add_to_expression("9")),
|
89
|
+
ft.ElevatedButton("÷", **button_style, on_click=lambda e: self.add_to_expression("/"), bgcolor="#ff9500"),
|
90
|
+
|
91
|
+
ft.ElevatedButton("4", **button_style, on_click=lambda e: self.add_to_expression("4")),
|
92
|
+
ft.ElevatedButton("5", **button_style, on_click=lambda e: self.add_to_expression("5")),
|
93
|
+
ft.ElevatedButton("6", **button_style, on_click=lambda e: self.add_to_expression("6")),
|
94
|
+
ft.ElevatedButton("×", **button_style, on_click=lambda e: self.add_to_expression("*"), bgcolor="#ff9500"),
|
95
|
+
|
96
|
+
ft.ElevatedButton("1", **button_style, on_click=lambda e: self.add_to_expression("1")),
|
97
|
+
ft.ElevatedButton("2", **button_style, on_click=lambda e: self.add_to_expression("2")),
|
98
|
+
ft.ElevatedButton("3", **button_style, on_click=lambda e: self.add_to_expression("3")),
|
99
|
+
ft.ElevatedButton("-", **button_style, on_click=lambda e: self.add_to_expression("-"), bgcolor="#ff9500"),
|
100
|
+
|
101
|
+
ft.ElevatedButton("0", **button_style, on_click=lambda e: self.add_to_expression("0")),
|
102
|
+
ft.ElevatedButton(".", **button_style, on_click=lambda e: self.add_to_expression(".")),
|
103
|
+
ft.ElevatedButton("+", **button_style, on_click=lambda e: self.add_to_expression("+"), bgcolor="#ff9500"),
|
104
|
+
ft.ElevatedButton("=", **button_style, on_click=self.calculate, bgcolor="#ff9500"),
|
105
|
+
]
|
106
|
+
|
107
|
+
# Bilimsel hesap makinesi butonları artık manuel satırlarda tanımlanıyor
|
108
|
+
|
109
|
+
# Manuel satır düzeni - Doğru sıralama
|
110
|
+
row1 = ft.Row(
|
111
|
+
controls=[
|
112
|
+
ft.ElevatedButton("7", **button_style, on_click=lambda e: self.add_to_expression("7")),
|
113
|
+
ft.ElevatedButton("8", **button_style, on_click=lambda e: self.add_to_expression("8")),
|
114
|
+
ft.ElevatedButton("9", **button_style, on_click=lambda e: self.add_to_expression("9")),
|
115
|
+
ft.ElevatedButton("÷", **button_style, on_click=lambda e: self.add_to_expression("/"), bgcolor="#ff9500"),
|
116
|
+
],
|
117
|
+
alignment=ft.MainAxisAlignment.CENTER,
|
118
|
+
spacing=10
|
119
|
+
)
|
120
|
+
|
121
|
+
row2 = ft.Row(
|
122
|
+
controls=[
|
123
|
+
ft.ElevatedButton("4", **button_style, on_click=lambda e: self.add_to_expression("4")),
|
124
|
+
ft.ElevatedButton("5", **button_style, on_click=lambda e: self.add_to_expression("5")),
|
125
|
+
ft.ElevatedButton("6", **button_style, on_click=lambda e: self.add_to_expression("6")),
|
126
|
+
ft.ElevatedButton("×", **button_style, on_click=lambda e: self.add_to_expression("*"), bgcolor="#ff9500"),
|
127
|
+
],
|
128
|
+
alignment=ft.MainAxisAlignment.CENTER,
|
129
|
+
spacing=10
|
130
|
+
)
|
131
|
+
|
132
|
+
row3 = ft.Row(
|
133
|
+
controls=[
|
134
|
+
ft.ElevatedButton("1", **button_style, on_click=lambda e: self.add_to_expression("1")),
|
135
|
+
ft.ElevatedButton("2", **button_style, on_click=lambda e: self.add_to_expression("2")),
|
136
|
+
ft.ElevatedButton("3", **button_style, on_click=lambda e: self.add_to_expression("3")),
|
137
|
+
ft.ElevatedButton("-", **button_style, on_click=lambda e: self.add_to_expression("-"), bgcolor="#ff9500"),
|
138
|
+
],
|
139
|
+
alignment=ft.MainAxisAlignment.CENTER,
|
140
|
+
spacing=10
|
141
|
+
)
|
142
|
+
|
143
|
+
row4 = ft.Row(
|
144
|
+
controls=[
|
145
|
+
ft.ElevatedButton("0", **button_style, on_click=lambda e: self.add_to_expression("0")),
|
146
|
+
ft.ElevatedButton(".", **button_style, on_click=lambda e: self.add_to_expression(".")),
|
147
|
+
ft.ElevatedButton("+", **button_style, on_click=lambda e: self.add_to_expression("+"), bgcolor="#ff9500"),
|
148
|
+
ft.ElevatedButton("=", **button_style, on_click=self.calculate, bgcolor="#ff9500"),
|
149
|
+
],
|
150
|
+
alignment=ft.MainAxisAlignment.CENTER,
|
151
|
+
spacing=10
|
152
|
+
)
|
153
|
+
|
154
|
+
# Bilimsel butonlar - Manuel satır düzeni
|
155
|
+
scientific_row1 = ft.Row(
|
156
|
+
controls=[
|
157
|
+
ft.ElevatedButton("C", width=60, height=40, on_click=self.clear, bgcolor="#ff3b30"),
|
158
|
+
ft.ElevatedButton("⌫", width=60, height=40, on_click=self.backspace, bgcolor="#ff9500"),
|
159
|
+
ft.ElevatedButton("√", width=60, height=40, on_click=self.sqrt, bgcolor="#007aff"),
|
160
|
+
ft.ElevatedButton("x²", width=60, height=40, on_click=self.square, bgcolor="#007aff"),
|
161
|
+
],
|
162
|
+
alignment=ft.MainAxisAlignment.CENTER,
|
163
|
+
spacing=10
|
164
|
+
)
|
165
|
+
|
166
|
+
scientific_row2 = ft.Row(
|
167
|
+
controls=[
|
168
|
+
ft.ElevatedButton("sin", width=60, height=40, on_click=self.sin, bgcolor="#007aff"),
|
169
|
+
ft.ElevatedButton("cos", width=60, height=40, on_click=self.cos, bgcolor="#007aff"),
|
170
|
+
ft.ElevatedButton("tan", width=60, height=40, on_click=self.tan, bgcolor="#007aff"),
|
171
|
+
ft.ElevatedButton("log", width=60, height=40, on_click=self.log, bgcolor="#007aff"),
|
172
|
+
],
|
173
|
+
alignment=ft.MainAxisAlignment.CENTER,
|
174
|
+
spacing=10
|
175
|
+
)
|
176
|
+
|
177
|
+
# Ana layout - Manuel satır düzeni
|
178
|
+
self.main_container.content = ft.Column(
|
179
|
+
controls=[
|
180
|
+
top_bar,
|
181
|
+
self.history_display,
|
182
|
+
self.display,
|
183
|
+
ft.Divider(color="white", opacity=0.3),
|
184
|
+
scientific_row1,
|
185
|
+
scientific_row2,
|
186
|
+
row1,
|
187
|
+
row2,
|
188
|
+
row3,
|
189
|
+
row4
|
190
|
+
],
|
191
|
+
spacing=10,
|
192
|
+
horizontal_alignment=ft.CrossAxisAlignment.CENTER
|
193
|
+
)
|
194
|
+
|
195
|
+
page.add(self.main_container)
|
196
|
+
page.update()
|
197
|
+
|
198
|
+
def add_to_expression(self, value):
|
199
|
+
if self.display.value == "0" and value not in ["+", "-", "*", "/", "."]:
|
200
|
+
self.current_expression = value
|
201
|
+
else:
|
202
|
+
self.current_expression += value
|
203
|
+
|
204
|
+
self.display.value = self.current_expression
|
205
|
+
self.display.update()
|
206
|
+
|
207
|
+
def calculate(self, e=None):
|
208
|
+
try:
|
209
|
+
if self.current_expression:
|
210
|
+
result = eval(self.current_expression)
|
211
|
+
if isinstance(result, (int, float)):
|
212
|
+
if result == int(result):
|
213
|
+
result = int(result)
|
214
|
+
|
215
|
+
# Geçmişe ekle
|
216
|
+
history_entry = f"{self.current_expression} = {result}"
|
217
|
+
self.history.append({
|
218
|
+
"expression": self.current_expression,
|
219
|
+
"result": result,
|
220
|
+
"timestamp": datetime.now().strftime("%H:%M:%S")
|
221
|
+
})
|
222
|
+
|
223
|
+
# Geçmişi güncelle
|
224
|
+
self.update_history_display()
|
225
|
+
|
226
|
+
self.display.value = str(result)
|
227
|
+
self.current_expression = str(result)
|
228
|
+
else:
|
229
|
+
self.display.value = "Error"
|
230
|
+
self.display.update()
|
231
|
+
except:
|
232
|
+
self.display.value = "Error"
|
233
|
+
self.display.update()
|
234
|
+
|
235
|
+
def clear(self, e=None):
|
236
|
+
self.current_expression = ""
|
237
|
+
self.display.value = "0"
|
238
|
+
self.display.update()
|
239
|
+
|
240
|
+
def backspace(self, e=None):
|
241
|
+
if self.current_expression:
|
242
|
+
self.current_expression = self.current_expression[:-1]
|
243
|
+
if not self.current_expression:
|
244
|
+
self.display.value = "0"
|
245
|
+
else:
|
246
|
+
self.display.value = self.current_expression
|
247
|
+
self.display.update()
|
248
|
+
|
249
|
+
def sqrt(self, e=None):
|
250
|
+
try:
|
251
|
+
if self.current_expression:
|
252
|
+
result = math.sqrt(float(self.current_expression))
|
253
|
+
self.add_to_history(f"√({self.current_expression})", result)
|
254
|
+
self.display.value = str(result)
|
255
|
+
self.current_expression = str(result)
|
256
|
+
self.display.update()
|
257
|
+
except:
|
258
|
+
self.display.value = "Error"
|
259
|
+
self.display.update()
|
260
|
+
|
261
|
+
def square(self, e=None):
|
262
|
+
try:
|
263
|
+
if self.current_expression:
|
264
|
+
result = float(self.current_expression) ** 2
|
265
|
+
self.add_to_history(f"({self.current_expression})²", result)
|
266
|
+
self.display.value = str(result)
|
267
|
+
self.current_expression = str(result)
|
268
|
+
self.display.update()
|
269
|
+
except:
|
270
|
+
self.display.value = "Error"
|
271
|
+
self.display.update()
|
272
|
+
|
273
|
+
def sin(self, e=None):
|
274
|
+
try:
|
275
|
+
if self.current_expression:
|
276
|
+
result = math.sin(math.radians(float(self.current_expression)))
|
277
|
+
self.add_to_history(f"sin({self.current_expression}°)", result)
|
278
|
+
self.display.value = str(result)
|
279
|
+
self.current_expression = str(result)
|
280
|
+
self.display.update()
|
281
|
+
except:
|
282
|
+
self.display.value = "Error"
|
283
|
+
self.display.update()
|
284
|
+
|
285
|
+
def cos(self, e=None):
|
286
|
+
try:
|
287
|
+
if self.current_expression:
|
288
|
+
result = math.cos(math.radians(float(self.current_expression)))
|
289
|
+
self.add_to_history(f"cos({self.current_expression}°)", result)
|
290
|
+
self.display.value = str(result)
|
291
|
+
self.current_expression = str(result)
|
292
|
+
self.display.update()
|
293
|
+
except:
|
294
|
+
self.display.value = "Error"
|
295
|
+
self.display.update()
|
296
|
+
|
297
|
+
def tan(self, e=None):
|
298
|
+
try:
|
299
|
+
if self.current_expression:
|
300
|
+
result = math.tan(math.radians(float(self.current_expression)))
|
301
|
+
self.add_to_history(f"tan({self.current_expression}°)", result)
|
302
|
+
self.display.value = str(result)
|
303
|
+
self.current_expression = str(result)
|
304
|
+
self.display.update()
|
305
|
+
except:
|
306
|
+
self.display.value = "Error"
|
307
|
+
self.display.update()
|
308
|
+
|
309
|
+
def log(self, e=None):
|
310
|
+
try:
|
311
|
+
if self.current_expression:
|
312
|
+
result = math.log10(float(self.current_expression))
|
313
|
+
self.add_to_history(f"log({self.current_expression})", result)
|
314
|
+
self.display.value = str(result)
|
315
|
+
self.current_expression = str(result)
|
316
|
+
self.display.update()
|
317
|
+
except:
|
318
|
+
self.display.value = "Error"
|
319
|
+
self.display.update()
|
320
|
+
|
321
|
+
def add_to_history(self, expression, result):
|
322
|
+
self.history.append({
|
323
|
+
"expression": expression,
|
324
|
+
"result": result,
|
325
|
+
"timestamp": datetime.now().strftime("%H:%M:%S")
|
326
|
+
})
|
327
|
+
self.update_history_display()
|
328
|
+
|
329
|
+
def update_history_display(self):
|
330
|
+
if self.history:
|
331
|
+
# Son 3 işlemi göster
|
332
|
+
recent_history = self.history[-3:]
|
333
|
+
history_text = "\n".join([f"{entry['expression']} = {entry['result']}" for entry in recent_history])
|
334
|
+
self.history_display.value = history_text
|
335
|
+
self.history_display.update()
|
336
|
+
|
337
|
+
def clear_history(self, e=None):
|
338
|
+
self.history = []
|
339
|
+
self.history_display.value = ""
|
340
|
+
self.history_display.update()
|
341
|
+
|
342
|
+
def toggle_theme(self, e):
|
343
|
+
self.is_dark_theme = not self.is_dark_theme
|
344
|
+
if self.is_dark_theme:
|
345
|
+
self.main_container.gradient = ft.LinearGradient(
|
346
|
+
begin=ft.alignment.top_center,
|
347
|
+
end=ft.alignment.bottom_center,
|
348
|
+
colors=["#2c3e50", "#34495e"]
|
349
|
+
)
|
350
|
+
self.theme_button.icon = "light_mode"
|
351
|
+
else:
|
352
|
+
self.main_container.gradient = ft.LinearGradient(
|
353
|
+
begin=ft.alignment.top_center,
|
354
|
+
end=ft.alignment.bottom_center,
|
355
|
+
colors=["#667eea", "#764ba2"]
|
356
|
+
)
|
357
|
+
self.theme_button.icon = "dark_mode"
|
358
|
+
|
359
|
+
self.main_container.update()
|
360
|
+
self.theme_button.update()
|
361
|
+
|
362
|
+
if __name__ == "__main__":
|
363
|
+
calculator = CloudCalculator()
|
364
|
+
ft.app(target=calculator.main)
|
@@ -0,0 +1 @@
|
|
1
|
+
flet>=0.21.0
|
publish_command.py
CHANGED
@@ -57,13 +57,18 @@ def validate_app_folder(folder_path: str) -> Tuple[bool, str, Optional[dict]]:
|
|
57
57
|
|
58
58
|
def copy_app_to_packages(source_folder: str, app_name: str) -> Tuple[bool, str]:
|
59
59
|
"""
|
60
|
-
Uygulama klasörünü packages/ altına kopyalar
|
60
|
+
Uygulama klasörünü ana clapp dizinindeki packages/ altına kopyalar
|
61
61
|
|
62
62
|
Returns:
|
63
63
|
(success, message)
|
64
64
|
"""
|
65
65
|
try:
|
66
|
-
|
66
|
+
# Ana clapp dizinini bul
|
67
|
+
clapp_root, _ = find_clapp_root_with_build_index()
|
68
|
+
if not clapp_root:
|
69
|
+
return False, "Ana clapp dizini bulunamadı"
|
70
|
+
|
71
|
+
packages_dir = os.path.join(clapp_root, "packages")
|
67
72
|
target_path = os.path.join(packages_dir, app_name)
|
68
73
|
|
69
74
|
# packages klasörünü oluştur
|
@@ -227,11 +232,11 @@ def update_index() -> Tuple[bool, str]:
|
|
227
232
|
# build_index.py'yi ana dizinde çalıştır
|
228
233
|
result = subprocess.run([
|
229
234
|
sys.executable, build_index_path
|
230
|
-
],
|
235
|
+
], cwd=clapp_root)
|
231
236
|
if result.returncode == 0:
|
232
237
|
return True, "Index başarıyla güncellendi"
|
233
238
|
else:
|
234
|
-
return False, f"Index güncelleme hatası:
|
239
|
+
return False, f"Index güncelleme hatası: Çalıştırılan dizin: {clapp_root}"
|
235
240
|
except Exception as e:
|
236
241
|
return False, f"Index script çalıştırılamadı: {e}"
|
237
242
|
|
@@ -256,8 +261,12 @@ def push_to_clapp_packages_repo(app_name: str, app_version: str) -> Tuple[bool,
|
|
256
261
|
packages_repo_path
|
257
262
|
], check=True, cwd=".")
|
258
263
|
|
259
|
-
#
|
260
|
-
|
264
|
+
# Ana clapp dizinindeki packages klasöründen uygulamayı kopyala
|
265
|
+
clapp_root, _ = find_clapp_root_with_build_index()
|
266
|
+
if not clapp_root:
|
267
|
+
return False, "Ana clapp dizini bulunamadı"
|
268
|
+
|
269
|
+
source_app = os.path.join(clapp_root, "packages", app_name)
|
261
270
|
target_app = os.path.join(packages_repo_path, "packages", app_name)
|
262
271
|
|
263
272
|
# Hedef packages klasörünü oluştur (yoksa)
|
@@ -268,7 +277,7 @@ def push_to_clapp_packages_repo(app_name: str, app_version: str) -> Tuple[bool,
|
|
268
277
|
if os.path.exists(target_app):
|
269
278
|
shutil.rmtree(target_app)
|
270
279
|
|
271
|
-
#
|
280
|
+
# Uygulamayı kopyala
|
272
281
|
shutil.copytree(source_app, target_app)
|
273
282
|
print(f"✅ {app_name} uygulaması clapp-packages reposuna kopyalandı")
|
274
283
|
|
@@ -358,26 +367,23 @@ def publish_app(folder_path: str, force: bool = False, push_to_github: bool = Fa
|
|
358
367
|
app_version = manifest['version']
|
359
368
|
print(f"✅ {app_name} v{app_version} doğrulandı")
|
360
369
|
|
361
|
-
# 2.
|
370
|
+
# 2. Uygulamayı packages klasörüne kopyala
|
362
371
|
print("2️⃣ Uygulama kopyalanıyor...")
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
return False, copy_message
|
372
|
+
success, message = copy_app_to_packages(folder_path, app_name)
|
373
|
+
if not success:
|
374
|
+
return False, message
|
367
375
|
|
368
|
-
# 3. Index
|
376
|
+
# 3. Index güncelle
|
369
377
|
print("3️⃣ Index güncelleniyor...")
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
return False, index_message
|
378
|
+
success, message = update_index()
|
379
|
+
if not success:
|
380
|
+
return False, message
|
374
381
|
|
375
|
-
# 4. clapp-packages reposuna push
|
382
|
+
# 4. Eğer push isteniyorsa, clapp-packages reposuna push et
|
376
383
|
if push_to_github:
|
377
|
-
|
378
|
-
if not
|
379
|
-
|
380
|
-
return True, f"🎉 '{app_name}' yerel olarak publish edildi! clapp-packages push başarısız."
|
384
|
+
success, message = push_to_clapp_packages_repo(app_name, app_version)
|
385
|
+
if not success:
|
386
|
+
return False, message
|
381
387
|
|
382
388
|
return True, f"🎉 '{app_name}' başarıyla publish edildi! Index güncellendi."
|
383
389
|
|
version.py
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|