MediaInfo icon indicating copy to clipboard operation
MediaInfo copied to clipboard

Why templates have to be so inconvenient?

Open WonderRat opened this issue 4 years ago • 6 comments

I'm understand that command line forces to put everything in single line, but text files don't have such limit.

Best way to fix it is adding some easy scripting engine (Lua?).

Or write new template engine that uses "natural" formatting (spaces, tabulations, new lines): define template blocks for each type (general, video...), write general first (if exist) and write all other blocks. Something like that:

$BlockVideoBegin$
ID          : %ID%
Format      : %Format% : %Format/Info%
Duration    : %Duration/String4%
BitRate     : %BitRate%
Dimensions  : %Width% x %Height% @ %FrameRate% %FrameRate_Mode_Original/S%
Stream size : %StreamSize%

$BlockVideoEnd$

Empty line before "$BlockVideoEnd$" makes spacing after each video stream info.

It's much better because it closer to result than current implementation.

WonderRat avatar Dec 06 '20 17:12 WonderRat

Why templates have to be so inconvenient?

The current implementation is ~15 year old, ugly code, and not touched since this date (except crash fixes). Since then, nobody was interested in prioritizing/sponsoring this feature. If you are interested in prioritizing this feature, vote for it :).

We may also accept patch proposals.

Or write new template engine that uses "natural" formatting

Your suggestion may be a possibility when we take the time to focus on an update.

JeromeMartinez avatar Dec 06 '20 17:12 JeromeMartinez

Forcing general first was bad idea: i wanted to make list with lines "width fullname", but get only "fullname width".

WonderRat avatar Dec 07 '20 19:12 WonderRat

Forcing general first was bad idea

I didn't say the opposite :-p. I know there is a lot to do for a good template engine. But... See first answer ;-).

JeromeMartinez avatar Dec 07 '20 19:12 JeromeMartinez

If this would fix the display of text in "Compare View" mode so I could read all of the text under "Encoding settings" that would be great!

This line of text is so long it's impossible to see where two files differ in their encoding settings. Wrapping the text would help me understand how two files differ instead of just knowing that they do differ.

ghost avatar Jan 01 '21 22:01 ghost

Like this?

https://github.com/optio50/Mediainfo-Template https://github.com/optio50/Mediainfo-Template/blob/main/Inform-Example.txt https://github.com/optio50/Mediainfo-Template/blob/main/Inform-Example2.txt

optio50 avatar Mar 21 '21 04:03 optio50

Like this?

https://github.com/optio50/Mediainfo-Template https://github.com/optio50/Mediainfo-Template/blob/main/Inform-Example.txt https://github.com/optio50/Mediainfo-Template/blob/main/Inform-Example2.txt

Please, how do we apply this template?

ghost avatar Sep 02 '21 21:09 ghost