Compare commits
No commits in common. "main" and "v1.1" have entirely different histories.
8 changed files with 7 additions and 197 deletions
|
@ -1,12 +1,12 @@
|
||||||
name: Auto build
|
name: Sanity check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
apt:
|
build:
|
||||||
name: Build Debian Package
|
name: Test Python file
|
||||||
runs-on: debian-latest
|
runs-on: debian-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -20,25 +20,3 @@ jobs:
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: sweecrypt-gtk.deb
|
path: sweecrypt-gtk.deb
|
||||||
flatpak:
|
|
||||||
name: Build Flatpak Package
|
|
||||||
runs-on: debian-testing
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
- name: Install dependencies
|
|
||||||
run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
||||||
- name: Install org.gnome.Sdk
|
|
||||||
run: flatpak -y --user install flathub org.gnome.Sdk//47
|
|
||||||
- name: Install org.gnome.Platform
|
|
||||||
run: flatpak -y --user install flathub org.gnome.Platform//47
|
|
||||||
- name: Generate file for use in flatpak
|
|
||||||
run: python generate-flatpak.py
|
|
||||||
- name: Build flatpak package
|
|
||||||
run: flatpak-builder --repo=flatrepo --disable-rofiles-fuse flatpak codes.swee.SweeCryptGTK.json
|
|
||||||
- name: Package the directory
|
|
||||||
run: tar -cvf flatpak.tar flatpak flatrepo
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
path: flatpak.tar
|
|
|
@ -1,91 +0,0 @@
|
||||||
{
|
|
||||||
"app-id": "codes.swee.SweeCryptGTK",
|
|
||||||
"runtime": "org.gnome.Platform",
|
|
||||||
"runtime-version": "47",
|
|
||||||
"sdk": "org.gnome.Sdk",
|
|
||||||
"command": "sweecrypt-gtk",
|
|
||||||
"finish-args": [
|
|
||||||
"--socket=x11",
|
|
||||||
"--socket=wayland",
|
|
||||||
"--filesystem=xdg-config"
|
|
||||||
],
|
|
||||||
"rename-icon": "codes.swee.SweeCryptGTK",
|
|
||||||
"modules": [
|
|
||||||
{
|
|
||||||
"name": "python3-modules",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"build-commands": [],
|
|
||||||
"modules": [
|
|
||||||
{
|
|
||||||
"name": "python3-sweecrypt",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"build-commands": [
|
|
||||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"sweecrypt\" --no-build-isolation"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/de/f0/7880030d201e7997573415bb26ddcb91b41bda443fa9feb964aa9a967fa5/sweecrypt-1.1.1-py3-none-any.whl",
|
|
||||||
"sha256": "09bcda1266b621b46b88b0804985330dc006818da6502c631578ff180e86640b"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "python3-pygobject",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"build-commands": [
|
|
||||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"pygobject\" --no-build-isolation"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/07/4a/42b26390181a7517718600fa7d98b951da20be982a50cd4afb3d46c2e603/pycairo-1.27.0.tar.gz",
|
|
||||||
"sha256": "5cb21e7a00a2afcafea7f14390235be33497a2cce53a98a19389492a60628430"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/2b/58/d34e67a79631177e3c08e7d02b5165147f590171f2cae6769502af5f7f7e/pygobject-3.50.0.tar.gz",
|
|
||||||
"sha256": "4500ad3dbf331773d8dedf7212544c999a76fc96b63a91b3dcac1e5925a1d103"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
"name": "sweecrypt-gtk",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"build-commands": ["chmod 1777 sweecrypt-gtk-flatpak.py",
|
|
||||||
"install -D sweecrypt-gtk-flatpak.py /app/bin/sweecrypt-gtk",
|
|
||||||
"install -D flatpak.ui /app/opt/sweecrypt-gtk.ui",
|
|
||||||
"install -D sweecrypt.png /app/share/icons/hicolor/128x128/apps/codes.swee.SweeCryptGTK.png",
|
|
||||||
"install -D sweecrypt.svg /app/share/icons/hicolor/scalable/apps/codes.swee.SweeCryptGTK.svg",
|
|
||||||
"install -D flatpak.desktop /app/share/applications/codes.swee.SweeCryptGTK.desktop",
|
|
||||||
"install -D flatpak.xml /app/share/metainfo/codes.swee.SweeCryptGTK.metainfo.xml"],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"path": "flatpak.ui"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"path": "sweecrypt-gtk-flatpak.py"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"path": "flatpak.desktop"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"path": "dpkg/usr/share/icons/hicolor/128x128/apps/sweecrypt.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"path": "dpkg/usr/share/icons/hicolor/scalable/apps/sweecrypt.svg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"path": "flatpak.xml"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: sweecrypt-gtk
|
Package: sweecrypt-gtk
|
||||||
Version: 1.2
|
Version: 1.1
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Name=SweeCrypt GTK
|
|
||||||
Comment=Simple and fun cipher
|
|
||||||
Exec=sweecrypt-gtk
|
|
||||||
Type=Application
|
|
||||||
Icon=codes.swee.SweeCryptGTK
|
|
||||||
Categories=Utility;
|
|
||||||
StartupNotify=false
|
|
20
flatpak.xml
20
flatpak.xml
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<component type="desktop-application">
|
|
||||||
<id>codes.swee.SweeCryptGTK</id>
|
|
||||||
<metadata_license>MIT</metadata_license>
|
|
||||||
<project_license>MIT</project_license>
|
|
||||||
<name>A Simple and fun cipher frontend</name>
|
|
||||||
<summary>A frontend for the SweeCrypt python module</summary>
|
|
||||||
<url type="homepage">https://git.swee.codes/swee/sweecrypt-gtk</url>
|
|
||||||
<description>
|
|
||||||
<p>A frontend for the <a href="https://github.com/sweezero/sweecrypt">SweeCrypt Python Module</a>.</p>
|
|
||||||
</description>
|
|
||||||
<releases>
|
|
||||||
<release date="2024-12-24" version="1.2"/>
|
|
||||||
</releases>
|
|
||||||
<content_rating type="oars-1.0"/>
|
|
||||||
<developer_name>SWEE.codes</developer_name>
|
|
||||||
<!-- <url type="bugtracker">https://</url> -->
|
|
||||||
<update_contact>meow@swee.codes</update_contact>
|
|
||||||
<launchable type="desktop-id">codes.swee.SweeCryptGTK.desktop</launchable>
|
|
||||||
</component>
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/usr/bin/python3
|
|
||||||
import os
|
|
||||||
print("Creating Flatpak package...")
|
|
||||||
file = open("sweecrypt-gtk.py").read().split("\n")
|
|
||||||
file[3] = 'UI_FILE = "/app/opt/sweecrypt-gtk.ui"'
|
|
||||||
file.insert(0, "#!/usr/bin/env python3")
|
|
||||||
file = "\n".join(file)
|
|
||||||
open("sweecrypt-gtk-flatpak.py", "w").write(file)
|
|
||||||
os.system("chmod 1777 sweecrypt-gtk-flatpak.py")
|
|
||||||
file = open("sweecrypt-gtk.ui").read().split("\n")
|
|
||||||
file[19] = " <property name=\"icon-name\">codes.swee.SweeCryptGTK</property>"
|
|
||||||
file = "\n".join(file)
|
|
||||||
open("flatpak.ui", "w").write(file)
|
|
||||||
os.system("mkdir flatpak")
|
|
|
@ -14,13 +14,12 @@ class GUI:
|
||||||
checkbox.set_property("label", "Encode" if checkbox.get_property("active") else "Decode")
|
checkbox.set_property("label", "Encode" if checkbox.get_property("active") else "Decode")
|
||||||
def start_clicked(self, start):
|
def start_clicked(self, start):
|
||||||
encode = self.builder.get_object('encode').get_property("active")
|
encode = self.builder.get_object('encode').get_property("active")
|
||||||
shift = int(self.builder.get_object('shift').get_property("value"))
|
|
||||||
inputted = self.builder.get_object('text').get_property("text")
|
inputted = self.builder.get_object('text').get_property("text")
|
||||||
if encode:
|
if encode:
|
||||||
self.builder.get_object('text').set_property("text", sc.encrypt(inputted, shift))
|
self.builder.get_object('text').set_property("text", sc.encrypt(inputted))
|
||||||
self.builder.get_object('encode').set_property("active", False)
|
self.builder.get_object('encode').set_property("active", False)
|
||||||
else:
|
else:
|
||||||
self.builder.get_object('text').set_property("text", sc.decrypt(inputted, shift))
|
self.builder.get_object('text').set_property("text", sc.decrypt(inputted))
|
||||||
self.builder.get_object('encode').set_property("active", True)
|
self.builder.get_object('encode').set_property("active", True)
|
||||||
def main():
|
def main():
|
||||||
app = GUI()
|
app = GUI()
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
<!-- Generated with glade 3.40.0 -->
|
<!-- Generated with glade 3.40.0 -->
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.24"/>
|
<requires lib="gtk+" version="3.24"/>
|
||||||
<object class="GtkAdjustment" id="database-shift">
|
|
||||||
<property name="lower">-100</property>
|
|
||||||
<property name="upper">100</property>
|
|
||||||
<property name="step-increment">1</property>
|
|
||||||
<property name="page-increment">10</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkTextBuffer" id="text">
|
<object class="GtkTextBuffer" id="text">
|
||||||
<property name="text" translatable="yes">replace this text with anything
|
<property name="text" translatable="yes">replace this text with anything
|
||||||
you want to encode or decode.</property>
|
you want to encode or decode.</property>
|
||||||
|
@ -57,18 +51,6 @@ you want to encode or decode.</property>
|
||||||
<property name="active">True</property>
|
<property name="active">True</property>
|
||||||
<signal name="toggled" handler="toggle" swapped="no"/>
|
<signal name="toggled" handler="toggle" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can-focus">False</property>
|
|
||||||
<property name="label" translatable="yes">Database shift: </property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
|
@ -90,22 +72,6 @@ you want to encode or decode.</property>
|
||||||
<property name="position">2</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="shift">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can-focus">True</property>
|
|
||||||
<property name="caps-lock-warning">False</property>
|
|
||||||
<property name="primary-icon-tooltip-text" translatable="yes">Database shift</property>
|
|
||||||
<property name="adjustment">database-shift</property>
|
|
||||||
<property name="climb-rate">1</property>
|
|
||||||
<property name="numeric">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
|
Loading…
Reference in a new issue