Updated README

This commit is contained in:
Felipe M 2021-02-10 17:02:24 +01:00
parent ca85afd45c
commit 051c6a228d
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
1 changed files with 31 additions and 9 deletions

View File

@ -10,21 +10,44 @@ Qutebrowser userscript to fill 1password credentials
Ensure you have it installed and set up. Follow the official documentation.
- [rofi](https://github.com/davatorium/rofi) to ask for password and list items
## How it works
First we will ask for the master password using Rofi to get all login items.
Then it'll get the hostname from the current URL and filter results from all the login items stored in the 1password account logged in.
A new Rofi prompt will show up to select one item from the filtered list (items that only match for the current site based on the hostname)
Once an item is selected, we will retrieve it and submit it in the browser by injecting they characters as if the keyboard were writting them, using a `<tab>` to switch fields and a `<cr>` to submit the form. This is done using the [`fake-key`](https://qutebrowser.org/doc/help/commands.html#fake-key) qutebrowser command.
## Usage
Right now it defaults to the `my` account, will be configurable in the future.
Commands:
- `fill_credentials`: Will send the username and password (using a `<tab>` keystroke in between)
- `fill_username`: Will send the username
- `fill_password`: Will send the password
- `fill_totp`: Will send the TOTP
Flags:
- `--auto-submit` Will send a carriage return once the last character is sent, hopefully submitting the form.
- `--cache-session` Caches the session for 30 minutes to prevent asking for the password again in that interval.
- `--allow-insecure-sites` Allow filling in insecure (non-https) sites
```
./qute_1pass.py --help
usage: qute_1pass.py [-h] [--auto-submit] [--cache-session] command
$ python qute_1pass.py --help
usage: qute_1pass.py [-h] [--auto-submit] [--cache-session] [--allow-insecure-sites] command
positional arguments:
command fill_credentials, fill_totp, fill_username, fill_password
command fill_credentials, fill_totp, fill_username, fill_password
optional arguments:
-h, --help show this help message and exit
--auto-submit Auto submit after filling
--cache-session Cache 1password session for 30 minutes
-h, --help show this help message and exit
--auto-submit Auto submit after filling
--cache-session Cache 1password session for 30 minutes
--allow-insecure-sites
Allow filling credentials on insecure sites
```
Call your script from qutebrowser using
@ -35,7 +58,7 @@ Call your script from qutebrowser using
## Contributing
In this project we use Poetry_ to manage the python dependencies and virtual environments. Make sure you have it installed before continuing.
In this project we use [Poetry](https://python-poetry.org/) to manage the python dependencies and virtual environments. Make sure you have it installed before continuing.
Use this command to create the virtualenv, install dev-dependencies and
install the pre-commit hook.
@ -44,5 +67,4 @@ install the pre-commit hook.
make setup
```
After you make your desired changes, open a merge request and I will review it as soon
as I can.
After you make your desired changes, open a merge request or send me a patch via email and I will review it as soon as I can.