Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add pass generate functionality
  • Loading branch information
styts committed May 26, 2016
1 parent d836f7f commit 82c51e4
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,2 +1,2 @@
pass.alfredworkflow: info.plist pass-filter.py pass-show.sh
pass.alfredworkflow: info.plist pass-filter.py pass-show.sh pass-generate.sh
zip $@ $^
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -43,6 +43,9 @@ pass show $QUERY | awk 'BEGIN{ORS=""} {print; exit}' | pbcopy

to aviod auto-clearing of clipboard.

## `pg <id>`
Calls `pass generate` to add a new password with default length of 20 chars.

## Development

To generate the `pass.alfredworkflow` file (which you can import to Alfred), just use
Expand Down
63 changes: 61 additions & 2 deletions info.plist
Expand Up @@ -19,6 +19,17 @@
<string></string>
</dict>
</array>
<key>97122574-1811-40EE-8FA3-CA5A7E8CB809</key>
<array>
<dict>
<key>destinationuid</key>
<string>0D9D4DE6-36FF-459E-9457-B3CAD298670C</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
</dict>
<key>createdby</key>
<string>Przemek Kamiński</string>
Expand All @@ -30,6 +41,25 @@
<string>pass</string>
<key>objects</key>
<array>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<false/>
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>bash pass-show.sh "{query}"</string>
<key>type</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>06C9C4A9-38CE-441A-8D06-E2F2D8B39B60</string>
<key>version</key>
<integer>0</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -71,14 +101,33 @@
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>bash pass-show.sh "{query}"</string>
<string>bash pass-generate.sh "{query}"</string>
<key>type</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>06C9C4A9-38CE-441A-8D06-E2F2D8B39B60</string>
<string>0D9D4DE6-36FF-459E-9457-B3CAD298670C</string>
<key>version</key>
<integer>0</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>argumenttype</key>
<integer>0</integer>
<key>keyword</key>
<string>pg</string>
<key>text</key>
<string>Generate password</string>
<key>withspace</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.input.keyword</string>
<key>uid</key>
<string>97122574-1811-40EE-8FA3-CA5A7E8CB809</string>
<key>version</key>
<integer>0</integer>
</dict>
Expand All @@ -92,11 +141,21 @@
<key>ypos</key>
<real>60</real>
</dict>
<key>0D9D4DE6-36FF-459E-9457-B3CAD298670C</key>
<dict>
<key>ypos</key>
<real>180</real>
</dict>
<key>7DD3BDE5-A157-42E5-9376-F681FB50A4EE</key>
<dict>
<key>ypos</key>
<real>60</real>
</dict>
<key>97122574-1811-40EE-8FA3-CA5A7E8CB809</key>
<dict>
<key>ypos</key>
<real>180</real>
</dict>
</dict>
<key>webaddress</key>
<string>https://github.com/CGenie/alfred-pass</string>
Expand Down
8 changes: 8 additions & 0 deletions pass-generate.sh
@@ -0,0 +1,8 @@
#!/bin/bash

set -e

QUERY=$1
PATH=/usr/local/bin:$PATH

pass generate "$QUERY" -n 20 -c

0 comments on commit 82c51e4

Please sign in to comment.