#@+leo-ver=4
#@+node:@file mod_timestamp.py
"""Timestamp all save operations to show when they occur"""

# By Paul Paterson.

from leoPlugins import *
from leoGlobals import *

import time
	
#@+others
#@+node:timestamp
def timestamp(tag=None, keywords=None):
	
	cmd = keywords.get('label', 'save')

	if cmd.startswith("save") or cmd.startswith("tangle"):
		es("%s: %s" % (cmd, time.ctime()))
#@-node:timestamp
#@-others

if 0: # Register the handlers...

	registerHandler("command1", timestamp)

	__version__ = "0.1" # Set version for the plugin handler.
	plugin_signon(__name__)
#@nonl
#@-node:@file mod_timestamp.py
#@-leo
