Skim notes to standard pdf annotations, in batch

Could somebody modify of the “PDF to PDF Bundle” script to do the opposite: take .pdfd file bundle (or a pdf+skim notes file) and create an annotated pdf file ?

Currently I can use the Skim feature “export to .pdf with embedded notes”, but I would really like it if there was a way to do this in batch,
which worked both for .pdfd file bundles or when the pdf files comes with a separate .skim file for the notes