It's a possible project, but you would need to not only have something that opened and closed, you would need a fan system to drive the air, and you would need to have it be thermally insulated when closed, and unless you have a very conservative cooling algorithm you would probably want a heating system to deal with the room getting too cold because the room itself is not thermally sealed.
It ends up being a DIY air conditioner/heater, which I'd rather just buy.