PATCH: 0001-Add-emms-tag-editor-pipe-function

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

PATCH: 0001-Add-emms-tag-editor-pipe-function

tumashu

This function let user run external command easily, maybe useful to other people


0001-Add-emms-tag-editor-pipe-function.patch (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PATCH: 0001-Add-emms-tag-editor-pipe-function

Yoni Rabkin-2

Can you give me an example of how the pipe functionality would work?
Under which circumstances would one use this, as opposed to a shell
command?

Your explanation will be valuable especially in the context of writing a
manual entry explaining how the feature works.

Thanks.

--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re:Re: PATCH: 0001-Add-emms-tag-editor-pipe-function

tumashu

The below is my usecase:

("mid3iconv -e gbk <file>"
 :command "mid3iconv"
 :arguments ("-e" "gbk" name))

There are garbled characters in many Chinese mp3 file's tags,
so I need run "mid3iconv -e gbk mp3-file" to convert.

If I run in bash, I need to find the file, convert and rebuild emms cache ...

If we have this pipe function, I just select all track and run emms-tag-editor-pipe command,
then select "mid3iconv -e gkb <file>" pipe, all works will be auto finished.

by the way, "mid3iconv -e gbk <file>" pipe included in the patch just an example to
show how emms-tag-editor-pipe to work :-)

other example :-)

("scp <file> feng@localhost:/home/feng/Music/<artist>/>"
 :command "scp"
 :arguments
 (lambda (track)
   (let* ((file (emms-track-name track))
          (artist (emms-track-get track 'info-artist "Misc"))
          (dir (concat "feng@localhost:/home/feng/Music/" artist)))
     (list file dir))))















At 2020-11-11 00:57:00, "Yoni Rabkin" <[hidden email]> wrote:

>
>Can you give me an example of how the pipe functionality would work?
>Under which circumstances would one use this, as opposed to a shell
>command?
>
>Your explanation will be valuable especially in the context of writing a
>manual entry explaining how the feature works.
>
>Thanks.
>
>--
>   "Cut your own wood and it will warm you twice"

=?GBK?Q?=BD=D8=CD=BC=5F2020-11-11=5F08-52-46.png?= (53K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PATCH: 0001-Add-emms-tag-editor-pipe-function

Yoni Rabkin-2
tumashu  <[hidden email]> writes:

> The below is my usecase:
>
> ("mid3iconv -e gbk <file>"
>  :command "mid3iconv"
>  :arguments ("-e" "gbk" name))
>
> There are garbled characters in many Chinese mp3 file's tags,
> so I need run "mid3iconv -e gbk mp3-file" to convert.
>
> If I run in bash, I need to find the file, convert and rebuild emms cache ...
>
> If we have this pipe function, I just select all track and run emms-tag-editor-pipe command,
> then select "mid3iconv -e gkb <file>" pipe, all works will be auto finished.
>
> by the way, "mid3iconv -e gbk <file>" pipe included in the patch just an example to
> show how emms-tag-editor-pipe to work :-)
>
> other example :-)
>
> ("scp <file> feng@localhost:/home/feng/Music/<artist>/>"
>  :command "scp"
>  :arguments
>  (lambda (track)
>    (let* ((file (emms-track-name track))
>           (artist (emms-track-get track 'info-artist "Misc"))
>           (dir (concat "feng@localhost:/home/feng/Music/" artist)))
>      (list file dir))))

This is a interesting idea. Can other people please consider this and
provide input?

--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re:Re: PATCH: 0001-Add-emms-tag-editor-pipe-function

tumashu

>This is a interesting idea. Can other people please consider this and
>provide input?
>

Seem to no other people's comment :-\

>--
>   "Cut your own wood and it will warm you twice"
Reply | Threaded
Open this post in threaded view
|

Re:Re: PATCH: 0001-Add-emms-tag-editor-pipe-function

tumashu
In reply to this post by Yoni Rabkin-2
Hello,  any progress about this patch?  :-)








At 2020-11-12 07:55:33, "Yoni Rabkin" <[hidden email]> wrote: >tumashu <[hidden email]> writes: > >> The below is my usecase: >> >> ("mid3iconv -e gbk <file>" >> :command "mid3iconv" >> :arguments ("-e" "gbk" name)) >> >> There are garbled characters in many Chinese mp3 file's tags, >> so I need run "mid3iconv -e gbk mp3-file" to convert. >> >> If I run in bash, I need to find the file, convert and rebuild emms cache ... >> >> If we have this pipe function, I just select all track and run emms-tag-editor-pipe command, >> then select "mid3iconv -e gkb <file>" pipe, all works will be auto finished. >> >> by the way, "mid3iconv -e gbk <file>" pipe included in the patch just an example to >> show how emms-tag-editor-pipe to work :-) >> >> other example :-) >> >> ("scp <file> feng@localhost:/home/feng/Music/<artist>/>" >> :command "scp" >> :arguments >> (lambda (track) >> (let* ((file (emms-track-name track)) >> (artist (emms-track-get track 'info-artist "Misc")) >> (dir (concat "feng@localhost:/home/feng/Music/" artist))) >> (list file dir)))) > >This is a interesting idea. Can other people please consider this and >provide input? > >-- > "Cut your own wood and it will warm you twice"
Reply | Threaded
Open this post in threaded view
|

Re: PATCH: 0001-Add-emms-tag-editor-pipe-function

Yoni Rabkin-2

> Hello,  any progress about this patch?  :-)

We never got any additional input... I went ahead and pushed this to the
Savannah repo. I added lexical binding as well. Please test it on the
git repo before we make a point release to ELPA.

--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re:Re: PATCH: 0001-Add-emms-tag-editor-pipe-function

tumashu
















At 2021-01-14 05:41:26, "Yoni Rabkin" <[hidden email]> wrote:
>
>> Hello,  any progress about this patch?  :-)
>
>We never got any additional input... I went ahead and pushed this to the
>Savannah repo. I added lexical binding as well. Please test it on the
>git repo before we make a point release to ELPA.

I have tested, seem to work well :-)

>
>--
>   "Cut your own wood and it will warm you twice"
Reply | Threaded
Open this post in threaded view
|

Re: PATCH: 0001-Add-emms-tag-editor-pipe-function

Yoni Rabkin-2
tumashu  <[hidden email]> writes:

> At 2021-01-14 05:41:26, "Yoni Rabkin" <[hidden email]> wrote:
>>
>>> Hello,  any progress about this patch?  :-)
>>
>>We never got any additional input... I went ahead and pushed this to the
>>Savannah repo. I added lexical binding as well. Please test it on the
>>git repo before we make a point release to ELPA.
>
> I have tested, seem to work well :-)

Excellent, thank you.

There will be a point release to elpa with lexical scoping, info-native
and this code in the near future.

--
   "Cut your own wood and it will warm you twice"