Accidentally almost deleted iPhoto library
If you purely want to salvage your photos, then this is the easiest way without any other software.


Right-click on the iPhoto Library file and select Show Package Contents

Find the Masters folder and copy it somewhere, like your Desktop

Hold down Alt/Option key and open iPhoto again. This will bring up this window

Select New Library and import all the photos from the Masters folder that you copied to your Desktop in step #2


This should work, and create a new library with any photos that are still intact.