diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2014-03-22 09:18:14 +0200 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2014-03-22 09:37:54 +0200 |
commit | 1ed84233cf8faf680dd81fa3b2ef37b1d7686a03 (patch) | |
tree | d27f908e0a2dda782242b1612d03382d479de6b0 /scintilla/scripts/ScintillaData.py | |
parent | e7a0f350adc29d7a46bab8ff6ad501a7e6e41cec (diff) | |
download | notepad2-mod-1ed84233cf8faf680dd81fa3b2ef37b1d7686a03.zip notepad2-mod-1ed84233cf8faf680dd81fa3b2ef37b1d7686a03.tar.gz notepad2-mod-1ed84233cf8faf680dd81fa3b2ef37b1d7686a03.tar.bz2 |
Update scintilla to 3.4.0.4.2.25.904
Diffstat (limited to 'scintilla/scripts/ScintillaData.py')
-rw-r--r-- | scintilla/scripts/ScintillaData.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scintilla/scripts/ScintillaData.py b/scintilla/scripts/ScintillaData.py index 1c999a1..bb21c22 100644 --- a/scintilla/scripts/ScintillaData.py +++ b/scintilla/scripts/ScintillaData.py @@ -115,6 +115,30 @@ def FindPropertyDocumentation(lexFile): del documents[name] return documents +def FindCredits(historyFile): + credits = [] + stage = 0 + with open(historyFile) as f: + for l in f.readlines(): + l = l.strip() + if stage == 0 and l == "<table>": + stage = 1 + elif stage == 1 and l == "</table>": + stage = 2 + if stage == 1 and l.startswith("<td>"): + credit = l[4:-5] + if "<a" in l: + title, a, rest = credit.partition("<a href=") + urlplus, bracket, end = rest.partition(">") + name = end.split("<")[0] + url = urlplus[1:-1] + credit = title.strip() + if credit: + credit += " " + credit += name + " " + url + credits.append(credit.decode("utf-8")) + return credits + def ciCompare(a,b): return cmp(a.lower(), b.lower()) @@ -173,6 +197,8 @@ class ScintillaData: self.lexerProperties = list(lexerProperties) SortListInsensitive(self.lexerProperties) + self.credits = FindCredits(scintillaRoot + "doc/ScintillaHistory.html") + def printWrapped(text): print(textwrap.fill(text, subsequent_indent=" ")) @@ -191,3 +217,6 @@ if __name__=="__main__": print(" " + k) print(textwrap.fill(sci.propertyDocuments[k], initial_indent=" ", subsequent_indent=" ")) + print("Credits:") + for c in sci.credits: + print(" " + c.encode("utf-8")) |