Permalink
Browse files

Update the doc date when check_docs.py is ran.

  • Loading branch information...
Brenden Matthews
Brenden Matthews committed Jul 20, 2009
1 parent 69a40ca commit 198d7e73b2ffbec1875f6a92d09b80d40a0e5c7d
Showing with 12 additions and 1 deletion.
  1. +11 −0 check_docs.py
  2. +1 −1 doc/docs.xml
View
@@ -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 @@ def tidy(file):
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("<date>")
d += 6 # skip over first date stuff
map[d:d+10] = datetime.now().strftime("%F")
map.close()
file.close()
print "done."
View
@@ -16,7 +16,7 @@
<firstname>Brenden</firstname>
<surname>Matthews</surname>
</author>
<date>2009-07-09</date>
<date>2009-07-20</date>
</refentryinfo>
<refmeta>
<refentrytitle>conky</refentrytitle>

0 comments on commit 198d7e7

Please sign in to comment.