A do-it-yourself pedal powered generator is one of those win, win projects. It's educational, using the end product will provide healthy exercise, and you end up with an emergency power source that is safe to use indoors. You will need a bicycle, a generator, a drive mechanism, and a way to control and optionally store the power you produce.
The main consideration in developing a strategy for your project is safety. It is possible to directly generate alternating current (like that used in your home) by spinning an AC induction motor such as an attic fan or washing machine motor. The down side is that its high voltage output is dangerous and required capacitors can explode under some conditions. For these reasons a permanent magnet DC motor is the better choice for your DIY project
DC motors come in two styles, conventional and brushless. Either type becomes a DC generator when you spin it. Since 12 volt controllers, chargers and appliances are common, a motor that produces 100 to 200 watts at 12 volts DC is a good choice. Look for a motor designed to deliver optimum output at speeds under 1,800rpm. Good choices include electric bicycle or go-kart motors, and motors from ancient computer disk or tape drives. Automobile generators/alternators are optimised for higher speeds, making them less desirable.
The ideal choice is an exercise bike with a heavy, single wheel that acts as a flywheel. That said, any bicycle with a solid frame and functional crank/pedal assembly will work. Make the bicycle stationary and stable using one or two stands. Commercial stands are available or you can fabricate your own. If you build your own, the primary consideration is stability.
The Drive Train
Design considerations include efficiency, ease of implementation, and cost. Friction and slippage are enemies of efficiency. However the easiest and cheapest drive options involve friction or slippage. Be sure your design achieves a spin rate (rpm) compatible with both the motor and the person pedalling.
Fabricate a frame on which to mount the generator, making it adjustable for both alignment and drive train tension. Link the bicycle drive to the motor's shaft using, in order of efficiency, chain and sprocket, adjustable v-belt, flexible band, or friction between the rear tire and a rubber wheel on the motor.
Output Control, Storage and Safety
Power produced will vary depending on how fast the bike is pedalled. There are many ways to regulate power output, making it safer and easier to use. A simple option is to run the motor's output into a charge controller sized to handle current (amps) produced by the motor. Run output from the charge controller to the jump leads of a commercial "jump start" power pack that has a built-in DC to AC inverter. Pedal to charge the power pack; then safely plug AC and DC devices into the outlets provided.
This project involves potential hazards such as fire, explosion and electrocution. If you are not certain that your design is safe, consult an expert.