There are two ways you can generate an electrical current (very little) with a pendulum.
1) You will need a non conducting pendulum weight. You will need a non uniform magnetic field (two neodymium magnets) with a gap between them that the pendulum swings between (so you will want a thin weight). Wrap many turns of thin copper wire around the pendulum weight (in the plane of the pendulum oscillation). If you attach the two ends of the wire together, the current generated in the wire coil will damp the pendulum swing (proof that you are generating electricity). The pendulum swing will not be damped if the two ends of the wire are not connected. ou will not be able to generate dnough
voltage to charge a magnet (you will need a diode to prevent shorting the battery).
2) (not part of your initial condition). Use a magnet for your pendulum weight, and use a stationary coil.
Bob S