diary script for managing a diary