Conversation
Signed-off-by: Matthias Klass <matthias.klass@gmail.com>
AnomalRoil
left a comment
There was a problem hiding this comment.
Overall, LGTM.
Maybe adding some documentation somewhere, maybe in the README.md could help, because I have never used Alfred and wouldn't know how to set this up currently.
From what I'm reading in the makefile it would work if this is git cloned in a direct sub directory of one's home folder and then you run make release in there, correct?
@dominikschulz I sadly don't have a MacOs device handy for testing anymore right now...
Any chance you could test it?
| def clear_field_content(): | ||
| os.system("""echo 'tell application "System Events" to keystroke "a" using command down' | osascript""") | ||
| do_stroke(51) |
There was a problem hiding this comment.
I'm not convinced how this is actually clearing a field? Isn't it just adding 51 times a char a to the field?
There was a problem hiding this comment.
Well this is a bit special - how do you clear a field only from the command line? What I came up with is just issue a Ctrl+a and issue a backspace.
You can find the full reference of available keystrokes here.
| def get_additional_autotype_handlers_filename(): | ||
| base_path = os.getenv("XDG_CONFIG", home) | ||
| return '{base_path}/{filename}'.format(base_path=base_path, filename=".gopass_autotype_handlers.json") | ||
|
|
||
|
|
||
| def load_additional_autotype_handlers_config(): | ||
| handlers_path = get_additional_autotype_handlers_filename() | ||
| if os.path.exists(handlers_path): | ||
| with open(handlers_path) as f: | ||
| return json.load(f) | ||
| else: | ||
| return {} |
There was a problem hiding this comment.
Not sure why we need this?
What's supposed to be in the .gopass_autotype_handlers.json file?
There was a problem hiding this comment.
I've added a bit of extra documentation. In the end it allows to include output from external commands in the autotype command. I explicitly use it to type YubiKey TOTP tokens in authentication forms, so I don't have to do it manually. It allows to fill forms completely, without any manual interaction (as long as you can code any part as bash commands)
There was a problem hiding this comment.
In general there is an updated documentation for the autotyping, also including the special commands and the additional handlers. Maybe that makes it more clear on how it works.
Add autotyping
"gpa" for general autotyping based on an "autotype" field
"gpf" to type a single field