As I discussed in How to embed matplotlib figure in html, sometime the return from different third-party tools are HTML. In order to merge different analysis into one, I use image as a media.
How to covert html to image?
- Install wkhtmltopdf,
- Install python package, imgkit
sudo apt-get install wkhtmltopdf
pip install imgkit
Then you can save HTML to image
import imgkit
imgkit.from_url('http://google.com', 'out.jpg')
imgkit.from_file('test.html', 'out.jpg')
Here is an example to show merged image of backtrader figure report and quantstats html report

FEATURED TAGS
computer program
javascript
nvm
node.js
Pipenv
Python
美食
AI
artifical intelligence
Machine learning
data science
digital optimiser
user profile
Cooking
cycling
green railway
feature spot
景点
work
technology
F1
中秋节
dog
setting sun
sql
photograph
Alexandra canal
flowers
bee
greenway corridors
programming
C++
passion fruit
sentosa
Marina bay sands
pigeon
squirrel
Pandan reservoir
rain
otter
Christmas
orchard road
PostgreSQL
fintech
sunset
thean hou temple in sungai lembing
海上日出
SQL optimization
pieces of memory
回忆
garden festival
ta-lib
backtrader
chatGPT
stable diffusion webui
draw.io
streamlit
LLM
prompt engineering
fastapi
stock trading
artificial-intelligence