I did that to make a car mounted battery to use as jump starter. Used a C13 socket on the box, a 12V SLA battery and a salvaged Shottky diode from a dead PC PSU. The lead was from the same PSU, connected to a 12V power line in the car, so it was charged when key on, and to keep it safe I just shorted line and neutral together, and used that pair as positive, and the negative was the earth pin. That way anybody plugging this into an IEC connection with mains applied would get a brief pop and then the mains would be tripped off. It did get quite a bit of use as well, amazing just how often small recreational batteries are flat when you take them out after being unused for a period in winter.