branch: elpa/mpv
commit e3fad297cd68719b8573bd326b01bbdf20ef4a87
Author: Johann Klähn <[email protected]>
Commit: Johann Klähn <[email protected]>
add README.md
---
README.md | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..2bf926a46c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,31 @@
+# mpv.el
+
+This package is a potpourri of helper functions to control a [mpv][]
+process via its IPC interface. After installing you might want to add
+some of the following to your init file to ease transcription of videos
+using Org-mode:
+
+```emacs
+(defun org-timer-item--mpv-insert-playback-position (fun &rest args)
+ "When no org timer is running but mpv is alive, insert playback position."
+ (if (and
+ (not org-timer-start-time)
+ (mpv--alive-p))
+ (mpv-insert-playback-position t)
+ (apply fun args)))
+(advice-add 'org-timer-item :around
+ #'org-timer-item--mpv-insert-playback-position)
+
+(org-add-link-type "mpv" #'mpv-play)
+(defun org-mpv-complete-link (&optional arg)
+ (replace-regexp-in-string
+ "file:" "mpv:"
+ (org-file-complete-link arg)
+ t t))
+(add-hook 'org-open-at-point-functions #'mpv-seek-to-position-at-point)
+```
+
+Apart from that, just have a look at the interactive functions in
+[mpv.el](mpv.el).
+
+[mpv]: http://mpv.io/