From 28eccb5743b07d57c677c4f03767284cf09e27f8 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 22 Sep 2017 17:38:08 +0200 Subject: [PATCH] Rebuilt workflow for better design and auto-update Signed-off-by: Knut Ahlers --- .gitignore | 3 ++ .gitmodules | 3 ++ Makefile | 11 +++- .../F8CBCF9B-3B33-400E-B6AD-6B8500938BA4.png | Bin 13094 -> 0 bytes alfred-workflow/History.md | 9 ---- alfred-workflow/Makefile | 5 -- alfred-workflow/README.markdown | 11 ---- alfred-workflow/exec.py | 45 ++++++++++++++++ alfred-workflow/feedback.py | 47 ---------------- alfred-workflow/info.plist | 51 ++++++++---------- alfred-workflow/lib | 1 + 11 files changed, 82 insertions(+), 104 deletions(-) create mode 100644 .gitmodules delete mode 100644 alfred-workflow/F8CBCF9B-3B33-400E-B6AD-6B8500938BA4.png delete mode 100644 alfred-workflow/History.md delete mode 100644 alfred-workflow/Makefile delete mode 100644 alfred-workflow/README.markdown create mode 100644 alfred-workflow/exec.py delete mode 100755 alfred-workflow/feedback.py create mode 160000 alfred-workflow/lib diff --git a/.gitignore b/.gitignore index f3097ab..a82618d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ password +dist +password_darwin_amd64 +PasswordGenerator.alfredworkflow diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..82a6236 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "alfred-workflow/lib"] + path = alfred-workflow/lib + url = https://github.com/deanishe/alfred-workflow.git diff --git a/Makefile b/Makefile index 774928e..98810da 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,13 @@ publish: bash golang.sh workflow: - cp password_darwin_amd64 password - zip -9 -j PasswordGenerator.alfredworkflow alfred-workflow/* password + mkdir -p dist + cp -r password_darwin_amd64 \ + alfred-workflow/exec.py \ + alfred-workflow/icon.png \ + alfred-workflow/info.plist \ + alfred-workflow/lib/workflow \ + dist + echo -n $(shell git describe --tags --exact-match) > dist/version + cd dist && zip -r -9 ../PasswordGenerator.alfredworkflow * github-release upload --user luzifer --repo password --tag $(shell git describe --tags --exact-match) --name PasswordGenerator.alfredworkflow --file PasswordGenerator.alfredworkflow diff --git a/alfred-workflow/F8CBCF9B-3B33-400E-B6AD-6B8500938BA4.png b/alfred-workflow/F8CBCF9B-3B33-400E-B6AD-6B8500938BA4.png deleted file mode 100644 index 32c10c2f6c270c42746506eba74f1fa0719f22d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13094 zcmV+>Guh0EP)X+uL$Nkc;* zP;zf(X>4Tx07wm;mUmQB*%pV-y*Itk5+Wca^cs2zAksTX6$DXM^`x7XQc?|s+0 z08spb1j2M!0f022SQPH-!CVp(%f$Br7!UytSOLJ{W@ZFO_(THK{JlMynW#v{v-a*T zfMmPdEWc1DbJqWVks>!kBnAKqMb$PuekK>?0+ds;#ThdH1j_W4DKdsJG8Ul;qO2n0 z#IJ1jr{*iW$(WZWsE0n`c;fQ!l&-AnmjxZO1uWyz`0VP>&nP`#itsL#`S=Q!g`M=rU9)45( zJ;-|dRq-b5&z?byo>|{)?5r=n76A4nTALlSzLiw~v~31J<>9PP?;rs31pu_(obw)r zY+jPY;tVGXi|p)da{-@gE-UCa`=5eu%D;v=_nFJ?`&K)q7e9d`Nfk3?MdhZarb|T3 z%nS~f&t(1g5dY)AIcd$w!z`Siz!&j_=v7hZlnI21XuE|xfmo0(WD10T)!}~_HYW!e zew}L+XmwuzeT6wtxJd`dZ#@7*BLgIEKY9Xv>st^p3dp{^Xswa2bB{85{^$B13tWnB z;Y>jyQ|9&zk7RNsqAVGs--K+z0uqo1bf5|}fi5rtEMN^BfHQCd-XH*kfJhJnmIE$G z0%<@5vOzxB0181d*a3EfYH$G5fqKvcPJ%XY23!PJzzuK<41h;K3WmW;Fah3yX$XSw z5EY_9s*o0>51B&N5F1(uc|$=^I1~fLLy3?Ol0f;;Ca4%HgQ}rJP(Ab`bQ-z{U4#0d z2hboi2K@njgb|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x z;m!{y-7o*{nEU-d8#y(0z5X9m$M49F$+pFO8UgvZ9f#`>nbKAUTF`aqxn^AlknGSJ zxDro+>$0U{A_i!k;cHew9ewdfvNvSgW`39f`M5-a1^_34 zXBQNLz6)Fjw=I)hBfDO9Q1(}3zacAu)?V}f01nM>#~VF*7XSbN07*qoM6N<$g8A~# A8vp 256: + wf.add_item(title="Password length out of bounds", + subtitle="Please use a reasonable password length between 5 and 256") + wf.send_feedback() + return 1 + + command = ["./password_darwin_amd64", "get", "-l", str(password_length)] + if use_special: + command.append("-s") + result = subprocess.check_output(command).strip() + + wf.add_item(title=result, arg=result) + wf.send_feedback() + + return 0 + + +if __name__ == "__main__": + wf = Workflow(update_settings={ + 'github_slug': 'Luzifer/password', + }) + + if wf.update_available: + # Download new version and tell Alfred to install it + wf.start_update() + + sys.exit(wf.run(main)) diff --git a/alfred-workflow/feedback.py b/alfred-workflow/feedback.py deleted file mode 100755 index 8a7876f..0000000 --- a/alfred-workflow/feedback.py +++ /dev/null @@ -1,47 +0,0 @@ -#author: Peter Okma -import xml.etree.ElementTree as et - - -class Feedback(): - """Feeback used by Alfred Script Filter - - Usage: - fb = Feedback() - fb.add_item('Hello', 'World') - fb.add_item('Foo', 'Bar') - print fb - - """ - - def __init__(self): - self.feedback = et.Element('items') - - def __repr__(self): - """XML representation used by Alfred - - Returns: - XML string - """ - return et.tostring(self.feedback) - - def add_item(self, title, subtitle="", arg="", valid="yes", autocomplete="", icon="icon.png"): - """ - Add item to alfred Feedback - - Args: - title(str): the title displayed by Alfred - Keyword Args: - subtitle(str): the subtitle displayed by Alfred - arg(str): the value returned by alfred when item is selected - valid(str): whether or not the entry can be selected in Alfred to trigger an action - autcomplete(str): the text to be inserted if an invalid item is selected. This is only used if 'valid' is 'no' - icon(str): filename of icon that Alfred will display - """ - item = et.SubElement(self.feedback, 'item', uid=str(len(self.feedback)), - arg=arg, valid=valid, autocomplete=autocomplete) - _title = et.SubElement(item, 'title') - _title.text = title - _sub = et.SubElement(item, 'subtitle') - _sub.text = subtitle - _icon = et.SubElement(item, 'icon') - _icon.text = icon diff --git a/alfred-workflow/info.plist b/alfred-workflow/info.plist index edeaeb8..896ac2f 100644 --- a/alfred-workflow/info.plist +++ b/alfred-workflow/info.plist @@ -3,7 +3,7 @@ bundleid - me.knut.pwd + io.luzifer.pwd category Tools connections @@ -17,6 +17,8 @@ 0 modifiersubtext + vitoclose + @@ -37,17 +39,23 @@ clipboardtext {query} + transient + type alfred.workflow.output.clipboard uid F417810A-4CC7-4844-9B6E-DA2D6B40543C version - 0 + 2 config + alfredfiltersresults + + argumenttrimmode + 0 argumenttype 1 escaping @@ -65,38 +73,17 @@ runningsubtext Generating password... script - import subprocess, sys -from feedback import Feedback - -password_length = 20 -use_special = False - -for arg in '{query}'.split(): - if arg.isdigit(): - password_length = int(arg) - elif arg == 's': - use_special = True - -if password_length < 5 or password_length > 128: - fb = Feedback() - fb.add_item(title="Password length out of bounds", subtitle="Please use a reasonable password length between 5 and 128") - print fb - sys.exit(1) - -command = ["./password", "get", "-l", str(password_length)] -if use_special: - command.append("-s") -result = subprocess.check_output(command).strip() - -fb = Feedback() -fb.add_item(title=result, arg=result) -print fb + python exec.py "$1" + scriptargtype + 1 + scriptfile + subtext Generates a secure password with <n> length title Password Generator type - 3 + 0 withspace @@ -105,7 +92,7 @@ print fb uid F8CBCF9B-3B33-400E-B6AD-6B8500938BA4 version - 0 + 2 readme @@ -114,11 +101,15 @@ print fb F417810A-4CC7-4844-9B6E-DA2D6B40543C + xpos + 700 ypos 170 F8CBCF9B-3B33-400E-B6AD-6B8500938BA4 + xpos + 300 ypos 170 diff --git a/alfred-workflow/lib b/alfred-workflow/lib new file mode 160000 index 0000000..39241c1 --- /dev/null +++ b/alfred-workflow/lib @@ -0,0 +1 @@ +Subproject commit 39241c12cff55dd94cd001c32de2e319a71a6e66