Generator gas consumption based on kWh generated

I have a generator hooked up to my Bluetti AC300. How could I create a way to show how much gas is consumed (gallons) based on the kWh of generated electricity through the AC input? 1 gal = ~7kWh, so I just need to divide kWh/7 to get approx gallons consumed. I already know and graph for daily/monthly charts how many kWh are generated, I just also want to display approx gallons consumed, mostly for a monthly and yearly chart so I don’t have to manually figure it out. Thank you good people!