Theoretically if you broke wind nonstop for seven years it would be the energy equivalent of a nuclear bomb.
... a staggeringly small nuclear bomb. Back of the envelope: If you spent 7 years using a sledgehammer to manually demolish buildings, you'd be hard pressed to beat Little Boy. I doubt you can get more energy from farting than from dedicated manual labor. And I think the margins on both of those intuitive estimates are super insanely huge.
I'm guessing this came from the "a fart burns 67 calories" thing, which kind of holds up numerically:
Let's assume that calorie here means the "large calorie", "Cal" or "kcal". Let's also assume you fart once per second and do so continuously without breaking for sleep.
67kcal ~= 280 kJ.
280 * 60 * 60 * 24 * 365 * 7 = 61810560000 = 6.2*10^10 kJ = 6.2*10^13 J
Little Boy, a tiny nuke by modern standards (by a factor of about a hundred) released ~ 6.3*10^13 J.
But, alas, it is 100% bunkum that a fart consumes 67 calories:
http://www.snopes.com/fart-burns-67-calories/If farting really consumed 67 Cal / sec, a man eating his recommended daily calorie intake could expend all his energy in a single 40 second wall-shaker (2500/67~=40). And while a fart of such proportions would surely leave you weak at the knees, it seems unlikely that one a day would doom you to die of starvation.
QED.