I’m trying to display an MHT file using Xibo. - This is the short version.
The long version is: We have a printer webmanager that because of security we have to keep hidden from all but a particular server that hosts it. I’ve been working around this by exporting its webmanaged queue page as an MHT file for display to my users so they know whats going on while their jobs stack up in the queue, I’m doing this using a script on a loop then placing it onto a screen via UNC path and getting internet explorer to open it. I’m looking to migrate this workaround to Xibo by getting Xibo to display this MHT file just like I’m able to do using internet explorer and some automation scripting. The file is located on the same server that Xibo is being hosted on so I assume if its possible this makes things easier.
So my question is two fold:
Is it possible to display an MHT file at all? (I know you cant upload it to the library)
If it is possible, could anyone provide a helping hand as to how I would do this?
Any guidance anyone could give me on this topic would be highly appreciated.
I have also tried downloading it as an HTML file (single file) but some elements are missing when opened in IE and I couldn’t get it to display in Xibo (i suspect due to a lack of understanding on my part). I have also tried it as an HTM file with a supporting folder. This did open correctly in IE but also could not get it to open in Xibo (I suspect for the same reasons as previously)
Xibo for Windows uses Internet explorer as web browser.
In IE → Tools, Internet Options -->Programs tab you should see an option at the bottom for Set associations, Click on that to see the extensions that IE is configured to open.
Is .mht listed there, and if so is it selected?
Thank you for your response Assuming you mean the server, this is correctly set up exactly as your attached image shows.
For full disclosure I’m attempting to display this content on Xibo for Android. My server is set up on a Windows 10 Enterprise PC, locally hosted CMS Version 2.1.2, installed via Docker using the standard guide on this site. All Player clients (2 Android and 1 Windows - for testing purposes currently) are all on the same network. We want to ideally go the Android route due to the lack of overlay on the Windows player at time of writing and of course the expense of Windows license etc.
Do you know if theres an alternative way to do it?
For example I can also download the web manager site as a .HTM, this comes with a related folder containing everything it needs. Could I use this in some way?
Another possibility would be to use the HTML Package Widget which is available in Version 2 of Xibo CMS. If you are able to package the site within a htz file, you may be able to upload that site packaged in the htz to your CMS and use the HTML Package Widget to then display that site on your Player. I have included a link to the documentation below:
This was a great suggestion. I’d never heard of an HTZ file before today but after doing some work I think this is the direction I will go. Once I’ve got everything working correctly I’ll post a full description of what steps I took to get it to work. I had to use a 3rd party piece of freeware but overall its been quite easy so far.
I’m now at the very final hurdle of this task which I hope someone can help me with. This HTML package needs to be updated regularly. Since this is a print queue it will need to be change quite regularly - say every 3 mins - I have worked out a system to programmatically download my print queue webpage and package it as an HTZ file. Now I just need to work out how I can effectively “swap”/replace the file in the library every few mins so the information shown on my screen is current. I saw a post on the forums back in 2017 that said there might be an API or function that could be used to do something like this. Could you or someone elaborate on this functions usage please? Or how I might achieve dynamic and hand off regular updating of library files.
Alternatively I thought it might just be able to swap out the file found in the C:\xibo\shared\cms\library folder but it appears it changes the file name depending on the order that it was added to the media library (47 in this case) so unfortunately there is no reliable way to script this.
Thank you again to everyone so far for their help.
Thanks for the reply and glad to hear the HTML package could provide the solution you are looking for.
You may indeed find that using the Xibo CMS API could allow you to replace those HTZ files, I have included a link to the documentation as well as the API references below:
I hope the below information helps you to create a solution for your Xibo setup, any feedback you choose to post on your experience with a setup like this would be very much appreciated (and interesting tbh).
I think the best way is to create an embedded widget.
Install a web server like Xampp.
Save your files with date and time (to avoid browser cache issue after modification). Save the names on a DB and retrieve data for display it on a web page
On CMS add an embedded widget.
I have already done (embedded). PHP page is updated daily, the files (videos, images, audio) have a different name.
To prevent me from reinventing the wheel I don’t suppose you have a piece of sample code that would replace/update media on a certain interval? Or indeed a piece of sample code that interacts with updating/replacing media on a local CMS server? Anything that would give me a starting off point.
I would say I have a passing acquaintance with python and a piece of sample code could really help me wrap my head around what is required. I’ve found some old guides that walk you through the process but these obviously say they have been retired.
Any help further help you could give would be amazing and let me thank you once again for the guidance you have provided this far.
Thanks for the message. Unfortunately I don’t have any sample code to offer but you may find some luck in the dev channel of this forum. I’m aware that some developers discuss and share code, you may find someone has something to offer.
Sorry I couldn’t come through on this one but I hope that another Community member has something they can offer.
I’m afraid I’ve been unable to find anything on other forums. I don’t mean to be ungrateful but the documentation on your API does leave some to be desired. I’m afraid without this information I think what I’m trying to use Xibo for is a bit dead in the water. Is there any chance in revisiting the documentation in the near future? I’d really like to complete this if possible.
It’s using Python to update datasets but I modified it, so it would converts PPTX to PDF and upload new version of PDF file to Xibo. I added my code as an attachment, I had to upload .py as .pdf because Xibo Community doesn’t allow .py files. I looked for code tag to copy-paste it, but couldn’t find it.
You’ll also need “settings.ini” file in the same folder for it to work (replace xxx with your own info). Contents of settings.ini:
[DEFAULT]
#Original PPTX file located on network share
orig_PPTX_file_path = xxx #Copied PPTX file, located on local HDD
PPTX_file_path = xxx #Converted PDF file
PDF_file_path = xxx #Xibo address
Xibo_address = http://xx.xx.xx.xx #Media name in Xibo, used for searching and replacing media (PDF)
Xibo_media_name = InfoTV PDF API updated #The Client Credentials from a Xibo Application you create at Administration>Applications>Add #Xibo client ID
Xibo_client_id = xxx #Xibo secret
Xibo_secret = xxx