Hugo asset pipeline vs. exec?

Hi, I see that I’m not the first person to ask this feature (a number of GitHub issues from 2015 that were killed for security reasons), but I’m going to ask this from a different standpoint. Other people have asked for an “exec” function for shortcodes or templates, but I’m actually thinking about extending Hugo in (if necessary in go) via asset pipes.

I have a .gpx (GPS exchange format) file that I have a program to extract information out of… think of extracting EXIM data from an image or resizing an image or minifying a .js file. This is not a quick operation, so I’d like it to use the asset pipeline feature to cache the info the first time Hugo encounters it. I would also like Hugo server to behave in the intuitive way.

Is there any easy way to extend the asset pipe so that when do something like:

$foo = resources.Get("map.gpx") | gpxinfo | markdownify


I know some people use preprocessors like codebraid but in this case I really want inline processing and asset management.

Go modules for an exec Hugo module?