From 1b79de601361b0a38d9b6522bf3bc9f042b6f2d2 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 12 Apr 2018 03:43:04 +0200 Subject: Add draft README Incomplete, but includes a description, and sections for usage, customisation options, dependencies, installation instructions, and license information. --- README.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4ac1965 --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +w3m-session-backup.el +===================== + +Save a list of [emacs-w3m][1] tabs from the “Crash recovery session” to a YAML +backup file. The format is similar to the one used in [Chrome Copy URLs From All +Tabs][2]. This provides a way to get the current list of ‘w3m’ tabs in a +portable format that can be searched or used elsewhere. + + +## Usage +Save a backup using: + + M-x w3m-session-backup + +This can be bound to a key mapping in `w3m-mode` for faster access: + + (defun w3m-mode-config () + (local-set-key (kbd "L") 'w3m-session-backup)) + + (add-hook 'w3m-mode-hook 'w3m-mode-config) + +The resulting file will look like: + + - page_title: 'Example' + url: 'http://example.com' + - page_title: 'TODO' + url: 'TODO' + + +## Customise +By default, backup files get saved to the current directory. This can be changed +by setting the `w3m-session-backup-save-directory` variable: + + (setq w3m-session-backup-save-directory "~/backups") + +TODO default +The backup filename is generated by a function which can be replaced with a +custom function. For example: + + (setq w3m-session-backup-filename-function + (lambda () + (format "w3m-tabs-%s.yml" + (format-time-string "%Y%m%d-%Hh%Mm%S")))) + + +## Requirements + +* [emacs-w3m][1] + + +## Install +Download the [w3m-session-backup.el][3] file. `M-x package-install-file` +TODO + + +## License +Copyright © 2018 Teddy Wing. Licensed under the GNU GPLv3+ (see the included +COPYING file). + + +[1]: https://github.com/ecbrown/emacs-w3m/ +[2]: https://github.com/teddywing/chrome-copy-urls-from-all-tabs +[3]: -- cgit v1.2.3