Menu

#32 Implement output to format string

open
nobody
None
5
2012-06-29
2012-06-29
No

Implements -p/--print option that allows user to output tag values to a format string, like in mp3info.

Discussion

  • Oleg Kostyuchenko

    I added two attachments: id3v2-format-string.patch and id3v2-format-string-with-playtime.patch.

    The first one is a more or less seamless implementation of -p/--print option.

    The second one is an improved version of the first one, it adds %S (playtime in seconds) to format string specifiers. It is a hack rather than a correct patch because this feature is implemented via two new files mp3tech.h and mp3tech.c, which are almost entirely taken from the correspondent files in mp3info 0.8.5a, therefore violating the project structure and ideology. A proper implementation of a patch for playtime calculation is a time-consuming feature, for it is a tag-independent problem, and it requires to implement a number of relatively low-level operations from scratch.

    In brief, the second patch should be used only if %S is absolutely needed (in my case, I met this requirement in EMMS for Emacs when tried to use id3v2 as a tag scanner instead of mp3info used by default).

     
  • Oleg Kostyuchenko

     
  • Oleg Kostyuchenko

    id3v2-format-string.diff with additional hack for playtime output

     

Log in to post a comment.