An OpenFaaS function to extract the first HTML element inside an MHT document.
This is an http://www.openfaas.com function extract the first HTML element inside an MHT document. This project is deployed inside [https://hub.docker.com/r/philippelavoie/mhthandler-faas/](docker hub).
To use this inside OpenFaas, follow the normal flow:
-
Login
export GW_PASS=YourSecretPassword echo -n $GW_PASS | faas-cli login --username=admin --password-stdin
-
Deploy. In this case, I'm deploying to a local kubernetes instance created with Docker.
faas-cli deploy --image philippelavoie/mhthandler-faas --name athena -g http://localhost:31112
-
Test. In this particular case, I'm sending the MTH file multipartDocument.mht to the athena function and sending the result to result.html.
cat multipartDocument.mht | faas-cli invoke mhthandler > result.html