/[scripts]/trunk/play-toggle.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/play-toggle.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 99 - (hide annotations)
Thu Nov 20 19:50:44 2008 UTC (15 years, 4 months ago) by dpavlin
File MIME type: application/x-sh
File size: 741 byte(s)
Easy audio transcript using vim and mocp

1 dpavlin 99 #!/bin/sh
2    
3     cmd="--toggle-pause"
4    
5     if echo "x$1x" | grep '^x-*[0-9][0-9]*x$' > /dev/null ; then
6     cmd="--seek $1"
7     elif [ ! -z "$1" ] ; then
8     mocp --info | grep "^$1: " | sed 's/^.*: //'
9     exit
10     fi
11    
12     mocp $cmd
13     mocp --info |\
14     egrep '^(State|File|Title|CurrentTime|TotalTime)' |\
15     egrep '^(State|File|Title|CurrentTime|TotalTime)' | sed 's/^[^:]*: *//' |\
16     osd_cat -p bottom -A center -s 3 -f neep-24 -O 2 -d 1 -l 5
17    
18     exit
19    
20     # insert following in ~/.vimrc:
21    
22     " moc(p) support for autdio transcribing
23     " play-pause
24     noremap [33~ :silent execute "! play-toggle.sh &"<cr>:redraw!<cr>
25     " seek 5 sec backward
26     noremap [34~ :silent execute "! play-toggle.sh -5 &"<cr>:redraw!<cr>
27     " CurrentTime from mocp --info
28     noremap [29~ :r !play-toggle.sh CurrentTime<cr>

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26