From 63a25aae03b8e3346227559d52b705f20300fb63 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Mon, 20 Jul 2009 17:32:56 -0600 Subject: [PATCH] Update the doc date when check_docs.py is ran. --- check_docs.py | 11 +++++++++++ doc/docs.xml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/check_docs.py b/check_docs.py index ef650f6f..330f6007 100755 --- a/check_docs.py +++ b/check_docs.py @@ -17,6 +17,8 @@ import os.path import re import sys +import mmap +from datetime import * file_names = dict() file_names["text_objects"] = "src/text_object.h" @@ -244,4 +246,13 @@ file.seek(0) file.writelines(lines) file.close() +# lastly, update the date in docs.xml +file = open(file_names["docs"], 'r+') +map = mmap.mmap(file.fileno(), os.path.getsize(file_names["docs"])) +d = map.find("") +d += 6 # skip over first date stuff +map[d:d+10] = datetime.now().strftime("%F") +map.close() +file.close() + print "done." diff --git a/doc/docs.xml b/doc/docs.xml index ff978dd8..706341e5 100644 --- a/doc/docs.xml +++ b/doc/docs.xml @@ -16,7 +16,7 @@ Brenden Matthews - 2009-07-09 + 2009-07-20 conky