I’m working with a “hacked” version of Pet Companion and have a couple problems:
I want to insert an html link into the layout, but the kapp.layout()
function is escaping HTML when I do this:
self.kapp.layout = [self.video,"<h1>Hello World</h1>",call_pet_button, dispense_treat_button,brightness,awb]
How do I get it to render unaltered HTML?
Secondly, using Google to host images is irreparably broken. The (new) instructions for generating the API key don’t match the actual user experience, but even once I got Google to generate the API key it wanted me to grant VizyCam.com permissions to all of my Google account data. Not doing so resulted in a message that said “Google hasn’t verified this app”. Not wanting to start over and make a new throw away Google account, I just moved on.
I extricated the Google code from the Pet Companion app and replaced it with a function that saves the images to the MEDIA_DIR with cv2.imwrite()
and generates an index.html
file there which displays the images. My plan was to place a hyperlink to the index.html
file where the “Hello World” is in the above layout. Currently I’m just running a second vanilla python3 web server on a different port to view that page.
How do I generate and reference generic static HTML pages with/for the VizyCam’s inherent HTTP server? (FWIW I’ve negative interest in learning how to code with the undocumented wrappered React stuff, it’s just too convoluted for my simple needs.)
Oh, one last question while I’m at it: How do I preserve the video.overlay
info showing what Tensor Flow matched and my time-stamps on the images? When I write the frame
only the raw un-overlay-ed is saved.
Thanks!