A shutter–photodiode combination for UV and soft X-ray beamlines