X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=check_docs.py;h=330f60078883d61c869a3c94aebcc75f07ad1b76;hb=b951f0f45f60917eea7104e44d0f14c3e0d1f189;hp=26bb8d021c48a4526282da44e5f60ee5469f78c4;hpb=182ca0c57ce4762c8f0d8e960a01877813b73e23;p=monky diff --git a/check_docs.py b/check_docs.py index 26bb8d0..330f600 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" @@ -25,6 +27,9 @@ file_names["vim_syntax"] = "extras/vim/syntax/conkyrc.vim" file_names["nano_syntax"] = "extras/nano/conky.nanorc" file_names["variables"] = "doc/variables.xml" file_names["config_settings"] = "doc/config_settings.xml" +file_names["lua"] = "doc/lua.xml" +file_names["docs"] = "doc/docs.xml" +file_names["command_options"] = "doc/command_options.xml" for fn in file_names.values(): if not os.path.exists(fn) or not os.path.isfile(fn): @@ -57,6 +62,8 @@ def tidy(file): tidy(file_names['variables']) tidy(file_names['config_settings']) +tidy(file_names['lua']) +tidy(file_names['command_options']) # # Do all the objects first @@ -239,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."