The focal length divided by the pinhole diameter gives you the effective aperture. For example, 360mm/.5mm = f/720. So, the extension part is pretty simple. Where you will run into problems is with reciprocity failure due to the requirement of very small aperture needing very long exposure times. A reciprocity departure table for your film will give you some idea of the compensation needed.