[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ranger-users] Shell script over multiple files
From: |
hut |
Subject: |
Re: [Ranger-users] Shell script over multiple files |
Date: |
Sun, 12 Jun 2016 19:12:20 +0200 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
Yes, that was my first idea too. FYI, you can pass the filenames of all
the files which you selected with `space` or `v` to a script like this:
shell mpvsubs.sh %s
Regards,
hut
On Sun, Jun 12, 2016 at 10:39:31PM +0530, G Chandramouli wrote:
> Thanks Hut,
> Excellent hack. It works !!!
> I was expecting something like "mpvsubs.sh $1 $2" where 1 and 2 will be
> filenames selected, whose extensions will be sorted out inside the script
> and mpv playing over them from the same script.
> Anyways above solution rocks.
>
> Thanks again,
> Mouli
>
> On Sun, Jun 12, 2016 at 10:22 PM, hut <address@hidden> wrote:
>
> > Hey there,
> >
> > Can't think of an elegant way to do it, but you could type `yy` on the
> > subtitle, then navigating to the movie and running
> >
> > shell mpv %f --sub-file=%c
> >
> > This "abuses" the copy buffer as a second file selector.
> >
> > You could finish with a `uy` to clear the copy buffer to avoid
> > accidently copying the subtitle. The whole command would then be:
> >
> > map X chain shell mpv %f --sub-file=%c; uncut
> >
> > Regards,
> > hut
> >
> > On Sun, Jun 12, 2016 at 10:10:04PM +0530, G Chandramouli wrote:
> > > Hello all,
> > > I want to run a shell script over multiple selected files
> > > (say selected using spacebar ). How to do this ?
> > >
> > > Actually, I am trying to open a movie with mpv and load subtitles. mpv
> > > player loads subtitles automatically only when subtitles have same
> > filename
> > > with srt/sub extension. Renaming subtitles every time is a tiring job. I
> > > don't want to start a shell prompt and write the command "mpv
> > filename.mp4
> > > --sub-file=subfile.srt". Instead I want to select the two files using
> > > spacebar or something and run a script over them to start mpv and keeping
> > > the ranger intact.
> > >
> > > Thanks,
> > > Mouli
> >
> >
- [Ranger-users] Shell script over multiple files, G Chandramouli, 2016/06/12
- Re: [Ranger-users] Shell script over multiple files, hut, 2016/06/12
- Re: [Ranger-users] Shell script over multiple files, G Chandramouli, 2016/06/12
- Re: [Ranger-users] Shell script over multiple files,
hut <=
- Re: [Ranger-users] Shell script over multiple files, Jan Knížek, 2016/06/12
- Re: [Ranger-users] Shell script over multiple files, G Chandramouli, 2016/06/12
- Re: [Ranger-users] Shell script over multiple files, G Chandramouli, 2016/06/12
- Re: [Ranger-users] Shell script over multiple files, hut, 2016/06/13
- Re: [Ranger-users] Shell script over multiple files, G Chandramouli, 2016/06/13
- Re: [Ranger-users] Shell script over multiple files, hut, 2016/06/13