From 978908e5af2fc7a0ccff19219cd84ee77adf3283 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Thu, 4 Feb 2021 10:28:49 +0100 Subject: [PATCH] Add crude installer for development purposes --- src/install.sh | 10 ++++++++++ src/passui | 4 +--- src/passui.desktop | 17 +++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100755 src/install.sh create mode 100644 src/passui.desktop diff --git a/src/install.sh b/src/install.sh new file mode 100755 index 0000000..42ef31a --- /dev/null +++ b/src/install.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +if [[ -f /usr/bin/apk ]]; then # PostmarketOS/Alpine + sudo apk add py3-wxpython +elif [[ -f /usr/bin/apt ]]; then # Mobian/Debian/Ubuntu + sudo apt install python3-wxgtk4.0 +elif [[ -f /usr/bin/dnf ]]; then # Fedora + sudo dnf install python3-wxpython4 +fi +sudo cp passui /usr/local/bin/ +sudo cp passui.desktop /usr/share/applications/ diff --git a/src/passui b/src/passui index af40214..5ee734e 100755 --- a/src/passui +++ b/src/passui @@ -173,7 +173,7 @@ def pass_pull(): result = run_command('/usr/bin/pass git pull') def pass_push(): - result = run_command('/usr/bin/pass git pull') + result = run_command('/usr/bin/pass git push') def run_command(command1, command2=None): """Run a command on system and capture result""" @@ -192,13 +192,11 @@ def run_command(command1, command2=None): return process1.communicate() def save_to_pass(event, path, text): - pass_pull() password = text.GetLineText(0) print(password) command1 = '/bin/echo ' + password command2 = '/usr/bin/pass insert -m ' + path result = run_command(command1, command2) - pass_push() if __name__ == '__main__': # When this module is run (not imported) then create the app, the diff --git a/src/passui.desktop b/src/passui.desktop new file mode 100644 index 0000000..c3bd3bb --- /dev/null +++ b/src/passui.desktop @@ -0,0 +1,17 @@ +[Desktop Entry] +Type=Application +Name=PassUi +Version=1.0 +GenericName=Password Manager +GenericName[ca]=Gestor de contrasenyes +GenericName[nl]=Wachtwoordbeheerder +GenericName[sv_SE]=Lösenordshanterare +Comment=GUI for the standard unix password store +Comment[ca]=Interfície gràfica per al magatzem de contrasenyes UNIX estàndard +Comment[nl]=GUI voor de standaard Unix wachtwoordopslag +Comment[sv_SE]=GUI för Unix standardlösenordshanterare +Exec=/usr/local/bin/passui +Icon=dialog-password +Terminal=false +Categories=Security;Utility; +Keywords=Password;Manager;