-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add editorconfig Add gitignore Add VSCode settings Add License Add workflow files Add screencast Add other icons Add screenshot Add README
- Loading branch information
Showing
18 changed files
with
443 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Python CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-python/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/python:2.7 | ||
|
||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "requirements.txt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: | ||
name: install dependencies | ||
command: | | ||
python2.7 -m virtualenv .venv | ||
. .venv/bin/activate | ||
pip install -r requirements.txt | ||
- save_cache: | ||
paths: | ||
- ./venv | ||
key: v1-dependencies-{{ checksum "requirements.txt" }} | ||
|
||
# run tests! | ||
- run: | ||
name: run tests | ||
command: | | ||
. .venv/bin/activate | ||
python -m unittest discover --start-directory tests | ||
- store_artifacts: | ||
path: test-reports | ||
destination: test-reports | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
||
[*.py] | ||
max_line_length = 160 | ||
|
||
[*.json] | ||
insert_final_newline = ignore | ||
|
||
# Makefiles always use tabs for indentation | ||
[Makefile] | ||
indent_style = tab | ||
|
||
# Batch files use tabs for indentation | ||
[*.bat] | ||
indent_style = tab | ||
|
||
[docs/**.txt] | ||
max_line_length = 79 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"python.pythonPath": "${workspaceFolder}/.venv/bin/python" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
The MIT License (MIT) | ||
===================== | ||
|
||
Copyright © `2018` `Alexander Graf` | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the “Software”), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Generate Passwords Workflow 🔐 for [Alfred 3](http://www.alfredapp.com) | ||
|
||
[![Latest Version](https://img.shields.io/github/tag/otherguy/alfred-generate-password-workflow.svg?style=flat-square&label=release)](https://github.com/otherguy/alfred-generate-password-workflow/tags) | ||
[![Downloads](https://img.shields.io/github/downloads/otherguy/alfred-generate-password-workflow/total.svg?style=flat-square)](https://github.com/otherguy/alfred-generate-password-workflow/releases) | ||
[![Circle CI](https://img.shields.io/circleci/project/github/otherguy/alfred-generate-password-workflow/master.svg?style=flat-square)](https://circleci.com/gh/otherguy/alfred-generate-password-workflow/tree/master) | ||
[![Issues](https://img.shields.io/github/issues/otherguy/alfred-generate-password-workflow.svg?style=flat-square)](https://github.com/otherguy/alfred-generate-password-workflow/issues) | ||
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE.md) | ||
[![Beerpay](https://img.shields.io/beerpay/otherguy/alfred-generate-password-workflow.svg?style=flat-square)](https://beerpay.io/otherguy/alfred-generate-password-workflow) | ||
|
||
A workflow for [Alfred 3](http://www.alfredapp.com) that helps you to quickly and securely generate random passwords of any given length. | ||
|
||
By default, it generates both an alphanumeric password and a strong password, containing special characters. As a bonus, it also generates [XKCD passwords](https://xkcd.com/936/) with 3 and 4 words. | ||
|
||
Selecting the generated password copies it to the clipboard. | ||
|
||
![Example Screencast](resources/screencast-1.gif) | ||
|
||
The latest version can be found here as well: | ||
|
||
* https://www.alfredforum.com/topic/10546-airports/ | ||
* https://www.alfredforum.com/topic/11717-generate-passwords-workflow/ | ||
|
||
## Installation | ||
|
||
Download the latest version of the `Genererate Passwords.alfredworkflow` from the [Releases](https://github.com/otherguy/alfred-generate-password-workflow/releases) page and double click the downloaded file to install it. | ||
|
||
The workflow supports automatic updates and will perform daily update checks. | ||
|
||
## Caveats and Requirements | ||
|
||
This workflow requires [Alfred 3](https://www.alfredapp.com) and won’t run on **Snow Leopard (10.6)** or lower. | ||
|
||
## Usage | ||
|
||
The default keyword is `pw`. The first and only parameter is the desired password length, defaulting to 10. | ||
|
||
When hitting `⏎ Return` on a selected item, the generated password is copied to the clipboard. | ||
|
||
## `TODO` / Future Work | ||
|
||
* Add possibility to change default options | ||
|
||
## Developers | ||
|
||
If you want to contribute, fork this repository and submit a pull request. | ||
|
||
To make the project work locally on your machine, check out the repository and issue the following commands: | ||
|
||
$ pip install --ignore-installed --target=. Alfred-Workflow==1.36 | ||
$ pip install --ignore-installed --target=lib -r requirements.txt | ||
|
||
Alternatively, if you would rather work with a virtual environment, run these commands: | ||
|
||
$ virtualenv --python=python2.7 .venv | ||
$ source .venv/bin/activate | ||
$ pip install -r requirements.txt | ||
|
||
To run the script in the terminal, simply do: | ||
|
||
$ python pwgen.py | ||
|
||
You can install `jq` from [Homebrew](https://brew.sh) and pipe the output of the workflow through this program to get nice formatting and the option to query the JSON. | ||
|
||
## Acknowledgements | ||
|
||
The following resources were used when creating this workflow: | ||
|
||
* The excellent [Alfred-Workflow](https://github.com/deanishe/alfred-workflow) python library by [Dean Jackson](https://github.com/deanishe). | ||
* The lock icon used in the workflow by [Pixel perfect](https://www.flaticon.com/authors/pixel-perfect) and licensed under [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/). | ||
* The [`xkcdpass`](https://pypi.org/project/xkcdpass/) Python library for generating [XKCD passwords](https://xkcd.com/936/) | ||
|
||
A big ♥️ _thank you_ to all creators! | ||
|
||
## Support on Beerpay | ||
|
||
If this is useful to you in any way or you end up building it yourself, you could buy me a beer! | ||
|
||
[![Beerpay](https://beerpay.io/otherguy/alfred-generate-password-workflow/badge.svg?style=beer-square)](https://beerpay.io/otherguy/alfred-generate-password-workflow) [![Beerpay](https://beerpay.io/otherguy/alfred-generate-password-workflow/make-wish.svg?style=flat-square)](https://beerpay.io/otherguy/alfred-generate-password-workflow?focus=wish) |
Oops, something went wrong.