UPDATED VERSION: go directly to the original thread for an up-to-date version of the userscript that has now been made general between all Philomena boorus (currently, derpibooru, ponerpics, and ponybooru). You can use that to import from any of those sites to any of the others, only needing to install a single userscript. It is also being actively updated with new QoL features.
Outdated version (the original reason for this topic) here: https://gitlab.com/emndc8549phnxel/philomena-importer. You can still use it but it only supports importing to ponerpics. It is also not being updated with new features from upstream.