org-passwords

Homepage: https://github.com/alfaromurillo/org-passwords.el

Author: Jorge A. Alfaro-Murillo

Updated:

Summary

Org derived mode for managing passwords

Commentary

This file contains the code for managing your passwords with
Org-mode.  It is part of org/contrib (see http://orgmode.org/).  If
you want to contribute with development, or want to report a
problem, please do it from github
(https://github.com/alfaromurillo/org-passwords.el.git).

A basic setup needs to indicate a passwords file, and a dictionary
for the random words:

  (require 'org-passwords)
  (setq org-passwords-file "~/documents/passwords.gpg")
  (setq org-passwords-random-words-dictionary "/etc/dictionaries-common/words")

The first line of org-passwords-file should be:
  # -*- mode: org-passwords -*-
so that the file loads with org-passwords-mode as major mode.

Basic usage:

  `M-x org-passwords' opens the passwords file in
  `org-passwords-mode'.

  `M-x org-passwords-generate-password' generates a random string
  of numbers, lowercase letters and uppercase letters.

  `C-u M-x org-passwords-generate-password' generates a random
  string of numbers, lowercase letters, uppercase letters and
  symbols.

  `M-x org-passwords-random-words' concatenates random words from
  the dictionary defined by `org-passwords-random-words-dictionary'
  into a string, each word separated by the string defined in
  `org-passwords-random-words-separator'.

  `C-u M-x org-passwords-random-words' does the same as above, and
  also makes substitutions according to
  `org-passwords-random-words-substitutions'.

It is also useful to set up keybindings for the functions
`org-passwords-copy-username', `org-passwords-copy-password' and
`org-passwords-open-url' in the `org-passwords-mode', to easily
make the passwords and usernames available to the facility for
pasting text of the window system (clipboard on X and MS-Windows,
pasteboard on Nextstep/Mac OS, etc.), without inserting them in the
kill-ring.  You can set for example:

  (eval-after-load "org-passwords"
    '(progn
       (define-key org-passwords-mode-map
         (kbd "C-c u")
         'org-passwords-copy-username)
       (define-key org-passwords-mode-map
         (kbd "C-c p")
         'org-passwords-copy-password)
       (define-key org-passwords-mode-map
         (kbd "C-c o")
         '(lambda ()
            (interactive)
            (org-passwords-copy-password)
            (org-passwords-open-url)))))

Finally, to enter new passwords, you can use `org-capture' and a
minimal template like:

  ("p" "password" entry (file "~/documents/passwords.gpg")
   "* %^{Title}\n  %^{URL}p %^{USERNAME}p %^{PASSWORD}p")

When asked for the password you can then call either
`org-passwords-generate-password' or `org-passwords-random-words'.
Be sure to enable recursive minibuffers to call those functions
from the minibuffer:

  (setq enable-recursive-minibuffers t)

Dependencies