hmt utility add filename to parseable data

aks100

New Member
I am using the hmt (wiki.hummy.tv/wiki/Custom_Firmware_Package_Notes#HMT - I can't post a full link to the wiki) utility within the custom firmware via a telnet session. It's very useful!

This utility correctly processes '*' (all files), however the output is hard to associate to a given file as the it does not include the filename. For a long series list, the inclusion of the filename in the parseable data would be a great benefit.

Not sure if this enhancement could be considered :)! Alternatively, or as well as, is the source code for this utility available?
 

MymsMan

Ad detector
I am using the hmt (wiki.hummy.tv/wiki/Custom_Firmware_Package_Notes#HMT - I can't post a full link to the wiki) utility within the custom firmware via a telnet session. It's very useful!

This utility correctly processes '*' (all files), however the output is hard to associate to a given file as the it does not include the filename. For a long series list, the inclusion of the filename in the parseable data would be a great benefit.

Not sure if this enhancement could be considered :)! Alternatively, or as well as, is the source code for this utility available?
Never realized there was a * option before, but it also tries to process directories which is a bit silly

Source is available https://git.hpkg.tv/hummypkg/hmt if you do make changes you can submit a Pull request
See https://wiki.hummy.tv/wiki/Maintain_packages_with_Git if you are not familiar with using git
 

Black Hole

May contain traces of nut
I see no harm in sending the input filename to the hmt output as the first line, maybe as an optional command switch to avoid disrupting existing uses.
 
OP
A

aks100

New Member
Never realized there was a * option before, but it also tries to process directories which is a bit silly

Source is available git.hpkg.tv/hummypkg/hmt if you do make changes you can submit a Pull request
See wiki.hummy.tv/wiki/Maintain_packages_with_Git if you are not familiar with using git
Thanks. I noticed there are fixes for Windows in git - is there a windows build available?
 
OP
A

aks100

New Member
I've seen the 'updates' to enable build on windows platforms, I was wondering whether the was a windows build ("hmt.exe") already built - but I could not find one. I could certainly go build it of course, but haven't rolled up my sleeves for a good few years 🤣.
 

/df

Active Member
...
This utility correctly processes '*' (all files), however the output is hard to associate to a given file as the it does not include the filename. For a long series list, the inclusion of the filename in the parseable data would be a great benefit.
...
and
Never realized there was a * option before, but it also tries to process directories which is a bit silly
...
Presumably * is just the shell wildcard. So just don't let it know about directories: use *.ts or *.hmt.

To include the name passed to hmt as the first item in the parseable output, stripped of its suffix, use a function like this:
Code:
aks_hmt_p() { # filename...
    for ff; do
        case $ff in
        *.ts|*.hmt)   ff=${ff%.*} ;;
        esac

        printf "%s\t%s\n" "$ff" "$(hmt -p "$ff")"
    done
}
Now that the only supported Windows version has its Subsystem for Linux, you should be able to do that in a POSIX shell in a Linux under WSL as well as at the HD/R shell prompt.
 

/df

Active Member
Wrong, nowadays at least. Either suffix or none is accepted.

This might lead to a problem with the eagerly awaited programme "How to extract parseable data from the HMT file corresponding to a file named recording.ts" but I haven't checked the code.
 

prpr

Well-Known Member
I was wondering whether the was a windows build ("hmt.exe") already built - but I could not find one.
I did one. It's just my own personal build, rather than anything 'official', but I believe it works just like the one on the Humax.
 

Attachments

OP
A

aks100

New Member
To include the name passed to hmt as the first item in the parseable output, stripped of its suffix, use a function like this:
Code:
aks_hmt_p() { # filename...
    for ff; do
        case $ff in
        *.ts|*.hmt)   ff=${ff%.*} ;;
        esac

        printf "%s\t%s\n" "$ff" "$(hmt -p "$ff")"
    done
}
Now that the only supported Windows version has its Subsystem for Linux, you should be able to do that in a POSIX shell in a Linux under WSL as well as at the HD/R shell prompt.
Thanks a lot!
 
Top