finished function publish-diary