├── README.md ├── contents └── ui │ └── main.qml └── metadata.json /README.md: -------------------------------------------------------------------------------- 1 | # 🎓 ÖSYM Duyuruları Plasma Widget 2 | 3 | ## 📢 Proje Hakkında 4 | 5 | Bu Plasma widget'ı, ÖSYM (Ölçme, Seçme ve Yerleştirme Merkezi) tarafından yapılan son duyuruları KDE masaüstünüzde görüntülemenizi sağlar. Yeni duyurular geldiğinde otomatik olarak bildirim alırsınız. 6 | 7 | ## 🌟 Özellikler 8 | 9 | - 🔄 ÖSYM duyurularını otomatik olarak günceller 10 | - 📋 Sınav adı, işlem tipi, sınav tarihi ve durumu görüntüler 11 | - 🔔 Yeni duyurular için masaüstü bildirimleri gönderir 12 | - 🖼️ Şık ve kullanıcı dostu arayüz 13 | 14 | ## Ekran görüntüsü 15 | ![image](https://github.com/user-attachments/assets/7d978464-d60a-4dcb-a54e-043570fd8b2b) 16 | 17 | ## 🛠️ Kurulum 18 | 19 | 1. Bu depoyu klonlayın: 20 | 2. Widget'ı KDE Plasma'ya yükleyin: 21 | 22 | plasmapkg2 -i osym-duyurulari-plasma-widget 23 | 24 | ## 🚀 Kullanım 25 | 26 | Widget'ı yükledikten sonra, KDE Plasma masaüstünüze ekleyebilirsiniz. Widget otomatik olarak ÖSYM duyurularını göstermeye başlayacak ve yeni duyurular geldiğinde sizi bilgilendirecektir. 27 | 28 | ## 🤝 Katkıda Bulunma 29 | 30 | Katkılarınızı memnuniyetle karşılıyoruz! Lütfen bir pull request göndermeden önce şunları yapın: 31 | 32 | 1. Bu depoyu fork edin 33 | 2. Yeni bir branch oluşturun (`git checkout -b feature/AmazingFeature`) 34 | 3. Değişikliklerinizi commit edin (`git commit -m 'Add some AmazingFeature'`) 35 | 4. Branch'inizi push edin (`git push origin feature/AmazingFeature`) 36 | 5. Bir Pull Request açın 37 | 38 | ## 📜 Lisans 39 | 40 | Bu proje [MIT Lisansı](LICENSE) altında lisanslanmıştır. 41 | 42 | ## 📞 İletişim 43 | codermert@bk.ru 44 | -------------------------------------------------------------------------------- /contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.15 2 | import QtQuick.Layouts 1.15 3 | import org.kde.plasma.plasmoid 2.0 4 | import org.kde.plasma.components 3.0 as PlasmaComponents 5 | import QtQuick.Controls 2.15 6 | import QtQuick.Window 2.15 7 | 8 | PlasmoidItem { 9 | id: root 10 | width: 800 11 | height: 400 12 | 13 | property var osymData: [] 14 | property var lastData: [] 15 | 16 | Timer { 17 | interval: 1000 // 5 saniye 18 | running: true 19 | repeat: true 20 | onTriggered: { 21 | root.loadData() 22 | } 23 | } 24 | 25 | Component.onCompleted: { 26 | root.loadData() 27 | } 28 | 29 | function loadData() { 30 | var xhr = new XMLHttpRequest(); 31 | xhr.open("GET", "https://raw.githubusercontent.com/codermert/ais_duyurular/main/sonuc.json", true); 32 | xhr.onreadystatechange = function() { 33 | if (xhr.readyState === XMLHttpRequest.DONE) { 34 | if (xhr.status === 200) { 35 | var newData = JSON.parse(xhr.responseText); 36 | if (JSON.stringify(newData) !== JSON.stringify(root.lastData)) { 37 | var newItems = findNewItems(newData, root.lastData); 38 | if (newItems.length > 0) { 39 | root.osymData = newData; 40 | sendNotifications(newItems); 41 | } 42 | root.lastData = newData; 43 | } 44 | } else { 45 | console.error("Veri yüklenemedi"); 46 | } 47 | } 48 | } 49 | xhr.send(); 50 | } 51 | 52 | function findNewItems(newData, oldData) { 53 | return newData.filter(item => !oldData.some(oldItem => 54 | oldItem.sinav === item.sinav && 55 | oldItem.islemtipi === item.islemtipi && 56 | oldItem.sinavtarihi === item.sinavtarihi 57 | )); 58 | } 59 | 60 | function sendNotifications(newItems) { 61 | newItems.forEach(item => { 62 | var message = item.sinav + " - " + item.islemtipi + " - " + item.sinavtarihi; 63 | sendNotification("Yeni ÖSYM güncellemesi", message); 64 | }); 65 | } 66 | 67 | function sendNotification(title, message) { 68 | var process = Qt.createQProcess(); 69 | process.start("notify-send", [title, message]); 70 | } 71 | 72 | ScrollView { 73 | anchors.fill: parent 74 | clip: true 75 | 76 | ListView { 77 | width: parent.width 78 | model: root.osymData 79 | delegate: ItemDelegate { 80 | width: parent.width 81 | height: 40 82 | contentItem: RowLayout { 83 | spacing: 8 84 | 85 | PlasmaComponents.Label { 86 | text: modelData.sinav 87 | Layout.preferredWidth: parent.width * 0.25 88 | elide: Text.ElideRight 89 | } 90 | PlasmaComponents.Label { 91 | text: modelData.islemtipi 92 | Layout.preferredWidth: parent.width * 0.15 93 | elide: Text.ElideRight 94 | } 95 | PlasmaComponents.Label { 96 | text: modelData.sinavtarihi 97 | Layout.preferredWidth: parent.width * 0.15 98 | elide: Text.ElideRight 99 | } 100 | PlasmaComponents.Label { 101 | text: modelData.durum 102 | Layout.preferredWidth: parent.width * 0.18 103 | elide: Text.ElideRight 104 | } 105 | } 106 | } 107 | 108 | header: Rectangle { 109 | width: parent.width 110 | height: 40 111 | color: "#4a90e2" // Mavi renk 112 | 113 | RowLayout { 114 | anchors.fill: parent 115 | anchors.margins: 5 116 | 117 | PlasmaComponents.Label { 118 | text: "SINAV / TERCİH ADI" 119 | font.bold: true 120 | color: "white" 121 | Layout.preferredWidth: parent.width * 0.25 122 | } 123 | PlasmaComponents.Label { 124 | text: "İŞLEM TİPİ" 125 | font.bold: true 126 | color: "white" 127 | Layout.preferredWidth: parent.width * 0.15 128 | } 129 | PlasmaComponents.Label { 130 | text: "SINAVIN TARİHİ" 131 | font.bold: true 132 | color: "white" 133 | Layout.preferredWidth: parent.width * 0.15 134 | } 135 | PlasmaComponents.Label { 136 | text: "DURUMU" 137 | font.bold: true 138 | color: "white" 139 | Layout.preferredWidth: parent.width * 0.18 140 | } 141 | } 142 | } 143 | } 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPlugin": { 3 | "Authors": [ 4 | { 5 | "Email": "codermert@bk.ru", 6 | "Name": "Mert | @codermert" 7 | } 8 | ], 9 | "Category": "Utilities", 10 | "Description": "ÖSYM duyurularını gösteren plasmoid", 11 | "Icon": "applications-education", 12 | "Id": "org.kde.osymUpdates", 13 | "License": "GPL-2.0+", 14 | "Name": "ÖSYM Güncellemeleri", 15 | "EnabledByDefault": true, 16 | "Version": "1.0", 17 | "Website": "https://www.pling.com/u/codermert/" 18 | }, 19 | "X-Plasma-API": "declarativeappletscript", 20 | "X-Plasma-API-Minimum-Version": "6.0", 21 | "X-Plasma-MainScript": "ui/main.qml", 22 | "KPackageStructure": "Plasma/Applet", 23 | "X-Plasma-ConfigPlugins": ["org.kde.plasma.configuration.osymUpdates"] 24 | } 25 | --------------------------------------------------------------------------------