Make timestamp header a default.

This commit is contained in:
kenkeiras 2017-10-01 20:52:58 +02:00
parent 75f00e7171
commit c1055bd703
2 changed files with 7 additions and 5 deletions

View File

@ -3,7 +3,6 @@ import datetime
SESSION = None
def __gen_session_name__():
now = datetime.datetime.utcnow()
return "treeNLU-session-{}.org".format(
@ -25,6 +24,11 @@ def global_session():
return SESSION
def get_header():
now = datetime.datetime.utcnow()
return ("# Ran on {}\n".format(
now.strftime("%y/%m/%d %H:%M:%S.%f")))
class LevelContext:
def __init__(self, increaser, decreaser):
self.increaser = increaser
@ -43,6 +47,8 @@ class OrgModeSession:
self.level = 0
self.dirty = False
self.f.write(get_header())
def annotate(self, annotation):
if self.dirty:
self.f.write("{indentation} {data}\n".format(

View File

@ -21,10 +21,6 @@ def gen_session_name():
def main():
org_mode.create_global_session(gen_session_name())
now = datetime.datetime.utcnow()
org_mode.global_session().annotate("Ran on {}".format(
now.strftime("%y_%m_%d %H:%M:%S_%f")))
failed = False
for test_name, test_module in tests:
try: